Skip to content

Offline Transactions broken on React Native #1013

@gergesh

Description

@gergesh
  • I've validated the bug against the latest version of DB packages

Describe the bug
Using offline transactions on React Native / Expo apps fails due to calls to window.addEventListener that attempt to watch the network state in OnlineDetector (and possibly other places too).
It seems that while window is defined, addEventListener is not.

Expected behavior
Check if addEventListener is defined; fallback to Expo's Network.addNetworkStateListener or the RN equivalent on mobile

Smartphone (please complete the following information):

  • Device: iOS Emulator
  • Version: Expo 54

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions