-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
[REQUIRED] Environment info
firebase-tools:
v14.9.0
Platform:
macOS , Ubuntu
[REQUIRED] Test case
Deploying a cloud function (v1) with firebase-tools v14.9.0 or v14.8.0 results in this error every time the function is called before it even reaches the code
uncaughtException: EROFS: read-only file system, open 'pglite-debug.log' Error: EROFS: read-only file system, open 'pglite-debug.log'
Uncaught exception
Error: EROFS: read-only file system, open 'pglite-debug.log'
Error: Process exited with code 16 at process.<anonymous> (/layers/google.nodejs.functions-framework/functions-framework/node_modules/@google-cloud/functions-framework/build/src/invoker.js:96:22) at process.emit (node:events:536:35) at process.emit (node:domain:489:12) at process.exit (node:internal/process/per_thread:184:15) at sendCrashResponse (/layers/google.nodejs.functions-framework/functions-framework/node_modules/@google-cloud/functions-framework/build/src/logger.js:49:9) at process.<anonymous> (/layers/google.nodejs.functions-framework/functions-framework/node_modules/@google-cloud/functions-framework/build/src/invoker.js:85:44) at process.emit (node:events:536:35) at process.emit (node:domain:489:12) at process._fatalException (node:internal/process/execution:188:25)
We reproduced the issue on ~50 different cloud functions (all v1), database triggers, cron jobs, pubsub, ... all had the same behavior
We event tries to remove all code and only deploy a console.log in the function content and had the same behabior
The issue went away once we downgraded firebase-tools to v14.7.0 or lower
The issue also wasn't reproducible on cloud functions v2 (cloud run functions)
The error stacktrace doesn't help much but it seems to be caused by #8750 which added @electric-sql/pglite, which seems to cause some automatic file write on boot which is not allowed on cloud functions v1
[REQUIRED] Steps to reproduce
Deploy a cloud function v1 using firebase-tools v14.9.0 or v14.8.0
Try to run it
[REQUIRED] Expected behavior
The function to run normally
[REQUIRED] Actual behavior
The function crash with code 16 and a EROFS exception