Skip to content

V9 Realtime Database listener stops listening after transaction #5195

@jhuleatt

Description

@jhuleatt

[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.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions