Closed linuxct closed 7 years ago
Hmm, I'll look into it. Thanks Sergio!
@sergiocastell test this build and let me know if it helps with the crash
@MSF-Jarvis Nop, still crashes (now in a boolean)
11-24 22:52:53.054 9523 9523 E AndroidRuntime: FATAL EXCEPTION: main
11-24 22:52:53.054 9523 9523 E AndroidRuntime: Process: rom.stalker, PID: 9523
11-24 22:52:53.054 9523 9523 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{rom.stalker/browser.afh.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.net.NetworkInfo.isConnectedOrConnecting()' on a null object reference
11-24 22:52:53.054 9523 9523 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2458)
11-24 22:52:53.054 9523 9523 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2518)
11-24 22:52:53.054 9523 9523 E AndroidRuntime: at android.app.ActivityThread.-wrap11(ActivityThread.java)
11-24 22:52:53.054 9523 9523 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1345)
11-24 22:52:53.054 9523 9523 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:104)
11-24 22:52:53.054 9523 9523 E AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
11-24 22:52:53.054 9523 9523 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5460)
11-24 22:52:53.054 9523 9523 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
11-24 22:52:53.054 9523 9523 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
11-24 22:52:53.054 9523 9523 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
11-24 22:52:53.054 9523 9523 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.net.NetworkInfo.isConnectedOrConnecting()' on a null object reference
11-24 22:52:53.054 9523 9523 E AndroidRuntime: at browser.afh.MainActivity.checkIfMobileData(MainActivity.java:177)
11-24 22:52:53.054 9523 9523 E AndroidRuntime: at browser.afh.MainActivity.onCreate(MainActivity.java:103)
11-24 22:52:53.054 9523 9523 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:6237)
11-24 22:52:53.054 9523 9523 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
11-24 22:52:53.054 9523 9523 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2411)
11-24 22:52:53.054 9523 9523 E AndroidRuntime: ... 9 more
11-24 22:52:53.055 683 1284 W ActivityManager: Force finishing activity rom.stalker/browser.afh.MainActivity
it's the same crash :confused:
SIM status checks are derped :disappointed:
Seems to be sth common in tablets, have a look http://stackoverflow.com/questions/31654999/boolean-android-net-networkinfo-isconnectedorconnecting-is-not-working-in-andr
yeah I know why it's happening. I've refactored the check to be more generic and mobile network independent, test build running here
:disappointed:
11-24 23:21:12.101 16970 16970 E AndroidRuntime: FATAL EXCEPTION: main
11-24 23:21:12.101 16970 16970 E AndroidRuntime: Process: rom.stalker, PID: 16970
11-24 23:21:12.101 16970 16970 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{rom.stalker/browser.afh.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.net.NetworkInfo.isConnected()' on a null object reference
11-24 23:21:12.101 16970 16970 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2458)
11-24 23:21:12.101 16970 16970 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2518)
11-24 23:21:12.101 16970 16970 E AndroidRuntime: at android.app.ActivityThread.-wrap11(ActivityThread.java)
11-24 23:21:12.101 16970 16970 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1345)
11-24 23:21:12.101 16970 16970 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:104)
11-24 23:21:12.101 16970 16970 E AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
11-24 23:21:12.101 16970 16970 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5460)
11-24 23:21:12.101 16970 16970 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
11-24 23:21:12.101 16970 16970 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
11-24 23:21:12.101 16970 16970 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
11-24 23:21:12.101 16970 16970 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.net.NetworkInfo.isConnected()' on a null object reference
11-24 23:21:12.101 16970 16970 E AndroidRuntime: at browser.afh.MainActivity.checkIfMobileData(MainActivity.java:173)
11-24 23:21:12.101 16970 16970 E AndroidRuntime: at browser.afh.MainActivity.onCreate(MainActivity.java:107)
11-24 23:21:12.101 16970 16970 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:6237)
11-24 23:21:12.101 16970 16970 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
11-24 23:21:12.101 16970 16970 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2411)
11-24 23:21:12.101 16970 16970 E AndroidRuntime: ... 9 more
11-24 23:21:12.106 683 1498 W ActivityManager: Force finishing activity rom.stalker/browser.afh.MainActivity
(Yes, it's the #10 execution apk, just in case...)
Getting kinda rough in here :stuck_out_tongue:
Okay I have some insight into this now. new build coming #soon
Ayy lmao
11-24 23:55:36.361 27925 27925 E AndroidRuntime: FATAL EXCEPTION: main
11-24 23:55:36.361 27925 27925 E AndroidRuntime: Process: rom.stalker, PID: 27925
11-24 23:55:36.361 27925 27925 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{rom.stalker/browser.afh.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.net.NetworkInfo.isConnected()' on a null object reference
11-24 23:55:36.361 27925 27925 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2458)
11-24 23:55:36.361 27925 27925 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2518)
11-24 23:55:36.361 27925 27925 E AndroidRuntime: at android.app.ActivityThread.-wrap11(ActivityThread.java)
11-24 23:55:36.361 27925 27925 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1345)
11-24 23:55:36.361 27925 27925 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:104)
11-24 23:55:36.361 27925 27925 E AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
11-24 23:55:36.361 27925 27925 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5460)
11-24 23:55:36.361 27925 27925 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
11-24 23:55:36.361 27925 27925 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
11-24 23:55:36.361 27925 27925 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
11-24 23:55:36.361 27925 27925 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.net.NetworkInfo.isConnected()' on a null object reference
11-24 23:55:36.361 27925 27925 E AndroidRuntime: at browser.afh.MainActivity.checkIfMobileData(MainActivity.java:173)
11-24 23:55:36.361 27925 27925 E AndroidRuntime: at browser.afh.MainActivity.onCreate(MainActivity.java:107)
11-24 23:55:36.361 27925 27925 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:6237)
11-24 23:55:36.361 27925 27925 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
11-24 23:55:36.361 27925 27925 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2411)
11-24 23:55:36.361 27925 27925 E AndroidRuntime: ... 9 more
11-24 23:55:36.362 683 1284 W ActivityManager: Force finishing activity rom.stalker/browser.afh.MainActivity
I know what I will do now
Nah m8, don't worry, we'll sort it out. I'm going to fork this now.
Still failing. Ah, I want to destroy this tablet so badly
11-26 12:14:41.342 16929 16929 E AndroidRuntime: Process: rom.stalker, PID: 16929
11-26 12:14:41.342 16929 16929 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{rom.stalker/browser.afh.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.net.NetworkInfo.isConnected()' on a null object reference
11-26 12:14:41.342 16929 16929 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2458)
11-26 12:14:41.342 16929 16929 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2518)
11-26 12:14:41.342 16929 16929 E AndroidRuntime: at android.app.ActivityThread.-wrap11(ActivityThread.java)
11-26 12:14:41.342 16929 16929 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1345)
11-26 12:14:41.342 16929 16929 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:104)
11-26 12:14:41.342 16929 16929 E AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
11-26 12:14:41.342 16929 16929 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5460)
11-26 12:14:41.342 16929 16929 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
11-26 12:14:41.342 16929 16929 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
11-26 12:14:41.342 16929 16929 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
11-26 12:14:41.342 16929 16929 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.net.NetworkInfo.isConnected()' on a null object reference
11-26 12:14:41.342 16929 16929 E AndroidRuntime: at browser.afh.MainActivity.checkIfMobileData(MainActivity.java:173)
11-26 12:14:41.342 16929 16929 E AndroidRuntime: at browser.afh.MainActivity.onCreate(MainActivity.java:107)
11-26 12:14:41.342 16929 16929 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:6237)
11-26 12:14:41.342 16929 16929 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
11-26 12:14:41.342 16929 16929 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2411)
11-26 12:14:41.342 16929 16929 E AndroidRuntime: ... 9 more
11-26 12:14:41.345 683 1272 W ActivityManager: Force finishing activity rom.stalker/browser.afh.MainActivity
Okay, I got an idea, there's an open source app for OTA updates handling, it's here. I remember when I used it (on my Xperia M2 tho, not sure what will happen on the tablet), it checks if the device's connected on Wifi, or on mobile data, or has no internet connection at all. Maybe it's useful.
@sergiocastell there has to be a problem.... you've got the wrong APK installed dude, I completely removed the code the stacktrace is showing. My jenkins instance wipes out the workspace before building so that's out of question too
11-26 12:14:41.342 16929 16929 E AndroidRuntime: at browser.afh.MainActivity.checkIfMobileData(MainActivity.java:173)
There's no such method anymore
@MSF-Jarvis And I'm sure this is the latest version you attached from comment 263007369
Gave it another shot just in case, and welp...
11-26 13:22:55.915 10699 10699 E AndroidRuntime: Process: rom.stalker, PID: 10699
11-26 13:22:55.915 10699 10699 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{rom.stalker/browser.afh.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.net.NetworkInfo.isConnected()' on a null object reference
11-26 13:22:55.915 10699 10699 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2458)
11-26 13:22:55.915 10699 10699 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2518)
11-26 13:22:55.915 10699 10699 E AndroidRuntime: at android.app.ActivityThread.-wrap11(ActivityThread.java)
11-26 13:22:55.915 10699 10699 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1345)
11-26 13:22:55.915 10699 10699 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:104)
11-26 13:22:55.915 10699 10699 E AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
11-26 13:22:55.915 10699 10699 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5460)
11-26 13:22:55.915 10699 10699 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
11-26 13:22:55.915 10699 10699 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
11-26 13:22:55.915 10699 10699 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
11-26 13:22:55.915 10699 10699 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.net.NetworkInfo.isConnected()' on a null object reference
11-26 13:22:55.915 10699 10699 E AndroidRuntime: at browser.afh.MainActivity.checkIfMobileData(MainActivity.java:173)
11-26 13:22:55.915 10699 10699 E AndroidRuntime: at browser.afh.MainActivity.onCreate(MainActivity.java:107)
11-26 13:22:55.915 10699 10699 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:6237)
11-26 13:22:55.915 10699 10699 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
11-26 13:22:55.915 10699 10699 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2411)
11-26 13:22:55.915 10699 10699 E AndroidRuntime: ... 9 more
11-26 13:22:55.916 682 1488 W ActivityManager: Force finishing activity rom.stalker/browser.afh.MainActivity ```
Fuck this shit it's my jenkins to blame :rage:
https://jenkins.msfjarvis.me/job/afh-browser-master/13/
If this one doesn't work...
Now, this is something different!
11-26 13:41:07.772 12839 12839 E AndroidRuntime: FATAL EXCEPTION: main
11-26 13:41:07.772 12839 12839 E AndroidRuntime: Process: rom.stalker, PID: 12839
11-26 13:41:07.772 12839 12839 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{rom.stalker/browser.afh.MainActivity}: android.os.NetworkOnMainThreadException
11-26 13:41:07.772 12839 12839 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2458)
11-26 13:41:07.772 12839 12839 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2518)
11-26 13:41:07.772 12839 12839 E AndroidRuntime: at android.app.ActivityThread.-wrap11(ActivityThread.java)
11-26 13:41:07.772 12839 12839 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1345)
11-26 13:41:07.772 12839 12839 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:104)
11-26 13:41:07.772 12839 12839 E AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
11-26 13:41:07.772 12839 12839 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5460)
11-26 13:41:07.772 12839 12839 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
11-26 13:41:07.772 12839 12839 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
11-26 13:41:07.772 12839 12839 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
11-26 13:41:07.772 12839 12839 E AndroidRuntime: Caused by: android.os.NetworkOnMainThreadException
11-26 13:41:07.772 12839 12839 E AndroidRuntime: at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1273)
11-26 13:41:07.772 12839 12839 E AndroidRuntime: at java.net.InetAddress.lookupHostByName(InetAddress.java:431)
11-26 13:41:07.772 12839 12839 E AndroidRuntime: at java.net.InetAddress.getAllByNameImpl(InetAddress.java:252)
11-26 13:41:07.772 12839 12839 E AndroidRuntime: at java.net.InetAddress.getAllByName(InetAddress.java:215)
11-26 13:41:07.772 12839 12839 E AndroidRuntime: at com.android.okhttp.internal.Network$1.resolveInetAddresses(Network.java:29)
11-26 13:41:07.772 12839 12839 E AndroidRuntime: at com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:188)
11-26 13:41:07.772 12839 12839 E AndroidRuntime: at com.android.okhttp.internal.http.RouteSelector.nextProxy(RouteSelector.java:157)
11-26 13:41:07.772 12839 12839 E AndroidRuntime: at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:100)
11-26 13:41:07.772 12839 12839 E AndroidRuntime: at com.android.okhttp.internal.http.HttpEngine.createNextConnection(HttpEngine.java:357)
11-26 13:41:07.772 12839 12839 E AndroidRuntime: at com.android.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:340)
11-26 13:41:07.772 12839 12839 E AndroidRuntime: at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:330)
11-26 13:41:07.772 12839 12839 E AndroidRuntime: at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:248)
11-26 13:41:07.772 12839 12839 E AndroidRuntime: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:437)
11-26 13:41:07.772 12839 12839 E AndroidRuntime: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:114)
11-26 13:41:07.772 12839 12839 E AndroidRuntime: at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.connect(DelegatingHttpsURLConnection.java:89)
11-26 13:41:07.772 12839 12839 E AndroidRuntime: at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java)
11-26 13:41:07.772 12839 12839 E AndroidRuntime: at browser.afh.tools.ConnectionDetector.isConnectingToInternet(ConnectionDetector.java:28)
11-26 13:41:07.772 12839 12839 E AndroidRuntime: at browser.afh.MainActivity.onCreate(MainActivity.java:102)
11-26 13:41:07.772 12839 12839 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:6237)
11-26 13:41:07.772 12839 12839 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
11-26 13:41:07.772 12839 12839 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2411)
11-26 13:41:07.772 12839 12839 E AndroidRuntime: ... 9 more
11-26 13:41:07.775 682 1231 W ActivityManager: Force finishing activity rom.stalker/browser.afh.MainActivity
Well this one I knew would come :stuck_out_tongue_winking_eye:
AsyncTask FTW. Sorry for not noticing, Jarv. O_O
Nah it's my mistake, chill
Finally :') Many thanks @MSF-Jarvis !!
Wew *_*
Please, have a look.