getNetworkType() crashes with NPE
See original GitHub issueOn google dev console, I see this:
java.lang.NullPointerException:
at android.os.Parcel.readException (Parcel.java:1699)
at android.os.Parcel.readException (Parcel.java:1646)
at android.net.IConnectivityManager$Stub$Proxy.getActiveNetworkInfo (IConnectivityManager.java:1587)
at android.net.ConnectivityManager.getActiveNetworkInfo (ConnectivityManager.java:874)
at com.evernote.android.job.util.Device.getNetworkType (Device.java:102)
at com.owncloud.android.utils.ConnectivityUtils.isInternetWalled (ConnectivityUtils.java:50)
at com.owncloud.android.utils.FilesSyncHelper.lambda$restartJobsIfNeeded$0$FilesSyncHelper (FilesSyncHelper.java:234)
at com.owncloud.android.utils.FilesSyncHelper$$Lambda$0.run (Unknown Source)
at java.lang.Thread.run (Thread.java:762)
So we are calling Device.getNetworkType() and in this function an NPE happens.
Issue Analytics
- State:
- Created 6 years ago
- Comments:11
Top Results From Across the Web
App crashes on start caused by NPE in android.content ...
We have a really weird crash, which points to the system classes. It appears on application start. Fatal Exception: java.lang.RuntimeException: ...
Read more >telephony/java/android/telephony/TelephonyManager.java
public static TelephonyManager getDefault() { ... public int getNetworkType(long subId) { ... This could happen before phone restarts due to crashing.
Read more >android.telephony.TelephonyManager.java Source code
READ_PHONE_STATE) public @NetworkType int getNetworkType() { return ... This could happen before phone restarts due to crashing return NETWORK_TYPE_UNKNOWN; ...
Read more >App Crashes on Android 11 device only - Kodular Community
From last 2-3 weeks I am getting constant app crashes on Android 11 only. ... getNetworkType (TelephonyManager.java:3706)
Read more >Building with Android 11 results in runtime crash - Unity Forum
getNetworkType (TelephonyManager.java:2945). at android.telephony.TelephonyManager ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That’s my plan
This issue has been fixed in version
1.2.5
. Thanks for reporting it!