v3.5.2
π Bug Fixes
Android: Fix RN 0.81 NPE by providing non-null error code to Promise.reject
This release fixes a critical crash on Android when using React Native 0.81+.
Problem
React Native 0.81's PromiseImpl.reject() now requires a non-null error code parameter. Previously, many code paths in the library called promise.reject(null, ...) which causes a NullPointerException in the native bridge.
Solution
- Added
DEFAULT_ERROR_CODE = "BlePlxError"constant - Replaced all
reject(null, ...)calls withreject(DEFAULT_ERROR_CODE, ...) - Preserved all existing error payloads - only the error code is now non-null
Impact
- Prevents NPE crashes in RN 0.81+ when BLE errors occur
- Unblocks ECG monitoring and other BLE features on Android/Android TV
- No breaking changes - error handling behavior remains the same
π¦ Installation
npm install @sfourdrinier/react-native-ble-plx@3.5.2π References
- PR: #1
- Related: trackourhealth/bun-mono#353