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

NullPointerException - Nearable packet parsing error #163

Closed
kamilwlf opened this issue Aug 17, 2016 · 2 comments
Closed

NullPointerException - Nearable packet parsing error #163

kamilwlf opened this issue Aug 17, 2016 · 2 comments

Comments

@kamilwlf
Copy link

kamilwlf commented Aug 17, 2016

Sometimes I see this in logs. Should I care?

D/BluetoothLeScanner: onClientRegistered() - status=0 clientIf=6
08-17 11:24:52.321 19393-19497/E/EstimoteSDK: com.estimote.sdk.service.BeaconService$6.onLeScan:994 Nearable packet parsing error
java.lang.NullPointerException: You need to initialize SDK first. EstimoteSDK.initialize(applicationContext, appId, appToken)
at com.estimote.sdk.internal.Preconditions.checkNotNull(Preconditions.java:21)
at com.estimote.sdk.cloud.internal.InternalEstimoteCloud.getInstance(InternalEstimoteCloud.java:71)
at com.estimote.sdk.service.internal.NearableResolver$1.load(NearableResolver.java:28)
at com.estimote.sdk.service.internal.NearableResolver$1.load(NearableResolver.java:25)
at com.estimote.sdk.internal.utils.AsyncCache.get(AsyncCache.java:155)
at com.estimote.sdk.service.internal.NearableResolver.tryToResolve(NearableResolver.java:47)
at com.estimote.sdk.service.BeaconService$6.onLeScan(BeaconService.java:983)
at com.estimote.sdk.service.BeaconService$3$1.run(BeaconService.java:404)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)

U use 'com.estimote:sdk:0.11.0@aar'

@pawelDylag
Copy link
Contributor

Hello @kamilwlf

Well, this doesn't affect anything. This log is posted when our SDK is trying to resolve your owned nearables in your area. But it can not do that because you haven't initialized your sdk with proper app id and app token.
Anyway thanks for reporting that - we will remove this log in next release, so it won't bother you anymore :)

@maass-bezirk
Copy link

I was originally using Android SDK version 0.10.4 because that's what the setup tutorial uses (http://developer.estimote.com/android/tutorial/part-1-setting-up/). All I am using is nearable discovery, thus I add a nearable listener and start discovery. This works just fine with 0.10.4.

I saw today that there is a version 0.11.0, thus I decided to try it. I started getting the exact same exception as in the op. I assume this exception is because the SDK is trying to look up the nearable type in the cloud but I didn't initialize the SDK (because I don't want the cloud). Fine, just set the type to UNKOWN. Having said that, there does seem to be an effect: the SDK no longer discovers any nearables. Weirdly, it still calls the nearable listener, but with an empty list.

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

3 participants