Closed
Description
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
import * as functions from "firebase-functions";
export const someFunction = functions.https.onCall(
async (
data: unknown
): Promise<{}> => {
functions.logger.error("some message", { });
return {};
}
);
[REQUIRED] Steps to reproduce
deploy and run the above function
[REQUIRED] Expected behavior
print error like before #1161
{"severity":"ERROR","message":"some message", payload: {} }
[REQUIRED] Actual behavior
prints wacky stack filled error:
{"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.