question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

App crashes when opening *Nearby* in a particular scenario

See original GitHub issue

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 ☺️

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:16 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
maskaravivekcommented, May 12, 2018

@sivaraam Please refrain from posting about other issues on a thread that is totally unrelated. It adds to the confusion. 😃

1reaction
ashishkumar468commented, May 10, 2018

@sivaraam The changes have not yet been merged to master, you will have to take a take a pull from branch ashishkumar468:feature/bug_fix_#1504 to verify

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why do my apps keep crashing on Android, How to fix it
How to fix apps that keep crashing on Android · 1. Force stop the app · 2. Restart the device · 3 ....
Read more >
11 common reasons for mobile app crashing | DECODE
Sometimes, they are the result of inadequate app testing, poor memory management, or even device incompatibility. Irrespective of the error ...
Read more >
Unexpected App Crashes on Android and How to Deal with ...
Solution 1: ... An easy and convenient solution would be to check whether our existing app process was killed and recreated when the...
Read more >
The top 6 reasons mobile apps crash: How to best avoid Murphy
Mobile apps can crash for a hundred different reasons. Experts share their thoughts on the primary causes of crashes and how to fix...
Read more >
Why are the apps on my phone crashing and force closing?
In some instances, an app may force close, crash, frequently freeze or stop responding, or generally not work as the app was designed....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found