-
Notifications
You must be signed in to change notification settings - Fork 916
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
Documentation doesn't emphasize Promises don't resolve for offline writes #8862
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
Some further analysis on this: it appears that while in offline mode the setDoc (and updateDoc) functions never This seems to be a bug in the implementation of setDoc and updateDoc when running in offline mode. I can only presume that this is either unsupported in node or I'm doing something else wrong, as surely others would have run into this by now. |
Was able to use this further research to find a comment on #8657 (as well as #6515):
There is no mention of this behavior in the docs, however there is an implied statement here:
This has multiple tickets attached to it and that indicates there is a desperately needed documentation update. Leaving this issue open to drive attention for a documentation change. It's been a few years, people are still running into it, and the issue would be dramatically improved with a section in the Realtime Updates part of the doc emphasizing this idiosyncratic behavior. |
Operating System
macOS Sonoma
Environment (if applicable)
Node v22.5.0
Firebase SDK Version
11.5.0
Firebase SDK Product(s)
Firestore
Project Tooling
Simple mjs files running via the command line.
Detailed Problem Description
I'm attempting to use the offline cache in nodejs to test some behaviors and expectations around conflict resolution.
Calling setDoc and updateDoc while in offline mode causes the process to immediately exit with an exit code of 0.
I'd expect the console.log present after the setDoc to be present.
Steps and code to reproduce issue
offline_test.mjs
:Output:
The text was updated successfully, but these errors were encountered: