Skip to content

Invariant Violation: Native module cannot be null #3

@empireofryan

Description

@empireofryan

First, thanks for contributing to the up-to-date development of BLE devices, particularly with React Native which makes development all the more accessable for full-stack engineers like myself.

After cloning the SensorTag sample repo, I can't get past the above following error on running the build, which succeeds, but the simulator shows a red screen:
image

Seems like the error is related to BleManager, which appears on the next error, line 39 of App.js componentDidMount. It's where a new instance of BleManager is instantiated via const manager = new BleManager();. This is after running yarn and in another folding trying with npm install. I then try to run with react-native run-ios. Of note, I had to run react-native upgrade to get over a prior error. I also ran react-native link react-native-ble-plx afterwards just to make sure that was not the issue.

I'm on XCode 10, running the default yarn/package.json bundled within the file.

Any advice is extremely appreciated!

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