Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[2]' #9

Open
ifeoluwak opened this issue Dec 19, 2019 · 4 comments

Comments

@ifeoluwak
Copy link

I am getting this error on my iOS phone whenever it scans an EID beacon frame.

XCode 11,
"@lg2/react-native-eddystone": "^0.1.5",
"react-native": "0.61.5",

@cmmadnat
Copy link

got the same error here

@SarjuHansaliya
Copy link

I have also faced this issue. I believe its mostly related to iOS 13.

I am using "@lg2/react-native-eddystone": "^0.1.5"

-[Eddystone centralManager:didDiscoverPeripheral:advertisementData:RSSI:] Eddystone.m, line 124

SIGABRT: *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[2]

iOS_stack

affected_devices

@tomhobsonxd
Copy link

Hi, im looking at this project currently, did anyone get a fix to this? thanks

@tomhobsonxd
Copy link

tomhobsonxd commented May 19, 2022

I fixed the issue. The issue arrises when beacon.txPower (object[2]) or beacon.rssi (object[3]) is null.

To fix this, in Eddystone.m (within the pod) update line 127 and 128 from:
@"txPower": beacon.txPower, @"rssi": beacon.rssi;

to this:
[NSString stringWithFormat:@"%@", beacon.txPower], [NSString stringWithFormat:@"%@", beacon.rssi]

Alternatively

I added an if statement to catch nulls and this worked also

just wrap that whole send event with

if (beacon.txPower != NULL && beacon.rssi != NULL)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants