Skip to content

Crash on React Native 0.76+ due to removed BatchedBridge.registerCallableModule #2

@t3developer

Description

@t3developer

The library crashes on React Native 0.76+ because it calls BatchedBridge.registerCallableModule, which was removed in 0.76.

To Reproduce

  • Add @huddle01/react-native-call-detection to a project on React Native 0.76 or newer (tested on 0.81.5)
  • Import the library
  • Observe a crash with an error like: Cannot read property 'registerCallableModule' of undefined

Root cause
In index.js around line 19:

const BatchedBridge = require('react-native/Libraries/BatchedBridge/BatchedBridge')
BatchedBridge.registerCallableModule('CallStateUpdateActionModule', CallStateUpdateActionModule)

BatchedBridge.registerCallableModule was deprecated and removed in React Native 0.76. The new bridge (JSI/TurboModules) uses different APIs.

Expected behavior
The library should load and run on React Native 0.76+ without using the removed API.

Environment
React Native version: 0.81.5 (and likely any 0.76+)
Platform: iOS and Android

Possible solutions
Use the new bridge APIs (e.g. Turbo Modules or NativeEventEmitter without registerCallableModule) or another supported pattern for native-to-JS communication.

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