-
Notifications
You must be signed in to change notification settings - Fork 929
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
Incompatible with firebase-functions 6.0: TypeError when starting emulator #7637
Comments
have the same issue migrating from v1 to v2. Downgrading firebase-functions 5.0 worked for me |
I encountered the same issue with firebase-tools version 13.17.0. Like others, downgrading to firebase-functions version 5.x resolved the issue for me as well. |
Hey folks, sorry to hear you encountered this issue, and thanks @0xDing for providing a detailed report! I’m able to reproduce this, let me raise this to our engineering team so they can take a look and investigate. I’ll mark this issue as reproducible. |
Having this issue also, would love some resolution. I love firebase but.... the number of issues working with it are becoming insurmountable. |
Same here. Please resolve it. |
Also waiting |
Downgrading isn't really a solution, as the issue specifically comes from upgrading to v6. The goal is to resolve the problem in v6, not avoid it by reverting to an older version. |
* Export 'app' in v2 entrypoint. Fixes firebase/firebase-tools#7637. * Add changelog. * Add comment
Just released 6.0.1 which should address the reported issue. Please give it a try and let us know! |
Thank you for the update! I tested it with firebase-functions version 6.0.1, and the issue seems to be resolved in my environment as well. |
Thanks for confirming @BostonTerrier-Bon! I'll go ahead and close this issue, if anyone still encounters this in the future, please leave a comment so that we can re-open. |
[REQUIRED] Environment info
firebase-tools: 13.16.0
Platform: macOS
[REQUIRED] Test case
[REQUIRED] Steps to reproduce
[REQUIRED] Expected behavior
The Firebase emulator should start successfully and the Cloud Function should be available for testing.
[REQUIRED] Actual behavior
The emulator fails to start, throwing the following error:
It appears that firebase-tools is not compatible with the latest firebase-functions 6.0. The error suggests that setEmulatedAdminApp is being called on an undefined object, which is likely due to changes in the structure of firebase-functions 6.0.
The issue seems to be related to the fact that setEmulatedAdminApp is specific to firebase-functions/v1, while version 6.0 defaults to v2 of Cloud Functions. For v1 functionality, it now requires a separate import from "firebase-functions/v1".
Additional context
This incompatibility is preventing developers from using the latest version of firebase-functions with the current firebase-tools. A potential workaround might be to explicitly import from "firebase-functions/v1" when using v1 features, but this doesn't solve the underlying compatibility issue with firebase-tools.
It would be greatly appreciated if the Firebase team could investigate this compatibility issue and provide guidance on how to use firebase-tools with firebase-functions 6.0, or update firebase-tools to properly support the new version structure of firebase-functions.
The text was updated successfully, but these errors were encountered: