Getting the same error here about 80% of the time.
---
index.js:
---
const app = admin.initializeApp({
...functions.config().firebase,
}, 'main' )
const db = admin.database(app)
exports.publishStory = functions.database.instance('ahs-app').ref('/storys/{storyID}').onWrite( async changes => {
// ...
const schemas = await db.ref('schemas').get().then(x=>x.value())
// ...
})
---
Log:
----
Error: Process exited with code 16
at process. (/layers/google.nodejs.functions-framework/functions-framework/node_modules/@google-cloud/functions-framework/build/src/invoker.js:275:22)
at process.emit (events.js:315:20)
at process.EventEmitter.emit (domain.js:467:12)
at process.exit (internal/process/per_thread.js:169:15)
at Object.sendCrashResponse (/layers/google.nodejs.functions-framework/functions-framework/node_modules/@google-cloud/functions-framework/build/src/logger.js:37:9)
at process. (/layers/google.nodejs.functions-framework/functions-framework/node_modules/@google-cloud/functions-framework/build/src/invoker.js:271:22)
at process.emit (events.js:315:20)
at process.EventEmitter.emit (domain.js:467:12)
at processPromiseRejections (internal/process/promises.js:245:33)
at processTicksAndRejections (internal/process/task_queues.js:94:32)
---