Coldfusion 10: Method is not found in component - coldfusion

Since we installed ColdFusion 10, we have received several error messages such as
"Method ifspDueDt is not found in component [fullpath]\incTabCnt.cfc."
We are trying to call a method named ifspDueDt. It is called in one place in our entire application and when it's called, it's called from ifsp.cfc. We use engine.js for our AJAX, so the call looks like this:
http('POST','../Components/ifsp.cfc?method=ifspDueDt', IFSPDueDtResp, param);
We are completely baffled by the fact that for some reason and only on some occasions (certainly not all the time), ColdFusion is looking for ifspDueDt in incTabCnt.cfc instead of ifsp.cfc. There is no other place where this method is called. What could be causing this?
We probably get 1-2 of these errors per week, whereas we have several hundred users accessing the system.

It looks like ColdFusion 10 update 3 solves this problem, at least for the code I'm working on. Having said that, I don't yet recommend upgrading, due to a series of other issues with update 3. See the comments on the CF blog post announcing update 3. Note that at least two other people have posted in that comment thread that they are still experiencing the "wrong page displayed" problem, which seems like it's closely related to the "wrong component" problem we're discussing in this question.
We were fortunate that we don't use CF scheduled tasks, and we did not hit any of the startup errors or other problems in our testing environment, although one of my teammates did hit a number of problems which corrupted his dev environment.
I really hope Adobe moves quickly with update 4 (or a replacement for update 3).

Related

Why would __tcfapi not be defined on CONSENT_DATA_READY?

I have this code for many years, implementing TCFv2 cookie consent with Google Funding Choices.
window.googlefc.callbackQueue.push({
'CONSENT_DATA_READY': function () {
/* __tcfapi is undefined!! */
return __tcfapi('addEventListener', 2, function (tcData, success) {
if (success
&& tcData.gdprApplies
&& (tcData.eventStatus === 'tcloaded' || tcData.eventStatus === 'useractioncomplete')
&& tcData.purpose.consents[1]) {
...
}
});
}
});
It works 99.99% of the time, it has appeared so.
However, today, one of my Chrome profiles seem to have got "broken", in that whenever this CONSENT_DATA_READY event is triggered, __tcfapi is not defined.
I tried a number of things, like making sure all extensions are disabled, close Chrome and re-open it, clear just my domain's cookies, etc, but nothing worked. All other Chrome profiles were working well all the time.
I compared the "Sources" tab in DevTools between two Chrome profiles (on the same webpage), and the one working well had a few more scripts loaded and iframes loaded (TCF-specific iframes).
Only when I cleared all the cookies (including the "google.com" scoped cookies), this issue got fixed.
--
I've just released a temporary piece of code, that checks if __tcfapi is undefined in that spot and reports that to the server (this user data will be fully erased as soon as this test is complete), and I see that a small subset of my users is having this issue right now.
EDIT 18 Dec - 181 distinct European users reported so far.
--
I'm not able to find any solution by doing some research. I found someone on Reddit (in the comments) having the same issue as me, and they "resolved" by just removing the event. Other places that report issues with __tcfapi seem to be a slightly different error, like __tcfapi is not a function, which is not the issue I'm having.
--
This looks like it's a bug from Google Funding Choices, but does anyone have any idea how to "auto-fix" this or what can I do so that these users will stop getting this error and proceed as expected?
NB: This is a complete re-edit to reflect the discussion with the questioner.
Some thoughts.
On Error 2.1a
I first suspected that your problem may correspond to Error 2.1a, which is also indicated by the discussion in the GFC community thread you pointed at. The suggested official solution would be to check whether getTCData returns TCData.eventStatus = 'tcloaded' first.
That may work in other cases, however you pointed out -- and added corresponding code -- that you already check on tcloaded but the problem of an undefined __tcfapi seems to occur even before that flag is even created.
Another look on the problem's origin
The GFC community thread of 2020, the TCFv2 standardization history
and the circumstance that the thread has been closed indicate that the problem mainly existed before the final implementation of TFCv2 in Google Funding Choices. That corresponds to the fact that the described behavior infringes the TCFv2 Specification in the following:
Every consent manager MUST provide the following API function: __tcfapi(command, version, callback, parameter). The function __tcfapi must always be a function and cannot be any other type, even if only temporarily on initialization – the API must be able to handle calls at all times.
However, it's not unreasonable that there are still some older implementations out there in the wild which may cause this problem at some clients.
Interestingly enough, you observed that on your side one of your Chrome profiles got "broken" in the described way and only the clearing of all cookies, incl. the "google.com" scoped ones, fixed the issue.
And now?
At first it would be interesting to check for
the tcfPolicyVersion used by the problematic clients, and
differences between the temporarily "broken" Chrome profile and the other, working ones.
It also can't hurt to take a look on the official site on Publisher integration with the IAB TCF v2.0 in case some useful gem is hidden which we currently overlook.
On the other hand it could well be that this -- probably rare -- problem will resolve by itself over time when
all clients have been updated and support the final implementation of TCFv2, and/or
your affected users either someday delete all their Google domained cookies themselves or those time out, and fresh cookies get introduced.
It seems reasonable to assume, that your current patch -- to check whether __tcfapi is undefined -- may be indeed a (fairish) suitable fix, at least for now.

Intermittent CFC not found - Coldfusion 2021 Standard

We have a very strange issue. We have a large CF application that was originally written in CF9, upgraded to CF2016, then onto CF2021. There is a invoicing job that runs as a scheduled task everyday. This invoicing job does many steps (creates, checks, and pays) invoices. There are many components (functions) that are used during this process. We went live with this new server in late November of 2021 and since we have done that, the invoicing job has had issues about 4 or 5 times so far.
The errors I am seeing are usually something like:
Could not find the ColdFusion component or interface components/distributor.distribcontroller.
I say usually, because even the "missing" component changes and they are different each time.
I have checked every component for errors, so that should not be it and most days this invoice job runs fine.
CF2021 is running on Ubuntu 20.04 LTS, 4 CPU.4GB ram. other than this invoice job, application is fine (users never experience missing components)
I also do not use mappings, I have a custom mechanism where I set the compent path in a cfm file and use the "request" structure like: <cfset request.components.distributor = 'components/distributor'> in a file that gets included in the Application.cfc - its may not be ideal, but it is just the was it was build years ago and too much work to change it. (i think).
Any ideas? Any help would be appreciated.
I have a custom mechanism
Feels like a red flag. Especially since it uses the request structure.
How many CFCs are you dealing with? Would it be worth looking at WireBox to handle CFC configuration and creation? Might be overkill for the current issue, but worth looking into.
https://wirebox.ortusbooks.com/
Are you caching component paths? It may be that unchecking the component cache could address this issue.
You might post this issue over on the CFML Slack workspace. Some of the Adobe CF Engineers hang out there.
https://cfml.slack.com/
Signup: https://cfml-slack.herokuapp.com/

Workaround for - graph api bug

Can anyone provide a workaround for this bug
Our app is managing a lot pages with many posts, but since 5 days ago we've had huge problems with that bug.
90% of our posts gain the above described error, 10% are working well.
After many hours of testing we know it's something about the "link" parameter.
Without it, we can post without any errors.
We tried to only post our images without the link parameter but after a hour of posting correctly we got a new error.
(#368) The action attempted has been deemed abusive or is otherwise disallowed. Interesting that posting an image without a link parameter is abusive.
We tried to regenerate all user_tokens and page_tokens but no success, the error still exists.
We tried to pause the service for 24 hours and start it again, no effect.
Does anyone have an idea or a workaround for this bug?
It doesn't seem that it was patched on Tuesday. Because of that we need a solution, we can't hold the service down for one more week.
the workaround from "thefreeman" works for me also:
add more admin(s) to the pages
generate tokens for the new admin
juggle the tokens to stay below limit
Limit per account (for me) seems to be about 150 posts per day.
Limit seems to reset at a certain point in time. Midnight at facebook?
(i am managing 60 Pages and posting roughly 200 updates per day.)
certainly not a nice solution, but the bugs in the fb-bugtracker don't seem to get too much attention :(
sometimes i get a new error: "OAuthException (#1500) The url you supplied is invalid".
Trying again later with the same data works though...

Inconsistent 'Cannot find CFML template for custom tag' error

I have a CF9 site set up locally on OSX Snow Leopard, and it's started to behave very strangely - probably about 1 out of every 5 times I load any page in the site, it will throw a 'Cannot find CFML template for custom tag' error. I just refresh the page and then everything works fine. It can happen on any page, but it never happens consistently with any one page. Furthermore, this doesn't happen at all on the live server when the code is checked in through SVN, so I figure it has to be some kind of configuration problem on my local instance. I can still do my work, but it's pretty annoying having to refresh pages ALL the time. Has anyone run into similar difficulties?
Try using <cfmodule template="pathTo/yourTag.cfm"> rather than <cf_yourtag>, so you can specify the exact location of the template (in case the server is getting confused as to where it resides).
FYI, this is based on a tip from Raymond Camden's blog post: http://www.raymondcamden.com/index.cfm/2006/8/17/ColdFusion-Custom-Tag-Tips
Chris, odd that I should run into your question now, as this just started happening to me last night. I have all of my CF errors being emailed to me, and I am seeing that similar problems are happening across multiple sites that all run the same software, some of which haven't been touched in a long time. That got me thinking, it's probably a corrupt compiled template in the CF cache. You can recompile the template by making a slight change to it, say add an extra line or a comment or something, then access the site again. Or, purge the whole cache and let CF rebuild everything, which is likely what I'll do since who knows what else might be affected.
Clearing the Cache in Coldfusion Production server

What would be a good Coldfusion-based bug tracking software?

What I am looking for is a tool that easily or automatically sends coldfusion error messages to their system.
Then I can use the web-based interface, to manage priorities, track who fixed what and so forth.
But I want to use this to help us deal with errors better, but also to show the importance of a bug tracking system to my fellow works.
System Requirements: Apache, Windows, Coldfusion 8 Standard, Sql Server 2005.
Financial Requirements: Free or Open Source
Goal Or Purpose: To encourage my fellow workers to want and use a bug tracking system.
Does this re-write make more sense?
Thanks
Craig
Wiki has a list of issue tracking software, maybe this list could help.
http://en.wikipedia.org/wiki/Comparison_of_issue_tracking_systems
You may be able to find a hosted service and use either email or web services to create the ticket using onError. With that said, a simple issue tracking app could be created for your site using the same DB used to drive the content. 2 or 3 tables would take care of the data storage and you're already using CF so the application layer is already there.
HTH.
I have been heavily using this type of a setup for several years by email only, and the last 3 years with a Bug Tracking Software.
I must say, the bug tracking software has made my life so much more peaceful. Nothing is left, forgotten, or slips through the cracks. It's easy to find trends in errors, and remember "all the times" it happened.
Our setup is like this:
1) Coldfusion + Appropriate framework with error reporting - It doesn't matter what you use. I have used Fusebox extensively and am making the transition to ColdBox. Both are very capable, in addition to Mach-II, FW/1, Model-Glue, etc. The key part you have to find in them is their ability to catch "onError", usualy in the application CFC.
2) Custom OnError Script - Wherever an error occurs, you want to capture the maximum amount of information about that error and email it in. What we do is, when an error occurs, we log the user out with a message of "oops, log in again". Before logging them out, the application captures the error and emails it to Fogbugz. Along with it, at the top we include the CGI variables for the IP address, browser being used, etc. Over time you will find the things you need to add.
3) Routing in Fogbugz. A 2 user version of Fogbugz is free, and hosted online. There are two main ways to submit bugs. One is to email one in at a time. So if an error happens 2000 times, you get 2000 emails, and 2000 cases. Not always the best to link them together, etc. They have a feature called BugzScout, which is essentially an HTTP address that you do a form post to with cfform with all of the same information you would have put into the email. There's plenty of documentation on this and something I've always wanted to get around to. I had a scenario of 2000 emails for the first time happen a few weeks ago so I'll be switching over to this.
Hope that helps. Share what you ended up doing and why so we all can learn too!
I'm surprised no one mentioned LighthousePro (http://lighthousepro.riaforge.org). Open source - 100% free - and ColdFusion. As the author I'm a bit biased though. :)
Hard question to answer not knowing what kind of restrictions are there? Do you have any permissions to install anything? Also most bug-tracking systems require some kind of database support.
I have a suggestion. You can put in place a basic bug-tracking system, that just allows people to create tickets, and allows you/someone else to close it.
More Windows based tools are mentioned here
Good open-source bug tracking / issue tracking sofware for Windows
Any reason why coldfusion specifically?
I really like Fogbugz from the makers of Stack Overflow. For one user it's quite reasonably priced. I enter some bugs manually and have others emailed in.
A lot of bug tracking software will expose SOAP methods for entering data into them.
For example, we used Axosoft's OnTime and that exposed some WSDL pages that I consumed in my application. I was told that Jira did as well.
There are few in CF411 list: Bug Tracking/Defect Tracking/Trouble Ticket/Help Desk Tools Written in CFML
We use HopToad. There is another bug-tracking app called LightHouse that integrates with HopToad so you can easily create a [bug] ticket from an incoming exception. HopToad has an API of which there are many clients, you want the CF based one:
http://github.com/timblair/coldfusion-hoptoad-notifier
Even if you dont use HopToad and you end up using a different service or roll your own, if you needed to write your own API client you could leverage the code or pattern(s) of the above HopToad client.
A lot of good information from everyone, and I really do appreciate the efforts given. But not the answer i was looking for. Which maybe means, that what i want does not exist, yet.
So i may have to roll my own solution...Or maybe integrate with another existing app...
Thank You all.