-
Notifications
You must be signed in to change notification settings - Fork 928
Firebase v9 setDoc() doesn't resolve or reject when using emulator #5436
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
Comments
@theryan722 see #5402 |
@schmidt-sebastian this seems to be a duplicate of #5402 . Assigning to you as you're looking into that. |
@theryan722 Can you share your entire code snippet leading up the call? It would also be helpful if you share debug logs (via |
Hey @schmidt-sebastian, here's the code before the try catch:
|
I am not able to reproduce. I see "not running after" printed in both Node and in the browser. I will need debug logs to investigate further. |
It only happens if I use the emulator suite, not when connected to the actual firebase project. |
Can you try to see if this has in fact been fixed by #5434? You can try by installing |
Jus tried it, the issue is still there for me :( None of the other workarounds worked either, such as the user who suggested adding a delay after the auth or using long polling. Could it be an issue with the firestore emulator? Everything works fine with I don't use the emulator. |
I am not able to reproduce even with the Emulator. It would really help if you shared the Console logs that you can obtain by calling |
Nothing logs to the console even with I've tested now with firebase version 9.0.2, and across macOS and Windows. |
Oh sorry. It should be |
Gotcha, I set both firebase and firestore log levels to debug. I have attached the resulting file of a fresh page load, with testing of setDoc() and some others. |
Thank you for sending these logs. The SDKs seems to function normally, but we do not receive a response from the Emulator when we try to set the document. That caused the Assigning this to firebase-tools. |
Thank you @schmidt-sebastian ! |
@theryan722 Would you mind grabbing the logs from the Firestore Emulator? It should be in |
Hey @yuchenshi Here is the log file: |
The logs indicate some issues related to function triggers -- please double check the match expressions in your triggers (e.g. When in doubt, disable the functions emulator temporarily with |
Hey, so I corrected the bracket, but was still having issues. I then also upgraded from 9.0.2-2021891633 to the 9.0.2, and it worked with the corrected brackets in the expressions. Thank you so much! This was driving me crazy, |
[REQUIRED] Describe your environment
[REQUIRED] Describe the problem
Calling setDoc() when testing local using the emulator writes the document, but the function neither resolves or rejects. I've tried wrapping setDoc() in a try/catch block, no errors.
I can read documents fine and other tasks, but writing is what doesn't resolve.
Eventually, if I leave the page open long enough, I get this error:

and than this warning:

Steps to reproduce:
Use the new modular v9 api for firestore with the local emulator suite, and write to a document (existing or non-existing) using setDoc().
Relevant Code:
The text was updated successfully, but these errors were encountered: