You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{"severity":"ERROR","message":"Error: some message\n at entryFromArgs (C:\\Users\\charl\\dev\\getfilta\\nplus1\\packages\\functions\\node_modules\\firebase-functions\\lib\\logger\\index.js:130:19)\n at Object.error (C:\\Users\\charl\\dev\\getfilta\\nplus1\\packages\\functions\\node_modules\\firebase-functions\\lib\\logger\\index.js:116:11)\n at <MY CODE ON STACK> at newHandler (C:\\Users\\charl\\dev\\getfilta\\nplus1\\packages\\functions\\node_modules\\firebase-tools\\lib\\emulator\\functionsEmulatorRuntime.js:319:16)\n at fixedLen (C:\\Users\\charl\\dev\\getfilta\\nplus1\\packages\\functions\\node_modules\\firebase-functions\\lib\\v1\\providers\\https.js:74:41)\n at C:\\Users\\charl\\dev\\getfilta\\nplus1\\packages\\functions\\node_modules\\firebase-functions\\lib\\common\\providers\\https.js:411:32\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async runFunction (C:\\Users\\charl\\dev\\getfilta\\nplus1\\packages\\functions\\node_modules\\firebase-tools\\lib\\emulator\\functionsEmulatorRuntime.js:564:9)\n at async runHTTPS (C:\\Users\\charl\\dev\\getfilta\\nplus1\\packages\\functions\\node_modules\\firebase-tools\\lib\\emulator\\functionsEmulatorRuntime.js:590:5)\n at async handler (C:\\Users\\charl\\dev\\getfilta\\nplus1\\packages\\functions\\node_modules\\firebase-tools\\lib\\emulator\\functionsEmulatorRuntime.js:510:17)"}
Were you able to successfully deploy your functions?
yes
The commit based on #1161 introduced a change to entryFromArgs which mucks with the message, introducing an entire callstack. The comment leads the reader to believe this is to emulate some sort of behavior of console.log, but this seems very questionable.
The text was updated successfully, but these errors were encountered:
This behaviour seems odd because when it doesn't seem to match console.error - which isn't adding a stack trace
Output from console.error:
Validation error: Required at "foo"
Output from firebase.logger.error:
{"severity":"ERROR","message":"Error: Validation error: Required at "foo"\n at entryFromArgs (/Users/user/project/functions/node_modules/firebase-functions/lib/logger/index.js:130:19)\n at Object.error (/Users/user/project/functions/node_modules/firebase-functions/lib/logger/index.js:116:11)\n at _ColleagueV1Repository.fetchColleague (file:///Users/user/project/functions/lib/index.js:388:19)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async file:///Users/user/project/functions/lib/index.js:488:21\n at async /Users/user/project/functions/node_modules/firebase-functions/lib/common/providers/https.js:438:26\n at async runFunction (/Users/user/.nvm/versions/node/v18.15.0/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:506:9)\n at async runHTTPS (/Users/user/.nvm/versions/node/v18.15.0/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:531:5)\n at async /Users/user/.nvm/versions/node/v18.15.0/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:690:21"}
Hey folks, so this is actually working as intended. If you want to take a peek at the original PR that has a thorough description here it is. Basically, we need to always send the stack trace for Cloud Run to correctly send the error to Cloud Error Reporting. Sorry about the confusion!
Related issues
None
[REQUIRED] Version info
node:16
firebase-functions:4.1.1
firebase-tools:10.6.0-11.20.0
firebase-admin:11.4.1
[REQUIRED] Test case
[REQUIRED] Steps to reproduce
deploy and run the above function
[REQUIRED] Expected behavior
print error like before #1161
[REQUIRED] Actual behavior
prints wacky stack filled error:
Were you able to successfully deploy your functions?
yes
The commit based on #1161 introduced a change to entryFromArgs which mucks with the message, introducing an entire callstack. The comment leads the reader to believe this is to emulate some sort of behavior of console.log, but this seems very questionable.
The text was updated successfully, but these errors were encountered: