Open trullock opened 2 months ago
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Ah, slight update to this.
It only seems to affect the Error Reporting page, e.g. here https://console.cloud.google.com/errors/detail/XXXXXXXXX;locations=global
If you click View Logs from a truncated sample and go through to the full log detail, e.g
https://console.cloud.google.com/logs/query;query=error_groups.id%3D%22XXXXXXXXXX%22%0AlogName:%22run.googleapis.com%252Fstderr%22%0Aresource.type%3D%22cloud_run_revision%22%0Aresource.labels.revision_name%3D%22errorhandlingtest4-00002-kif%22%0Aresource.labels.location%3D%22europe-west1%22%0Aresource.labels.service_name%3D%22errorhandlingtest4%22%0Aresource.labels.configuration_name%3D%22errorhandlingtest4%22%0Aresource.labels.project_id
the whole stack trace is here.
So thats a workaround at least. Still, theres some issue here, just perhaps not as critical as initally thought. Annoying still
Related issues
Not sure if this has anything to do with it https://github.com/firebase/firebase-functions/issues/1337
[REQUIRED] Version info
node:
21
firebase-functions:
5.0.1
firebase-tools:
13.13.3
firebase-admin:
12.1.0
[REQUIRED] Test case
See below
[REQUIRED] Steps to reproduce
See below
[REQUIRED] Expected behavior
Stack trace not to be truncated when an error is thrown inside and async function
[REQUIRED] Actual behavior
Stack trace only contains the last stack frame, none of the path of how it got there
Were you able to successfully deploy your functions?
Yes
If you have this 2nd Gen function (1st gen not tested):
And then you invoke it with this url slug
/errorHandlingTest1?foo=bar
On the emulator you get this:
And on live you get this:
Live omits some of the internal stack frames but thats no issue.
If you make the explosion happen inside another function call:
and hit
/errorHandlingTest2?foo=bar
On the Emulator you get:
and on Live you get:
Great, as you'd expect
But then if you have an async function:
and hit
/errorHandlingTest3?foo=bar
You get:
Emulator:
Note the two stack frames for
index.js
, as youd expect BUT on Live you get:Where's the rest of the stacktrace? This makes debug very difficult.