Skip to content

V9 Realtime Database listener stops listening after transaction #5195

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

Closed
jhuleatt opened this issue Jul 23, 2021 · 2 comments · Fixed by #5205
Closed

V9 Realtime Database listener stops listening after transaction #5195

jhuleatt opened this issue Jul 23, 2021 · 2 comments · Fixed by #5205
Assignees
Milestone

Comments

@jhuleatt
Copy link
Contributor

[REQUIRED] Describe your environment

  • Operating System version: macOS Big Sur
  • Browser version: Chrome 91.0.4472.164
  • Firebase SDK version: 9.0.0-beta.6
  • Firebase Product: database

[REQUIRED] Describe the problem

The onValue listener stops listening for new values on a reference after a transaction.

Steps to reproduce:

Runnable repro is available in codesandbox: https://codesandbox.io/s/rtdb-transaction-update-repro-6u0qt?file=/src/index.ts

  1. Click the "SET" Increment button a few times. The number next to Current value from RTDB is: will change as expected.
  2. Click the "TRANSACTION" Increment button a few times. The number next to Current value from RTDB is: will stop updating ⚠️
  3. Check the console logs. You'll see that every transaction completed successfully.
  4. Click the "SET" Increment button again. The number next to Current value from RTDB is: still won't update.
  5. Refresh the page. The number next to Current value from RTDB is: will be significantly higher from all of your previous clicks, proving that the transactions worked.
@Feiyang1 Feiyang1 added the v9 label Jul 23, 2021
@Feiyang1 Feiyang1 added this to the v9 GA milestone Jul 23, 2021
jhuleatt added a commit to FirebaseExtended/reactfire that referenced this issue Jul 26, 2021
@schmidt-sebastian
Copy link
Contributor

Thanks for the repro. I started looking at this and will report back in a bit.

@schmidt-sebastian
Copy link
Contributor

Fix pending. Thanks for catching this. This was a bug in our listener unregistration.

@firebase firebase locked and limited conversation to collaborators Aug 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants