RoMote icon indicating copy to clipboard operation
RoMote copied to clipboard

ArrayIndexOutOfBoundsException when scanning for Rokus on network

Open skylarmt opened this issue 1 year ago • 3 comments
trafficstars

Latest version crashes while discovering devices. I suspect Roku did something, because it doesn't crash unless it's on my home WiFi and can see my Roku stick.

skylarmt avatar Apr 09 '24 10:04 skylarmt

Hi @skylarmt, are you able to post a stacktrace by any chance? I'm unable to reproduce this issue on my phone.

wseemann avatar Aug 27 '24 08:08 wseemann

Here's the output from adb logcat when I open the app:

W System.err: io.reactivex.exceptions.OnErrorNotImplementedException: The exception was not handled due to missing onError handler in the subscribe() method call. Further reading: https://github.com/ReactiveX/RxJava/wiki/Error-Handling | java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
W System.err:    at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:704)
W System.err:    at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:701)
W System.err:    at io.reactivex.internal.observers.LambdaObserver.onError(LambdaObserver.java:77)
W System.err:    at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.checkTerminated(ObservableObserveOn.java:281)
W System.err:    at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal(ObservableObserveOn.java:172)
W System.err:    at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(ObservableObserveOn.java:255)
W System.err:    at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:124)
W System.err:    at android.os.Handler.handleCallback(Handler.java:959)
W System.err:    at android.os.Handler.dispatchMessage(Handler.java:100)
W System.err:    at android.os.Looper.loopOnce(Looper.java:232)
W System.err:    at android.os.Looper.loop(Looper.java:317)
W System.err:    at android.app.ActivityThread.main(ActivityThread.java:8592)
W System.err:    at java.lang.reflect.Method.invoke(Native Method)
W System.err:    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
W System.err:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
W System.err: Caused by: java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
W System.err:    at com.jaku.core.DiscoveryRequest.scanForRoku(DiscoveryRequest.java:74)
W System.err:    at com.jaku.core.DiscoveryRequest.scanForAllRokus(DiscoveryRequest.java:86)
W System.err:    at com.jaku.core.DiscoveryRequest.send(DiscoveryRequest.java:27)
W System.err:    at com.jaku.core.JakuRequest.send(JakuRequest.java:33)
W System.err:    at com.jaku.api.DeviceRequests.discoverDevices(DeviceRequests.java:19)
W System.err:    at wseemann.media.romote.tasks.AvailableDevicesTask.call(AvailableDevicesTask.java:54)
W System.err:    at wseemann.media.romote.tasks.AvailableDevicesTask.call(AvailableDevicesTask.java:19)
W System.err:    at io.reactivex.internal.operators.observable.ObservableFromCallable.subscribeActual(ObservableFromCallable.java:43)
W System.err:    at io.reactivex.Observable.subscribe(Observable.java:12284)
W System.err:    at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
W System.err:    at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:578)
W System.err:    at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
W System.err:    at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
W System.err:    at java.util.concurrent.FutureTask.run(FutureTask.java:264)
W System.err:    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307)
W System.err:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
W System.err:    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
W System.err:    at java.lang.Thread.run(Thread.java:1012)
E AndroidRuntime: FATAL EXCEPTION: main
E AndroidRuntime: Process: wseemann.media.romote, PID: 27811
E AndroidRuntime: io.reactivex.exceptions.OnErrorNotImplementedException: The exception was not handled due to missing onError handler in the subscribe() method call. Further reading: https://github.com/ReactiveX/RxJava/wiki/Error-Handling | java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
E AndroidRuntime:        at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:704)
E AndroidRuntime:        at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:701)
E AndroidRuntime:        at io.reactivex.internal.observers.LambdaObserver.onError(LambdaObserver.java:77)
E AndroidRuntime:        at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.checkTerminated(ObservableObserveOn.java:281)
E AndroidRuntime:        at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal(ObservableObserveOn.java:172)
E AndroidRuntime:        at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(ObservableObserveOn.java:255)
E AndroidRuntime:        at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:124)
E AndroidRuntime:        at android.os.Handler.handleCallback(Handler.java:959)
E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:100)
E AndroidRuntime:        at android.os.Looper.loopOnce(Looper.java:232)
E AndroidRuntime:        at android.os.Looper.loop(Looper.java:317)
E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:8592)
E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
E AndroidRuntime:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
E AndroidRuntime: Caused by: java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
E AndroidRuntime:        at com.jaku.core.DiscoveryRequest.scanForRoku(DiscoveryRequest.java:74)
E AndroidRuntime:        at com.jaku.core.DiscoveryRequest.scanForAllRokus(DiscoveryRequest.java:86)
E AndroidRuntime:        at com.jaku.core.DiscoveryRequest.send(DiscoveryRequest.java:27)
E AndroidRuntime:        at com.jaku.core.JakuRequest.send(JakuRequest.java:33)
E AndroidRuntime:        at com.jaku.api.DeviceRequests.discoverDevices(DeviceRequests.java:19)
E AndroidRuntime:        at wseemann.media.romote.tasks.AvailableDevicesTask.call(AvailableDevicesTask.java:54)
E AndroidRuntime:        at wseemann.media.romote.tasks.AvailableDevicesTask.call(AvailableDevicesTask.java:19)
E AndroidRuntime:        at io.reactivex.internal.operators.observable.ObservableFromCallable.subscribeActual(ObservableFromCallable.java:43)
E AndroidRuntime:        at io.reactivex.Observable.subscribe(Observable.java:12284)
E AndroidRuntime:        at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
E AndroidRuntime:        at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:578)
E AndroidRuntime:        at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
E AndroidRuntime:        at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
E AndroidRuntime:        at java.util.concurrent.FutureTask.run(FutureTask.java:264)
E AndroidRuntime:        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307)
E AndroidRuntime:        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
E AndroidRuntime:        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
E AndroidRuntime:        at java.lang.Thread.run(Thread.java:1012)
W ActivityTaskManager:   Force finishing activity wseemann.media.romote/.activity.ConfigureDeviceActivity

skylarmt avatar Aug 29 '24 05:08 skylarmt

Just updated to 1.0.26, same error, different line numbers:

W System.err: io.reactivex.exceptions.OnErrorNotImplementedException: The exception was not handled due to missing onError handler in the subscribe() method call. Further reading: https://github.com/ReactiveX/RxJava/wiki/Error-Handling | java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
W System.err:    at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:704)
W System.err:    at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:701)
W System.err:    at io.reactivex.internal.observers.LambdaObserver.onError(LambdaObserver.java:77)
W System.err:    at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.checkTerminated(ObservableObserveOn.java:281)
W System.err:    at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal(ObservableObserveOn.java:172)
W System.err:    at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(ObservableObserveOn.java:255)
W System.err:    at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:124)
W System.err:    at android.os.Handler.handleCallback(Handler.java:959)
W System.err:    at android.os.Handler.dispatchMessage(Handler.java:100)
W System.err:    at android.os.Looper.loopOnce(Looper.java:232)
W System.err:    at android.os.Looper.loop(Looper.java:317)
W System.err:    at android.app.ActivityThread.main(ActivityThread.java:8592)
W System.err:    at java.lang.reflect.Method.invoke(Native Method)
W System.err:    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
W System.err:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
W System.err: Caused by: java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
W System.err:    at com.wseemann.ecp.core.DiscoveryRequest.scanForRoku(DiscoveryRequest.java:62)
W System.err:    at com.wseemann.ecp.core.DiscoveryRequest.scanForAllRokus(DiscoveryRequest.java:71)
W System.err:    at com.wseemann.ecp.core.DiscoveryRequest.send(DiscoveryRequest.java:21)
W System.err:    at com.wseemann.ecp.core.ECPRequest.send(ECPRequest.kt:34)
W System.err:    at com.wseemann.ecp.api.DeviceRequests.discoverDevices(DeviceRequests.java:17)
W System.err:    at wseemann.media.romote.tasks.AvailableDevicesTask.call(AvailableDevicesTask.java:55)
W System.err:    at wseemann.media.romote.tasks.AvailableDevicesTask.call(AvailableDevicesTask.java:20)
W System.err:    at io.reactivex.internal.operators.observable.ObservableFromCallable.subscribeActual(ObservableFromCallable.java:43)
W System.err:    at io.reactivex.Observable.subscribe(Observable.java:12284)
W System.err:    at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
W System.err:    at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:578)
W System.err:    at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
W System.err:    at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
W System.err:    at java.util.concurrent.FutureTask.run(FutureTask.java:264)
W System.err:    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307)
W System.err:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
W System.err:    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
W System.err:    at java.lang.Thread.run(Thread.java:1012)
E AndroidRuntime: FATAL EXCEPTION: main
E AndroidRuntime: Process: wseemann.media.romote, PID: 28646
E AndroidRuntime: io.reactivex.exceptions.OnErrorNotImplementedException: The exception was not handled due to missing onError handler in the subscribe() method call. Further reading: https://github.com/ReactiveX/RxJava/wiki/Error-Handling | java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
E AndroidRuntime:        at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:704)
E AndroidRuntime:        at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:701)
E AndroidRuntime:        at io.reactivex.internal.observers.LambdaObserver.onError(LambdaObserver.java:77)
E AndroidRuntime:        at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.checkTerminated(ObservableObserveOn.java:281)
E AndroidRuntime:        at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal(ObservableObserveOn.java:172)
E AndroidRuntime:        at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(ObservableObserveOn.java:255)
E AndroidRuntime:        at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:124)
E AndroidRuntime:        at android.os.Handler.handleCallback(Handler.java:959)
E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:100)
E AndroidRuntime:        at android.os.Looper.loopOnce(Looper.java:232)
E AndroidRuntime:        at android.os.Looper.loop(Looper.java:317)
E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:8592)
E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
E AndroidRuntime:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
E AndroidRuntime: Caused by: java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
E AndroidRuntime:        at com.wseemann.ecp.core.DiscoveryRequest.scanForRoku(DiscoveryRequest.java:62)
E AndroidRuntime:        at com.wseemann.ecp.core.DiscoveryRequest.scanForAllRokus(DiscoveryRequest.java:71)
E AndroidRuntime:        at com.wseemann.ecp.core.DiscoveryRequest.send(DiscoveryRequest.java:21)
E AndroidRuntime:        at com.wseemann.ecp.core.ECPRequest.send(ECPRequest.kt:34)
E AndroidRuntime:        at com.wseemann.ecp.api.DeviceRequests.discoverDevices(DeviceRequests.java:17)
E AndroidRuntime:        at wseemann.media.romote.tasks.AvailableDevicesTask.call(AvailableDevicesTask.java:55)
E AndroidRuntime:        at wseemann.media.romote.tasks.AvailableDevicesTask.call(AvailableDevicesTask.java:20)
E AndroidRuntime:        at io.reactivex.internal.operators.observable.ObservableFromCallable.subscribeActual(ObservableFromCallable.java:43)
E AndroidRuntime:        at io.reactivex.Observable.subscribe(Observable.java:12284)
E AndroidRuntime:        at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
E AndroidRuntime:        at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:578)
E AndroidRuntime:        at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
E AndroidRuntime:        at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
E AndroidRuntime:        at java.util.concurrent.FutureTask.run(FutureTask.java:264)
E AndroidRuntime:        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307)
E AndroidRuntime:        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
E AndroidRuntime:        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
E AndroidRuntime:        at java.lang.Thread.run(Thread.java:1012)
W ActivityTaskManager:   Force finishing activity wseemann.media.romote/.activity.ConfigureDeviceActivity

skylarmt avatar Aug 29 '24 05:08 skylarmt