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
import * as functions from 'firebase-functions'
// throws an exception
functions.logger.log('something', null)
[REQUIRED] Steps to reproduce
attempt to log null
[REQUIRED] Expected behavior
no exception
[REQUIRED] Actual behavior
exception thrown:
TypeError: Cannot read property 'constructor' of null
at entryFromArgs (/workspace/node_modules/firebase-functions/lib/logger.js:78:47)
at Object.log (/workspace/node_modules/firebase-functions/lib/logger.js:45:11)
[REQUIRED] Version info
**node:**10
**firebase-functions:**3.7.0
**firebase-tools:**8.4.3
**firebase-admin:**8.10.0
[REQUIRED] Test case
[REQUIRED] Steps to reproduce
attempt to log null
[REQUIRED] Expected behavior
no exception
[REQUIRED] Actual behavior
exception thrown:
TypeError: Cannot read property 'constructor' of null
at entryFromArgs (/workspace/node_modules/firebase-functions/lib/logger.js:78:47)
at Object.log (/workspace/node_modules/firebase-functions/lib/logger.js:45:11)
https://github.com/firebase/firebase-functions/blob/master/src/logger.ts#L107
src/logger.ts:107
if (typeof lastArg == 'object' && lastArg.constructor == Object) {
typeof null -> "object"
so would be beneficial to add a null check there
Were you able to successfully deploy your functions?
Yes
The text was updated successfully, but these errors were encountered: