firebase-tools icon indicating copy to clipboard operation
firebase-tools copied to clipboard

Firebase emulator fails because Functions not completing its work in the time allotted

Open cmjordan42 opened this issue 1 year ago • 3 comments

[REQUIRED] Environment info

Hi, I've already extensively documented this on StackOverflow and believe I've found the root of the problem after figuring out how your emulators interoperate.

https://stackoverflow.com/questions/78983940/firebase-functions-cannot-determine-backend-specification

Please consider improving the resiliency of the firebase-tools and firebase-functions packages as I mention in the answer. A very low-cost improvement would be bumping the timeout and putting in better logging around what this cryptic error message actually is talking about which is more like "failed to receive a response from functions subsystem within 10s timeout".

cmjordan42 avatar Sep 17 '24 19:09 cmjordan42

This issue does not seem to follow the issue template. Make sure you provide all the required information.

google-oss-bot avatar Sep 17 '24 19:09 google-oss-bot

Hey @cmjordan42, thanks for reaching out. I think starting firebase-tools v13.10.0, you can set the value of FUNCTIONS_DISCOVERY_TIMEOUT(see PR #7176) to increase the timeout. Could you give this a try?

Also, let me check with our team to see if we can update the error message to provide a clearer description of what caused the error.

aalej avatar Sep 18 '24 15:09 aalej

Hi @aalej , I appreciate your consideration. I wish I had known about that flag, but I'm happy to just run it on the "local" WSL file system now realizing how much data it is reviewing each time I'm starting the emulator. Mentioning that flag in updated error messages may be worthwhile.

cmjordan42 avatar Sep 20 '24 00:09 cmjordan42

Thanks for the feedback! The error message should be updated by https://github.com/firebase/firebase-tools/pull/8240. The current error message now points to our FAQ docs which provides tips on how to resolve this issue. That said, I'll go ahead and close this.

aalej avatar Jun 04 '25 16:06 aalej