-
Notifications
You must be signed in to change notification settings - Fork 910
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
If the functions code takes a long time to load, an error will occur and loading will be interrupted #7165
Comments
Hey @takahashi-shotaro, thanks for the detailed report and for sharing your observations. I was able to reproduce the issue, and it does sound reasonable to increase the timeout on use-cases where the emulators are being run on a low-spec machine or if there are a lot of dependencies which is causing the functions to load longer than expected. I’ll raise this to our engineering team so they can take a look. Also, thanks for submitting a PR! |
I forgot to mention that the same problem occurs when deploying functions. |
That's a great observation and helped point us to a very surgical fix! |
[REQUIRED] Environment info
firebase-tools: 13.8.3
firebase-admin: 12.1.0
firebase-functions: 5.0.1
Platform: Windows 11
node: 20.5.1
[REQUIRED] Test case
[REQUIRED] Steps to reproduce
[REQUIRED] Expected behavior
No error should have occured
[REQUIRED] Actual behavior
error
functions: Failed to load function definition from source: FirebaseError: User code failed to load. Cannot determine backend specification
npm run serve (firebase emulators:start --only functions --debug)
node -r .
Misc
similar issue: #5888
On Windows, loading our production code entry point by require() takes 8~ seconds.
The text was updated successfully, but these errors were encountered: