Skip to content

App crashes when opening *Nearby* in a particular scenario #1504

Closed
@sivaraam

Description

@sivaraam

Summary:
Nearby crashes when the phone is connected to a network that is disconnected from the ISP's network. To be more detailed, I use a Wi-Fi enabled data modem with the ability to disconnect the data service. So, when I disconnect the data service and connect the phone to the Wi-Fi network (which isn't connected to the ISP's network) and visit Nearby, the app crashes.

Steps to reproduce:

  1. Connect to a network that isn't connected to the ISP's network in some way (one way is described in the summary)
  2. Open the app
  3. Open Nearby

Add System logs:

D/NearbyPlaces: java.net.ConnectException: failed to connect to query.wikidata.org/192.168.206.84 (port 443): connect failed: ECONNREFUSED (Connection refused)
D/NearbyPlaces: back to initial radius: 1.000000
W/System.err: io.reactivex.exceptions.OnErrorNotImplementedException: Callable returned null
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:74)
W/System.err:     at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.checkTerminated(ObservableObserveOn.java:276)
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:252)
W/System.err:     at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:109)
W/System.err:     at android.os.Handler.handleCallback(Handler.java:739)
W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:95)
W/System.err:     at android.os.Looper.loop(Looper.java:145)
W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:6946)
W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
W/System.err:     at java.lang.reflect.Method.invoke(Method.java:372)
W/System.err:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
W/System.err: Caused by: java.lang.NullPointerException: Callable returned null
W/System.err:     at io.reactivex.internal.functions.ObjectHelper.requireNonNull(ObjectHelper.java:39)
W/System.err:     at io.reactivex.internal.operators.observable.ObservableFromCallable.subscribeActual(ObservableFromCallable.java:42)
W/System.err:     at io.reactivex.Observable.subscribe(Observable.java:10901)
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:452)
W/System.err:     at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:61)
W/System.err:     at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:52)
W/System.err:     at java.util.concurrent.FutureTask.run(FutureTask.java:237)
W/System.err:     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152)
W/System.err:     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265)
W/System.err:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
W/System.err:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
W/System.err:     at java.lang.Thread.run(Thread.java:818)
E/AndroidRuntime: FATAL EXCEPTION: main
                  Process: fr.free.nrw.commons.debug, PID: 16239
                  io.reactivex.exceptions.OnErrorNotImplementedException: Callable returned null
...
I/Process: Sending signal. PID: 16239 SIG: 9

Expected behavior:
Warn about the inability to connect to the network.

Observed behavior:
The app crashes.

Device and Android version:
Device: Samsung Galaxy J2
Android: 5.1.1

Commons app version:
2.7.1

Would you like to work on the issue?
Nope, sorry ☺️

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions