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

nativeScanResults may be null #820

Open
huangkeyuan opened this issue Feb 16, 2023 · 1 comment
Open

nativeScanResults may be null #820

huangkeyuan opened this issue Feb 16, 2023 · 1 comment
Labels
bug Bug that is caused by the library

Comments

@huangkeyuan
Copy link

java.lang.RuntimeException: Unable to start receiver com.polidea.rxandroidble2.sample.example1a_background_scanning.ScanReceiver: java.lang.NullPointerException: Attempt to invoke interface method 'java.util.Iterator java.util.List.iterator()' on a null object reference
at android.app.ActivityThread.handleReceiver(ActivityThread.java:4315)
at android.app.ActivityThread.-$$Nest$mhandleReceiver(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2153)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7872)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'java.util.Iterator java.util.List.iterator()' on a null object reference
at com.polidea.rxandroidble2.internal.scan.BackgroundScannerImpl.onScanResultReceived(BackgroundScannerImpl.java:92)
at com.polidea.rxandroidble2.sample.example1a_background_scanning.ScanReceiver.onReceive(ScanReceiver.java:24)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:4306)
at android.app.ActivityThread.-$$Nest$mhandleReceiver(Unknown Source:0) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2153) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loopOnce(Looper.java:201) 
at android.os.Looper.loop(Looper.java:288) 
at android.app.ActivityThread.main(ActivityThread.java:7872) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936) 

@huangkeyuan huangkeyuan added the bug Bug that is caused by the library label Feb 16, 2023
@huangkeyuan huangkeyuan changed the title nativeScanResults may be empty nativeScanResults may be null Feb 16, 2023
@slarkkk
Copy link

slarkkk commented Apr 22, 2024

Do you resolve it? I'm encountering this issue as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug that is caused by the library
Projects
None yet
Development

No branches or pull requests

2 participants