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

java.lang.IllegalArgumentException: Paramater specified as non-null is null #23

Open
bonesyblue opened this issue Sep 10, 2020 · 0 comments

Comments

@bonesyblue
Copy link

Hi Espressif 👋🏼 I receive the following stack trace, when attempting to perform a connect with the BlufiClient class. In both cases, a new client instance is created and the callback onServicesDiscovered is invocated.

Stack trace:

D/AndroidRuntime(21812): Shutting down VM
E/AndroidRuntime(21812): FATAL EXCEPTION: main
E/AndroidRuntime(21812): Process: com.example.severin_smart_control, PID: 21812
E/AndroidRuntime(21812): java.lang.IllegalArgumentException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter service
E/AndroidRuntime(21812): 	at de.nuuk.severin.ebbq.severin_ebbq_plugin.SeverinEbbqPlugin$BlufiCallbackMain.onGattPrepared(Unknown Source:12)
E/AndroidRuntime(21812): 	at blufi.espressif.BlufiClientImpl$InnerGattCallback.lambda$onServicesDiscovered$0$BlufiClientImpl$InnerGattCallback(BlufiClientImpl.java:1210)
E/AndroidRuntime(21812): 	at blufi.espressif.-$$Lambda$BlufiClientImpl$InnerGattCallback$qPjo5mhKgJ_bnJKk3XqrSwssJ8o.run(Unknown Source:10)
E/AndroidRuntime(21812): 	at android.os.Handler.handleCallback(Handler.java:873)
E/AndroidRuntime(21812): 	at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(21812): 	at android.os.Looper.loop(Looper.java:193)
E/AndroidRuntime(21812): 	at android.app.ActivityThread.main(ActivityThread.java:6718)
E/AndroidRuntime(21812): 	at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(21812): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
E/AndroidRuntime(21812): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

From what I understand reading the BlufiClientImpl.java file, getService is potentially returning null and this is not checked before being provided as an argument to onGattPrepared.

service = gatt.getService(BlufiParameter.UUID_SERVICE);

I would be very grateful for your feedback on this issue!

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

1 participant