Back to Blog
mobile
3 min read

Render Error: Cannot read property 'createClient' of null

Faced some issues tinkering with React Native's BLE library and trying to get it to work.

Tang Yetong
Tang Yetong
Full Stack Developer and former Data Analyst Intern at Fivetran with a background in government digital services and blockchain technology.

Faced some issues tinkering with React Native's BLE library and trying to get it to work. Was following this repo and was faced with Render Error: Cannot read property 'createClient' of null while trying to load the app on Expo Go.

The app seems to be crashing on the line: new BleManager(), but loading the app on emulator works fine and crashes on Expo Go. Weird!

Development Server

  1. After playing around I finally got BleManager() to stop crashing after setting up the project to use a development build by running
expo prebuild
  1. Create a development build like so:
npx eas build --profile development
  1. Scan the QR, install the app on your phone and open it. Then you will need to run the dev server for your development build:
yarn start --dev-client

The server should appear on the development build on your phone and then you can run your mobile app.

Tags

React Native
BLE
Expo
Debugging
Tang Yetong

Tang Yetong

Full Stack Developer and former Data Analyst Intern at Fivetran with a background in government digital services and blockchain technology.