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
In the case of 10.2.2 it only works if I run the command outside or the package.json script (directly on console).
Running a package.json script that does not include the functions emulator (only auth and Firestore) still works.
My guess is that something changed between 10.1.5 and 10.2.2 that is trying to load the node project in process or something similar that now goes through Yarn. Some logging on what the error is would be helpful to troubleshoot.
[REQUIRED] Steps to reproduce
Create a project that uses yarn pnp
Add a script to package.json such as "emulate": "firebase --project=test-project emulators:start --only auth,functions,firestore --import .firebase-emulator --export-on-exit",
Run the script yarn emulate
[REQUIRED] Expected behavior
Emulator runs
[REQUIRED] Actual behavior
Emulator fails showing the following in the console:
eric@Erics-MacBook-Air project-name % yarn emulate
i emulators: Starting emulators: auth, functions, firestore
⚠ functions: The following emulators are not running, calls to these services from the Functions emulator will affect production: database, hosting, pubsub, storage
✔ functions: Using node@16 from host.
⚠ functions: Unable to fetch project Admin SDK configuration, Admin SDK behavior in Cloud Functions emulator may be incorrect.
i firestore: Importing data from /Users/eric/Code/project-name/.firebase-emulator/firestore_export/firestore_export.overall_export_metadata
i firestore: Firestore Emulator logging to firestore-debug.log
i auth: Importing config from /Users/eric/Code/project-name/.firebase-emulator/auth_export/config.json
i auth: Importing accounts from /Users/eric/Code/project-name/.firebase-emulator/auth_export/accounts.json
i ui: Emulator UI logging to ui-debug.log
i functions: Watching "/Users/eric/Code/project-name/functions/out" for Cloud Functions...
i emulators: Shutting down emulators.
i ui: Stopping Emulator UI
⚠ Emulator UI has exited upon receiving signal: SIGINT
i functions: Stopping Functions Emulator
i firestore: Stopping Firestore Emulator
i auth: Stopping Authentication Emulator
i hub: Stopping emulator hub
i logging: Stopping Logging Emulator
Error: There was an unknown problem while trying to parse function triggers.
Logs show
...
[debug] [2022-03-09T14:33:08.736Z] Web / API server started at localhost:4000
{"metadata":{"emulator":{"name":"ui"},"message":"Web / API server started at localhost:4000\n"}}
[info] i functions: Watching "/Users/eric/Code/project-name/functions/out" for Cloud Functions... {"metadata":{"emulator":{"name":"functions"},"message":"Watching \"/Users/eric/Code/project-name/functions/out\" for Cloud Functions..."}}
[debug] [2022-03-09T14:33:08.825Z] Validating nodejs source
[debug] [2022-03-09T14:33:09.707Z] > [functions] package.json contents: {
"name": "@project-name/functions",
"version": "1.0.10",
"main": "./index.js",
"scripts": {
"start": "yarn run shell"
},
"engines": {
"node": "16"
},
"dependencies": {
"@google-cloud/firestore": "^5.0.2",
"firebase-admin": "^10.0.2",
"firebase-functions": "3.18.1"
}
}
[debug] [2022-03-09T14:33:09.707Z] Building nodejs source
[debug] [2022-03-09T14:33:09.707Z] Analyzing nodejs backend spec
[info] i emulators: Shutting down emulators. {"metadata":{"emulator":{"name":"hub"},"message":"Shutting down emulators."}}
[info] i ui: Stopping Emulator UI {"metadata":{"emulator":{"name":"ui"},"message":"Stopping Emulator UI"}}
[warn] ⚠ Emulator UI has exited upon receiving signal: SIGINT
[info] i functions: Stopping Functions Emulator {"metadata":{"emulator":{"name":"functions"},"message":"Stopping Functions Emulator"}}
[info] i firestore: Stopping Firestore Emulator {"metadata":{"emulator":{"name":"firestore"},"message":"Stopping Firestore Emulator"}}
[debug] [2022-03-09T14:33:09.750Z] *** shutting down gRPC server since JVM is shutting down
{"metadata":{"emulator":{"name":"firestore"},"message":"*** shutting down gRPC server since JVM is shutting down\n"}}
[debug] [2022-03-09T14:33:09.753Z] *** server shut down
{"metadata":{"emulator":{"name":"firestore"},"message":"*** server shut down\n"}}
[info] i auth: Stopping Authentication Emulator {"metadata":{"emulator":{"name":"auth"},"message":"Stopping Authentication Emulator"}}
[info] i hub: Stopping emulator hub {"metadata":{"emulator":{"name":"hub"},"message":"Stopping emulator hub"}}
[info] i logging: Stopping Logging Emulator {"metadata":{"emulator":{"name":"logging"},"message":"Stopping Logging Emulator"}}
[error]
[error] Error: There was an unknown problem while trying to parse function triggers.
The text was updated successfully, but these errors were encountered:
I also don't have immediate bunch on what might be going wrong. I'm going to try to push out a change to make error messages more useful to help us debug the issue. In the meantime, can you help us by sharing a small sample that can reproduce the issue? I've never used that setup, and while we don't officially support yarn pnp, it seems like it's always worked before.
Hey @ericvera. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 3 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
[REQUIRED] Environment info
firebase-tools: 10.2.2
Platform: macOS
[REQUIRED] Test case
[REQUIRED] Steps to reproduce
"emulate": "firebase --project=test-project emulators:start --only auth,functions,firestore --import .firebase-emulator --export-on-exit",
yarn emulate
[REQUIRED] Expected behavior
Emulator runs
[REQUIRED] Actual behavior
Emulator fails showing the following in the console:
Logs show
The text was updated successfully, but these errors were encountered: