Skip to content

Instantly share code, notes, and snippets.

@shangyilim
Created July 6, 2019 09:41
Show Gist options
  • Save shangyilim/40e89b7f1a2102e7942bc3e1c8a937ca to your computer and use it in GitHub Desktop.
Save shangyilim/40e89b7f1a2102e7942bc3e1c8a937ca to your computer and use it in GitHub Desktop.
i functions: Beginning execution of "calculateOrder"
i Your code does not appear to initialize the 'firebase-admin' module, so we've done it automatically.
- Learn more: https://firebase.google.com/docs/admin/setup
> begin trigger
⚠ Unknown network resource requested!
- URL: "http://metadata.google.internal./computeMetadata/v1/instance"
⚠ Error: Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information.
at GoogleAuth.getApplicationDefaultAsync (/Users/shangyilim/Projects/emulator-test/functions/node_modules/google-auth-library/build/src/auth/googleauth.js:161:19)
at processTicksAndRejections (internal/process/task_queues.js:86:5)
⚠ Your function was killed because it raised an unhandled error.
(node:93021) UnhandledPromiseRejectionWarning: Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
at ServerResponse.setHeader (_http_outgoing.js:482:11)
at ServerResponse.header (/Users/shangyilim/.nvm/versions/node/v11.14.0/lib/node_modules/firebase-tools/node_modules/express/lib/response.js:771:10)
at ServerResponse.send (/Users/shangyilim/.nvm/versions/node/v11.14.0/lib/node_modules/firebase-tools/node_modules/express/lib/response.js:170:12)
at ServerResponse.json (/Users/shangyilim/.nvm/versions/node/v11.14.0/lib/node_modules/firebase-tools/node_modules/express/lib/response.js:267:15)
at Function.<anonymous> (/Users/shangyilim/.nvm/versions/node/v11.14.0/lib/node_modules/firebase-tools/lib/emulator/functionsEmulator.js:96:24)
at Generator.next (<anonymous>)
at fulfilled (/Users/shangyilim/.nvm/versions/node/v11.14.0/lib/node_modules/firebase-tools/lib/emulator/functionsEmulator.js:4:58)
at processTicksAndRejections (internal/process/task_queues.js:86:5)
(node:93021) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment