-
Notifications
You must be signed in to change notification settings - Fork 955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to load function definition from source - functions emulator fails to start or deploy fails #6285
Comments
One other thing I noticed - the process is slow to start when it fails, but when it is successful, both the emulator and deploy start more quickly. |
While running the emulator today, I encountered the same error: !! functions: Failed to load function definition from source: FirebaseError: User code failed to load. Cannot determine backend specification I immediately re-ran the command and the functions emulator started correctly. |
Hi @james-dellow, taking a look into this, it looks like the cause is a network issue based of this log |
Thanks @aalej - is there anything you can suggest that I can do in my environment to mitigate this? |
I wonder if this has anything to do with #5888. I'm working with firebase-tools: 13.22.0 In my case I get There's an advice to set the environment variable FUNCTIONS_DISCOVERY_TIMEOUT=50, but it only worked for the I found that modifying
Previously it had 30 secs. It would be great if variable FUNCTIONS_DISCOVERY_TIMEOUT could be added to this spot (of course if that makes sense). |
[REQUIRED] Environment info
firebase-tools: 12.4.8
Platform: Windows 11 (all updates applied), Node v16.13.0
[REQUIRED] Test case
Sorry, I'm unable to provide an MCVE.
[REQUIRED] Steps to reproduce
Note: This issue is occurring intermittently over the last few days.
Running either firebase deploy or firebase emulators:start results in either the deploy failing or the functions emulators doesn't start, or sometime not all functions are available. Error reported by the CLI is:
However, re-running the command again and it usually works ok on the second attempt.
[REQUIRED] Expected behavior
All functions run in the emulator or the deploy doesn't fail on first attempt.
[REQUIRED] Actual behavior
I've attached the full log for a failed emulator startup, as that's the only one I've been able to capture today, but this may be the relevant section:
debug.txt
The text was updated successfully, but these errors were encountered: