Firebase cloud function exits with code 16 what is error code 16 and where can I find more info?

前端 未结 4 424
悲哀的现实
悲哀的现实 2020-12-17 09:27

one of my cloud functions on firebase exits with code 16 as an error.

I tried to google and find out what that code is but no luck at all.

Error: P         


        
4条回答
  •  佛祖请我去吃肉
    2020-12-17 09:59

    An improperly terminated cloud function is the likely cause.

    Here's what the firebase docs say:

    • Resolve functions that perform asynchronous processing (also known as "background functions") by returning a JavaScript promise.

    • Terminate HTTP functions with res.redirect(), res.send(), or res.end().

    • Terminate a synchronous function with a return; statement.

    In short, watch out for floating promises and/or multiple calls to res or response.

    I've also seen the Process exited with code 16 occur in tandem with:

    Error: Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information.
        at GoogleAuth.getApplicationDefaultAsync (/srv/functions/node_modules/google-auth-library/build/src/auth/googleauth.js:161:19)
        at process._tickCallback (internal/process/next_tick.js:68:7)
    

提交回复
热议问题