https://stackoverflow.com/questions/63349136/unhandled-error-gets-thrown-in-firebase-cloud-functions
https://issuetracker.google.com/u/2/issues/163379017
node:
10.18
firebase-functions:
3.9.0
firebase-tools:
8.7.0
firebase-admin:
9.0.0
We recently updated firebase-functions from 3.6.0 to 3.9.0, and today we started getting the following error in an onCall https function :
Unhandled error function error(...args) {
write(entryFromArgs('ERROR', args));
}
This code is part of the recently added logger, see https://github.com/firebase/firebase-functions/blob/d1432c50863dec4b27834241279180f12f6148d5/src/logger.ts#L99-L101.
Also note that one can enable that by using the compat module.
However in our case we are using either. We also checked our dependencies and there are no such import or logger.error calls.
No error should happen in code that is not directly being called by the deployed code.
Yes, the error happens when running the function.
@mbleigh any idea how to fix this? would reverting to an older version fix the problem?
I found a few problems with this issue:
Reverting will probably help...do you get any more of a stack trace? I'm going to look into this.
hope this issue can be resolved, i have an app needed by the client and if this is not resolved by tomorrow, that would be a good one for me
To be clear, as far as I can tell in testing the only effect of this bug is that unhandled exceptions have unhelpful log messages. This is something to fix (working on it!) but should not affect callable functions that are not crashing somewhere in the user code.
@mbleigh That was the only error, no stack trace. I'm testing it with 3.8 now.
Agreed that the issue seems to be contained to only errors in https onCall functions, however, it will come as a big surprise to users, if they ever see that in production.
@myquery reverting to 3.8.0 could fix the issue, as the potential culprit seems to be introduced in 3.9.0. See https://github.com/firebase/firebase-functions/pull/758
Not sure why that PR was closed though.
PR was closed to be replaced with #759 which has a CHANGELOG instead of just me editing the file in GitHub...hope to get this out soon.
Thanks @mbleigh for the fix. I confirm that downgrading to 3.8 fixes the issue.
I have the same problem here

And on the client side you can't get the errors correctly
Should be fixed via #759 and released in v3.9.1
I'm still having this issue and I'm using v3.11.0
Most helpful comment
I'm still having this issue and I'm using
v3.11.0