12

I am an iOS developer venturing into Android dfor the first time using React-native.

I am creating a react-native app that uses bluetooth-le, using polidieas react-native-ble-plx library. iOS app works fine, bluetooth scans and detecgts devices. When i run on Android, it starts to scan and I receive an error "FabricViewStateManager: setState called without a StateWrapper" and cannot find any documentation or help for this error statement.

Two questions:

  1. has anyone seen this error reported when running React-Native Apps on Anmdroid: FabricViewStateManager: setState called without a StateWrapper.

  2. Does anyone have any thoughts on how to isolate where the error is occurring?

Here is the console right before the error:

I/BluetoothAdapter: STATE_ON
I/BluetoothAdapter: STATE_ON
I/BluetoothAdapter: STATE_ON
I/BluetoothAdapter: STATE_ON
D/BluetoothLeScanner: Start Scan with callback
D/BluetoothLeScanner: onScannerRegistered() - status=0 scannerId=13 mScannerId=0
I/ReactNative: [GESTURE HANDLER] Initialize gesture handler for root view com.facebook.react.ReactRootView{67ef486 V.E...... ......ID 0,0-1080,2019 #1}
**E/unknown:FabricViewStateManager: setState called without a StateWrapper**
I/ReactNativeJS: ┐ %c action %cCHANGE_STATUS %c@ 20:36:54.384
I/ReactNativeJS: │ '%c prev state', 'color: #9E9E9E; font-weight: bold', { BLEs: 
       { BLEList: [],
         color: '#800080',
         oldColor: '#000000',
         intensity: 127,
         connectedDevice: {},
         status: 'disconnected' } }
    │ '%c action    ', 'color: #03A9F4; font-weight: bold', { type: 'CHANGE_STATUS', status: 'Scanning' }
I/ReactNativeJS: │ '%c next state', 'color: #4CAF50; font-weight: bold', { BLEs: 
       { BLEList: [],
         color: '#800080',
         oldColor: '#000000',
         intensity: 127,
         connectedDevice: {},
         status: 'Scanning' } }
    ┘ 
    ┐ %c action %cADD_BLE %c@ 20:36:54.391
I/ReactNativeJS: │ '%c prev state', 'color: #9E9E9E; font-weight: bold', { BLEs: 
       { BLEList: [],
         color: '#800080',
         oldColor: '#000000',
         intensity: 127,
         connectedDevice: {},
         status: 'Scanning' } }
I/ReactNativeJS: │ '%c action    ', 'color: #03A9F4; font-weight: bold', { type: 'ADD_BLE',
      device: 
Bob O
  • 121
  • 1
  • 4

1 Answers1

2

To my knowledge there is no answer for this yet. See this issue posted against the facebook/react-native project in GitHub: https://github.com/facebook/react-native/issues/32070.

It may have something to do with react-native-reanimated, if you're using it, which has been the cause of some cryptic crashes with the latest version of RN (see here and here, for example). They've apparently resolved the issues in the recent 2.2.2 release (on 14 SEP 21) and their 2.3.0-alpha.

jetsetter
  • 517
  • 5
  • 19