-
Notifications
You must be signed in to change notification settings - Fork 980
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
withAuthContext firestore functions cause error in emulator #7037
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
This could also be an issue for firebase tools. Not sure. If so let me know and will raise it there. |
I get the same error, despite importing the trigger like this: import { onDocumentWrittenWithAuthContext } from 'firebase-functions/v2/firestore' I get the following error
For some reason it is trying to use Google Cloud Firestore triggers instead of Firebase Functions Firestore triggers despite the fact it's how it's been imported. And I can confirm this is definitely an emulator problem only, the function otherwise deploys fine. |
Hi all, I've flagged the issue to the Firestore team and we should have support for the new auth context event types in the next release. Will update this thread once we've released support. Thanks for your patience! |
Any news on the timeline for this? |
@Bullfrog1234 This is in the works, we discovered some issues with our initial implementation that we're currently addressing. Unfortunately, due to upcoming code freezes for Google I/O, this will probably be a few more weeks we're able to ship it. |
@joehan Thanks for the update and understood about code freeze. |
Would be great if you can put a note about it in the docs in the meantime, to save people's time :) |
Is there an ETA for when a release will be out? My use-case for wanting this support is I want to write unit tests for the functions that use Firebase Emulator (e.g. |
Are there any suggested alternatives for the time being? |
Same issue here using |
Hi @joehan, I assume the code freeze is completed, so I am wishing for an update on this. If the timeline is greater than 2 weeks from today can we follow @Seanitzel suggestion and add a note to the documentation. This will inform uses that this is not working in the emulators until it is fixed. |
Hi @Bullfrog1234, I still have the same issue once I add a new function that uses When I run the emulators I see in the logs that firestore emulator is downgraded from 1.19.7 back to 1.19.6 which doesn't have a fix.
UPD: Resolved by updating |
Related issues
No related issues found.
The capability was added through the firebase/firebase-functions#1519
[REQUIRED] Version info
node: v20.11.0
firebase-functions: v4.9.0
firebase-tools: v13.7.2
firebase-admin: v12.0.0
[REQUIRED] Test case
onDocumentCreatedWithAuthContext
The error returned from firebase-tools is:
Inspecting the java error shows the issue:
[REQUIRED] Steps to reproduce
As above
[REQUIRED] Expected behavior
Either:
[REQUIRED] Actual behavior
Errors are returned on emulator start. Have to disable new functions to get emulators to run.
Were you able to successfully deploy your functions?
Not relevant to this error as it relates to the emulators
The text was updated successfully, but these errors were encountered: