react-native-beacons-manager icon indicating copy to clipboard operation
react-native-beacons-manager copied to clipboard

App crashes

Open mishkeTz opened this issue 5 years ago • 6 comments

Version

1.0.7

Platform

Android

OS version

Android 9

Steps to reproduce

  1. Fresh RN project - npx react-native init AwesomeProject

Expected behavior

It should show the beacons and not close the app.

Actual behavior

I have this piece of code in a component

componentDidMount() {
  Beacons.detectIBeacons();
    
    Beacons
    .startRangingBeaconsInRegion('some id', '7b44b47b-52a1-5381-90c2-f09b6838c5d4') // or like  < v1.0.7: .startRangingBeaconsInRegion(identifier, uuid)
    .then(() => console.log('Beacons ranging started succesfully'))
    .catch(error => console.log(`Beacons ranging not started, error: ${error}`));
}

And the app closes (crashes).

mishkeTz avatar Dec 17 '19 20:12 mishkeTz

Hi @mishkeTz, I have resolved the crash with the following code: const region = Platform.select({ ios: { identifier: 'region', uuid: 'YOUR_BEACON_UDID' }, android: { regionId: 'region', beaconsUUID: 'YOUR_BEACON_UDID', } })

But I am getting the error: uniqueid may not be null

Saumyadip-Pramanik avatar Dec 18 '19 07:12 Saumyadip-Pramanik

I had the same issue (dependency problem with rn), look at: #154

mbretter avatar Dec 19 '19 18:12 mbretter

@Saumyadip-Pramanik I'm experiencing the same crash. How did setting your region fix this? Also, what does your call to startRangingBeaconsInRegion look like?

mozart27 avatar Apr 05 '20 22:04 mozart27

Hi all, i hav ethe same problem.... there is any solution?

i use expo 37.0.0 eject with react 0.61.5

but make a crash.... i try to follow every fix but nothing.....

robertobrogi avatar Apr 22 '20 13:04 robertobrogi

Any solution ?? I tried this issue's solution: #154. But didn't work for me.

LucasHdS avatar Jun 28 '20 16:06 LucasHdS

Hello team, I got the solution Please use for android Beacons.startRangingBeaconsInRegion('Estimotes', '8492E75F-4FD6-469D-B132-043FE94921D8')

instead of

const region = { identifier: 'Estimotes', uuid: '8492E75F-4FD6-469D-B132-043FE94921D8' }; await Beacons.startRangingBeaconsInRegion(region)

rohitmodi12 avatar Jul 10 '20 06:07 rohitmodi12