Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

package android does not belong to #472

Open
kotoMJ opened this issue Dec 29, 2020 · 1 comment
Open

package android does not belong to #472

kotoMJ opened this issue Dec 29, 2020 · 1 comment

Comments

@kotoMJ
Copy link

kotoMJ commented Dec 29, 2020

When using 'com.birbit:android-priority-jobqueue:3.0.0' and running application with approximately 300 000 users, there are approximately 3 users (Android11: OnePlus 8 Pro, Pixel 3, Galaxy S20 5G - NO rooted phone) having following issue just after they install application and trying to initialize com.birbit.android.jobqueue.network jobqueue

Caused by java.lang.SecurityException: Package android does not belong to 10284
at android.os.Parcel.createExceptionOrNull(Parcel.java:2373)
at android.os.Parcel.createException(Parcel.java:2357)
at android.os.Parcel.readException(Parcel.java:2340)
at android.os.Parcel.readException(Parcel.java:2282)
at android.net.IConnectivityManager$Stub$Proxy.listenForNetwork(IConnectivityManager.java:3609)
at android.net.ConnectivityManager.sendRequestForNetwork(ConnectivityManager.java:3685)
at android.net.ConnectivityManager.registerNetworkCallback(ConnectivityManager.java:4079)
at android.net.ConnectivityManager.registerNetworkCallback(ConnectivityManager.java:4049)
at com.birbit.android.jobqueue.network.NetworkUtilImpl.listenNetworkViaConnectivityManager(NetworkUtilImpl.java:47)
at com.birbit.android.jobqueue.network.NetworkUtilImpl.(NetworkUtilImpl.java:28)
at com.birbit.android.jobqueue.config.Configuration$Builder.build(Configuration.java:462)

Any idea what's the reason for this crash?

@kotoMJ kotoMJ closed this as completed Mar 3, 2021
@kotoMJ kotoMJ reopened this Mar 3, 2021
@Weronerana
Copy link

Hi @yigit,

We have been observing this crash for a large number of our users.

The StackTrace looks something like below:

Caused by java.lang.SecurityException: Package android does not belong to 10444
at android.os.Parcel.createExceptionOrNull(Parcel.java:2385)
at android.os.Parcel.createException(Parcel.java:2369)
at android.os.Parcel.readException(Parcel.java:2352)
at android.os.Parcel.readException(Parcel.java:2294)
at android.net.IConnectivityManager$Stub$Proxy.listenForNetwork(IConnectivityManager.java:4703)
at android.net.ConnectivityManager.sendRequestForNetwork(ConnectivityManager.java:4191)
at android.net.ConnectivityManager.registerNetworkCallback(ConnectivityManager.java:4594)
at android.net.ConnectivityManager.registerNetworkCallback(ConnectivityManager.java:4564)
at com.birbit.android.jobqueue.network.NetworkUtilImpl.listenNetworkViaConnectivityManager(NetworkUtilImpl.java:47)
at com.birbit.android.jobqueue.network.NetworkUtilImpl.<init>(NetworkUtilImpl.java:28)
at com.birbit.android.jobqueue.config.Configuration$Builder.build(Configuration.java:462)

The root cause seemed to be an Android bug https://issuetracker.google.com/issues/175055271. However Google has closed this bug as Fixed after fixing it for Android 12. So for lower Android versions we keep facing this crash.

So, as a workaround, some SDK/Apps are wrapping the relevant piece of code in try-catch, to prevent this crash. Can you please do something similar in android-priority-jobqueue as well?
Sample code of how others are handling this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants