-
Notifications
You must be signed in to change notification settings - Fork 938
setDoc fails to resolve after page refresh #9038
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
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
Hi @builtbyjavi , Could you please provide the debug log when the |
Hey @builtbyjavi. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
@cherylEnkidu here are the logs as requested. The relevant logs in this case are those regarding This is the log file without the workaround that fails to write data to the This is the log file with the workaround timeout that successfully writes data to the |
hi @cherylEnkidu just checking in, any updates on this? |
Uh oh!
There was an error while loading. Please reload this page.
Operating System
Windows 11
Environment (if applicable)
node: 22, next: 12.3.4
Firebase SDK Version
11.7.1
Firebase SDK Product(s)
Firestore
Project Tooling
React / Typescript
Detailed Problem Description
I am trying to set data in Firestore based on a unique identifier in the url. I have a React hook that listens to Next.js
Router.events
and calls an update callback function onrouteChangeComplete
. When I navigate through my app, the related data I need is correctly added to Firestore; however, when I refresh the page thesetDoc
function hangs (i.e. the following line is never executed). I currently have a hacky workaround by introducing a small timeout aroundsetDoc
and I am really not sure why this works? Emphasis on this only happening when I refresh the page.Steps and code to reproduce issue
The text was updated successfully, but these errors were encountered: