Open
Description
Related issues
Remotely related: #1681 (just the quality of the logger code I guess)
[REQUIRED] Version info
6.3.2
node:
v22.13.0
firebase-functions:
firebase-tools:
14.5.1
firebase-admin:
[REQUIRED] Test case
- Real life example: https://gist.github.com/bitekas/168ed8224104fb9d6a073efdddb122ff
- Artificial one: https://gist.github.com/bitekas/6e5e03dd929af5521496f46558c16542
[REQUIRED] Steps to reproduce
- Obtain verification result from google.androidpublisherv1
- Log it using firebase logger
- Observe the runtime exception
[REQUIRED] Expected behavior
Anything except runtime exceptions coming from the logger would be an acceptable behaviour.
I expect the raw validation result to be reflected in the console so that I can copy the payload JSON and use it in the system unit tests.
[REQUIRED] Actual behavior
The debug function trows an exception.
TypeError [ERR_INVALID_THIS]: Value of "this" must be of type URLSearchParams
at get size (node:internal/url:466:13)
at Reflect.get (<anonymous>)
at Object.get (file:///workspace/node_modules/googleapis-common/node_modules/node-fetch/src/headers.js:143:22)
at removeCircular (/workspace/node_modules/firebase-functions/lib/logger/index.js:51:30)
at removeCircular (/workspace/node_modules/firebase-functions/lib/logger/index.js:55:28)
at removeCircular (/workspace/node_modules/firebase-functions/lib/logger/index.js:55:28)
at write (/workspace/node_modules/firebase-functions/lib/logger/index.js:70:90)
at debug (/workspace/node_modules/firebase-functions/lib/logger/index.js:80:5)
at validateGooglePlayReceipt (/workspace/build/firebase/functions/src/service/in-app-validation.js:45:24)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {
code: 'ERR_INVALID_THIS'
}
Were you able to successfully deploy your functions?
yes
no error messages during deploy