Critical NullPointerException on BLE Transmit – GATT status 10 & 133 – Application crashes immediately

Hello everyone,

I am experiencing a critical issue with the Bluetooth Low Energy (BLE) component in Thunkable that is causing my app to crash immediately upon sending commands. Everything was working perfectly a few days ago, but now the app has become completely unstable without any changes to the logic.

The Problem: When I call the Transmit Byte Array block, the application crashes and displays a “Critical Error Occurred” screen. Looking at the detailed Android logs, I see two recurring scenarios:

  1. GATT Status 10 (GATT_NOT_FOUND): The log shows BleGattCharacteristicException: GATT exception from MAC='XX:XX:XX...', status 10 (GATT_NOT_FOUND), type BleGattOperation{description='CHARACTERISTIC_WRITE'}.

  2. GATT Status 133: Occasionally, I get a status 133 error before the crash.

  3. Internal Crash: Both scenarios lead to a java.lang.NullPointerException at com.facebook.react.bridge.PromiseImpl.reject. It seems the BLE library fails to handle the GATT error and passes a null parameter, which crashes the React Native bridge.

Technical Details:

  • Hardware: STM32 microcontroller with an HM-10 (CC2541) Bluetooth module.

  • Firmware: The C code handles UART commands (ASCII ‘C’, ‘6’, ‘X’) and is confirmed working via a PC terminal.

  • Thunkable Blocks: I am using Connect to Device, waiting for discovery, and then calling Transmit Byte Array using the standard UUID 0000ffe1-0000-1000-8000-00805f9b34fb.

  • Issue: Even if the device status is “Connected”, the moment I try to write a characteristic, the app terminates.

What I’ve Tried:

  • Verified the Characteristic UUID matches the hardware (FFE1).

  • Added delays (up to 5 seconds) between connection and transmission to allow for Service Discovery.

  • Cleared Bluetooth cache and restarted the Android device.

  • Tried removing the “Subscribe” block to minimize GATT operations.

Since the hardware logic (RNG, timers, and UART state machine) is fully functional on the microcontroller side, this appears to be a bug in the Thunkable BLE implementation or the underlying com.polidea.rxandroidble2 library.

Has anyone encountered this PromiseImpl.reject NullPointerException recently? Is there a workaround to prevent the app from crashing when a GATT error occurs?

Thank you for your help!

Hi @mrlynx0730wsur
I have flagged it to our engineering team and will provide an update as soon as possible.

Thank you again for alerting us to this issue and for your time and patience while we work to resolve it.