Fixed
Status Update
Comments
sl...@atlassian.com <sl...@atlassian.com> #3
I have the same bug on LG Nexus 4
ad...@google.com <ad...@google.com> #5
Do you know, how this error can raise?
It would be interesting if it comes from the BLE device or from the Android stack.
It would be interesting if it comes from the BLE device or from the Android stack.
vi...@adobe.com <vi...@adobe.com> #6
I am working on an app that connects to many devices and was getting the callback exception - it is because the Gatt connection is closed before the disconnect event has fired. So either you need to wait for the disconnect event, or what I do now is just call close. It seems to tidy away the connection without generating a disconnect event.
However, I am also sometimes getting BLE into a state where on connection, I immediately get a disconnect event and have to restart BLE to resolve. In my case I am getting status 133 not 22
However, I am also sometimes getting BLE into a state where on connection, I immediately get a disconnect event and have to restart BLE to resolve. In my case I am getting status 133 not 22
na...@ringcentral.com <na...@ringcentral.com> #7
Ok. I have changed my implementation so that I am closing only after a disconnect which works for me now.
But I still get the status code 22. I remember that I also got a status 133 or 8 which are both not documented. I was not able to reproduce them so I do not exactly know when these status come up.
Another thing I found out is that after getting a successful disconnect from the callback the device is sometimes not disconnected and then I am not able to disconnect it anymore. It is then possible to connect it again and retry another disconnect which sometimes works.
I also observed that I got successfully disconnected but the callback did not fire. This leads to the problem that close won't be called, so a loose a BLE slot for connection which is a problem on devices where you only have 5.
But I still get the status code 22. I remember that I also got a status 133 or 8 which are both not documented. I was not able to reproduce them so I do not exactly know when these status come up.
Another thing I found out is that after getting a successful disconnect from the callback the device is sometimes not disconnected and then I am not able to disconnect it anymore. It is then possible to connect it again and retry another disconnect which sometimes works.
I also observed that I got successfully disconnected but the callback did not fire. This leads to the problem that close won't be called, so a loose a BLE slot for connection which is a problem on devices where you only have 5.
vl...@spotify.com <vl...@spotify.com> #8
FYI: On the LG Nexus 4 with Android 5.1.1 I get disconnection with status 22 almost every time after connection to BLE device. Device is in the connected state about 30 seconds. And after that I get disconnection. That happens if BLE device is NOT paired with phone. Pairing helps to avoid such behaviour
[Deleted User] <[Deleted User]> #9
Ok, but BLE devices should not need to be paired, only bonding should be needed.
So you pair a BLE device inside your app?
I try to avoid pairing, as this is not a standard BLE approach.
So you pair a BLE device inside your app?
I try to avoid pairing, as this is not a standard BLE approach.
[Deleted User] <[Deleted User]> #10
I pair manually at the moment. I know that pairing is not standard approach. Do you think that bonding can help in this situation?
ma...@zentity.com <ma...@zentity.com> #11
I am not sure. But I think that this might help. I am unable to use the createBond() function as I am stuck with API-Level 18 (createBond() requires at least 19).
When I am pairing manually, my app is unable to discover the devices that are paired. So this option does not work for me.
When I am pairing manually, my app is unable to discover the devices that are paired. So this option does not work for me.
tr...@udemy.com <tr...@udemy.com> #12
Greetings.
I’ve developed mesh networking library for Android that uses Bluetooth in such way that it doesn’t need Discoverable confirmation from the user each 5 minutes. It also allows background connection between devices thus allowing true seamless mesh networking.
You can try it here:http://underdark.io
I’ve developed mesh networking library for Android that uses Bluetooth in such way that it doesn’t need Discoverable confirmation from the user each 5 minutes. It also allows background connection between devices thus allowing true seamless mesh networking.
You can try it here:
va...@gmail.com <va...@gmail.com> #13
The bug has nothing to do with a discoverable confirmation and is not helpful for my application as I do not need meshing.
In the meanwhile, I found out that one of the biggest problems (especially for the Nexus 4) is sending messages to all BLE devices at the same time. This causes the 0x22 error a lot of time so waiting between each transmission (I am currently using 10ms) could also be a workaround for you.
The next important thing is that you do no BLE communication while connecting or service discovery. I developed a small task system for all kinds of BLE communication to handle this. So I am using a macro task for connect and service discovery and do this for every BLE device in a single task. Only after that and while no other connect or service discovery task is running I am reading or writing characteristics.
But still I get these three error codes (8 (this one does not really affect the other connections so it is not so tragical), 16 and 133 (these to cause major problems in my application as stated in the first comment)).
The errors come up not very often since my last implementations but it is still annoying. Sometimes I even have to restart the phone to make it work again (happened with Nexus 4 and Galaxy S5).
In the meanwhile, I found out that one of the biggest problems (especially for the Nexus 4) is sending messages to all BLE devices at the same time. This causes the 0x22 error a lot of time so waiting between each transmission (I am currently using 10ms) could also be a workaround for you.
The next important thing is that you do no BLE communication while connecting or service discovery. I developed a small task system for all kinds of BLE communication to handle this. So I am using a macro task for connect and service discovery and do this for every BLE device in a single task. Only after that and while no other connect or service discovery task is running I am reading or writing characteristics.
But still I get these three error codes (8 (this one does not really affect the other connections so it is not so tragical), 16 and 133 (these to cause major problems in my application as stated in the first comment)).
The errors come up not very often since my last implementations but it is still annoying. Sometimes I even have to restart the phone to make it work again (happened with Nexus 4 and Galaxy S5).
[Deleted User] <[Deleted User]> #14
Sorry, I forgot to say: The waiting of 10ms is additionally to waiting for the callback of the API.
br...@procore.com <br...@procore.com> #15
#15 I understand you so much. I wanted to develop similar system for connecting with iOS, but then though that even if I implement it, there will be some other stupid BLE bugs on Android which will prevent normal usage.
BLE and Bluetooth on Android is such a crap. And Android is just piece of trash too.
Btw, can you email to me? Maybe we find areas for experience exchange.
BLE and Bluetooth on Android is such a crap. And Android is just piece of trash too.
Btw, can you email to me? Maybe we find areas for experience exchange.
ec...@gmail.com <ec...@gmail.com> #16
@lehner I am facing the same issue,
my ble connection works for 30 seconds, later on it disconnects & have the same error code 133.
Do suggest any steps or work around to solve this problem.
my ble connection works for 30 seconds, later on it disconnects & have the same error code 133.
Do suggest any steps or work around to solve this problem.
ec...@gmail.com <ec...@gmail.com> #17
#17 Google making some advancement to BLE stack in their AOSP bluetooth repo. Hoping that these bug will be fixed in Android 6.1.
Anyway, Android is piece of trash, so you must suffer.
Anyway, Android is piece of trash, so you must suffer.
ec...@gmail.com <ec...@gmail.com> #18 Restricted+
Restricted+
Comment has been deleted.
hz...@gmail.com <hz...@gmail.com> #19
Hey guy's would like to share regarding the fix i got with my issue.
Hope it helps you all,
I changed my advertising settings to setTimeout(0);
settings = new AdvertiseSettings.Builder()
.setAdvertiseMode(AdvertiseSettings.ADVERTISE_MODE_BALANCED)
.setConnectable(true)
.setTimeout(0)
.setTxPowerLevel(AdvertiseSettings.ADVERTISE_TX_POWER_MEDIUM)
.build();
Works fine without disconnection.
Also you can find the attached advertisement settings for more info.
Hope it helps you all,
I changed my advertising settings to setTimeout(0);
settings = new AdvertiseSettings.Builder()
.setAdvertiseMode(AdvertiseSettings.ADVERTISE_MODE_BALANCED)
.setConnectable(true)
.setTimeout(0)
.setTxPowerLevel(AdvertiseSettings.ADVERTISE_TX_POWER_MEDIUM)
.build();
Works fine without disconnection.
Also you can find the attached advertisement settings for more info.
al...@outlook.it <al...@outlook.it> #20
Sorry if this is off-topic, feel free to flame me or contact me directly at pv@swooby.com:
lehner.a...@gmail.com, no offense, but what on earth were you doing with BLE that required that "there should be no delays" when writing to multiple devices? Mesh stuff? You can't possibly expect to depend on writes being exactly simultaneous. The BLE devices themselves may be in different states in the firmware and unable to process the write requests at the same time. It sounds like a classic "clock synchronization problem". It might be better to add a timestamp in to the payload of the write request.
It has taken me a year to come up with a decent BLE GATT connectivity implementation (which I am currently not at liberty to share). I have reverse engineered about a dozen BLE Android apps and perused several open source projects. It is ridiculous that Google/Android has continued to ship horrible BT implementations from day 1. I used to work at Google and had a pre-issue Android G1 and its BT API was horrible. I have a 3.5 year old still unanswered BT SCO question on stackoverflow (http://stackoverflow.com/q/12737446/252308 ), and then there is this horror, as well as these:
https://code.google.com/p/android/issues/detail?id=67272
https://code.google.com/p/android/issues/detail?id=82882
https://code.google.com/p/android/issues/detail?id=170132
https://code.google.com/p/android/issues/detail?id=173991
https://code.google.com/p/android/issues/detail?id=177358
https://code.google.com/p/android/issues/detail?id=179154
https://code.google.com/p/android/issues/detail?id=190372
https://code.google.com/p/android/issues/detail?id=191831
I'd darn near call that "pretty much unacceptable".
lehner.a...@gmail.com, no offense, but what on earth were you doing with BLE that required that "there should be no delays" when writing to multiple devices? Mesh stuff? You can't possibly expect to depend on writes being exactly simultaneous. The BLE devices themselves may be in different states in the firmware and unable to process the write requests at the same time. It sounds like a classic "clock synchronization problem". It might be better to add a timestamp in to the payload of the write request.
It has taken me a year to come up with a decent BLE GATT connectivity implementation (which I am currently not at liberty to share). I have reverse engineered about a dozen BLE Android apps and perused several open source projects. It is ridiculous that Google/Android has continued to ship horrible BT implementations from day 1. I used to work at Google and had a pre-issue Android G1 and its BT API was horrible. I have a 3.5 year old still unanswered BT SCO question on stackoverflow (
I'd darn near call that "pretty much unacceptable".
sv...@gmail.com <sv...@gmail.com> #21
#21 Google doesn't care about my or your problems. We must suffer.
Also take a look at AOSP Bluetooth repository — it seems that Google finally fixes bluetooth due to its Brillo project.
I think their managers finally tried to use Android Bluetooth stack themselves and accidentially found out that it doesn't work at all.
Also take a look at AOSP Bluetooth repository — it seems that Google finally fixes bluetooth due to its Brillo project.
I think their managers finally tried to use Android Bluetooth stack themselves and accidentially found out that it doesn't work at all.
br...@procore.com <br...@procore.com> #23
@ p...@pebblebee.com:
I should explain a little better. I do not need any real time communication. What I mean with delay are delays that can be noticed by humans. So delays of several 100 ms and this is a very high value for writing this small amount of bytes. More concretely I am setting colors of several juggling balls. The problem is for example if you set a color effect rainbow (all colors fading) then you can see that every ball starts after another. Sometime even half a second later. Here it would be important if they are synchronous. I know what happens in the firmware as these balls are also developed in the company I am working in.
There also exists an app for iOS which does not have this problem.
Thanks for your links. I will check them on later time.
I should explain a little better. I do not need any real time communication. What I mean with delay are delays that can be noticed by humans. So delays of several 100 ms and this is a very high value for writing this small amount of bytes. More concretely I am setting colors of several juggling balls. The problem is for example if you set a color effect rainbow (all colors fading) then you can see that every ball starts after another. Sometime even half a second later. Here it would be important if they are synchronous. I know what happens in the firmware as these balls are also developed in the company I am working in.
There also exists an app for iOS which does not have this problem.
Thanks for your links. I will check them on later time.
he...@gmail.com <he...@gmail.com> #24
Thank you for your feedback. We assure you that we are doing our best to address all issues reported. For now, we will be closing the issue as won't fix obsolete. If this issue currently still exists, we request that you log a new issue along with the bug report here https://goo.gl/TbMiIO and reference this bug for context.
va...@gmail.com <va...@gmail.com> #25
>> #24
Datadog SDK for Android has a try catch,https://github.com/microsoft/cpp_client_telemetry/pull/798/files . Though, a back-off retry logic might also satisfy functional needs.
Datadog SDK for Android has a try catch,
a....@gmail.com <a....@gmail.com> #26
Comment has been deleted.
a....@gmail.com <a....@gmail.com> #27
We also faced this problem. An exception is thrown when registering a callback in ConnectivityManager:
java.lang.SecurityException: Package android does not belong to 10476
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:3696)
at android.net.ConnectivityManager.sendRequestForNetwork(ConnectivityManager.java:3783)
at android.net.ConnectivityManager.registerNetworkCallback(ConnectivityManager.java:4177)
at android.net.ConnectivityManager.registerNetworkCallback(ConnectivityManager.java:4147)
And as I can see in the logs this is the UID of our application. Here are some details that I can provide based on the source code and the stacktrace:
- It happens on application start up;
- We don't keep link to ConnectivityManager;
- context.getSystemService(Context.CONNECTIVITY_SERVICE) invocation returns ConnectivityManager with wrong packageName in the context;
- SystemServiceRegistry.StaticApplicationContextServiceFetcher#getService may be violated or somehow contain cached instance that was initialized previously.
am...@gmail.com <am...@gmail.com> #28
We are also facing the same issue with Android 11(OnePlus 6 Device). Below is the stack trace of the crash.
java.lang.SecurityException: Package android does not belong to 10470
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.getNetworkCapabilities(IConnectivityManager.java:2543)
at android.net.ConnectivityManager.getNetworkCapabilities(ConnectivityManager.java:1415)
java.lang.SecurityException: Package android does not belong to 10470
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.getNetworkCapabilities(IConnectivityManager.java:2543)
at android.net.ConnectivityManager.getNetworkCapabilities(ConnectivityManager.java:1415)
ra...@freshworks.com <ra...@freshworks.com> #29
We see this crash on a POCO X2 device when getNetworkCapabilities is invoked (only on Android 11)
Caused by java.lang.SecurityException: Package android does not belong to 10025
at android.os.Parcel.createExceptionOrNull(Parcel.java:2376)
at android.os.Parcel.createException(Parcel.java:2360)
at android.os.Parcel.readException(Parcel.java:2343)
at android.os.Parcel.readException(Parcel.java:2285)
at android.net.IConnectivityManager$Stub$Proxy.getNetworkCapabilities(IConnectivityManager.java:2456)
Caused by android.os.RemoteException
Remote stack trace: at android.app.AppOpsManager.checkPackage(AppOpsManager.java:7794) at com.android.server.ConnectivityService.getNetworkCapabilities(ConnectivityService.java:1778) at android.net.IConnectivityManager$Stub.onTransact(IConnectivityManager.java:978) at android.os.Binder.execTransactInternal(Binder.java:1154) at android.os.Binder.execTransact(Binder.java:1123)
Any ETA on the fix or a reliable workaround ?
Caused by java.lang.SecurityException: Package android does not belong to 10025
at android.os.Parcel.createExceptionOrNull(Parcel.java:2376)
at android.os.Parcel.createException(Parcel.java:2360)
at android.os.Parcel.readException(Parcel.java:2343)
at android.os.Parcel.readException(Parcel.java:2285)
at android.net.IConnectivityManager$Stub$Proxy.getNetworkCapabilities(IConnectivityManager.java:2456)
Caused by android.os.RemoteException
Remote stack trace: at android.app.AppOpsManager.checkPackage(AppOpsManager.java:7794) at com.android.server.ConnectivityService.getNetworkCapabilities(ConnectivityService.java:1778) at android.net.IConnectivityManager$Stub.onTransact(IConnectivityManager.java:978) at android.os.Binder.execTransactInternal(Binder.java:1154) at android.os.Binder.execTransact(Binder.java:1123)
Any ETA on the fix or a reliable workaround ?
sh...@gmail.com <sh...@gmail.com> #30
Comment has been deleted.
ar...@timesinternet.in <ar...@timesinternet.in> #31
Any updates on this crash. 100% OS 11 & 100% in background. This is spread across all brands.
Fatal Exception: java.lang.SecurityException: Package android does not belong to 10267
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.getNetworkCapabilities(IConnectivityManager.java:2456)
at android.net.ConnectivityManager.getNetworkCapabilities(ConnectivityManager.java:1385)
at androidx.work.impl.constraints.trackers.NetworkStateTracker.isActiveNetworkValidated(NetworkStateTracker.java:149)
at androidx.work.impl.constraints.trackers.NetworkStateTracker.getActiveNetworkState(NetworkStateTracker.java:138)
at androidx.work.impl.constraints.trackers.NetworkStateTracker.getInitialState(NetworkStateTracker.java:80)
at androidx.work.impl.constraints.trackers.NetworkStateTracker.getInitialState(NetworkStateTracker.java:50)
at androidx.work.impl.constraints.trackers.ConstraintTracker.addListener(ConstraintTracker.java:67)
at androidx.work.impl.constraints.controllers.ConstraintController.replace(ConstraintController.java:99)
at androidx.work.impl.constraints.WorkConstraintsTracker.replace(WorkConstraintsTracker.java:106)
at androidx.work.impl.background.greedy.GreedyScheduler.schedule(GreedyScheduler.java:163)
at androidx.work.impl.Schedulers.schedule(Schedulers.java:117)
at androidx.work.impl.WorkerWrapper.onWorkFinished(WorkerWrapper.java:362)
at androidx.work.impl.WorkerWrapper$2.run(WorkerWrapper.java:318)
at androidx.work.impl.utils.SerialExecutor$Task.run(SerialExecutor.java:91)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)
-----
Similar crash only on Samsung devices OS 11
Fatal Exception: java.lang.SecurityException: Package android does not belong to 10314
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.getNetworkCapabilities(IConnectivityManager.java:3347)
at android.net.ConnectivityManager.getNetworkCapabilities(ConnectivityManager.java:1549)
at androidx.work.impl.constraints.trackers.NetworkStateTracker.isActiveNetworkValidated(NetworkStateTracker.java:149)
at androidx.work.impl.constraints.trackers.NetworkStateTracker.getActiveNetworkState(NetworkStateTracker.java:138)
at androidx.work.impl.constraints.trackers.NetworkStateTracker.getInitialState(NetworkStateTracker.java:80)
at androidx.work.impl.constraints.trackers.NetworkStateTracker.getInitialState(NetworkStateTracker.java:50)
at androidx.work.impl.constraints.trackers.ConstraintTracker.addListener(ConstraintTracker.java:67)
at androidx.work.impl.constraints.controllers.ConstraintController.replace(ConstraintController.java:99)
at androidx.work.impl.constraints.WorkConstraintsTracker.replace(WorkConstraintsTracker.java:106)
at androidx.work.impl.background.greedy.GreedyScheduler.schedule(GreedyScheduler.java:163)
at androidx.work.impl.background.greedy.DelayedWorkTracker$1.run(DelayedWorkTracker.java:75)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:246)
at android.app.ActivityThread.main(ActivityThread.java:8587)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
Caused by android.os.RemoteException: Remote stack trace:
at android.app.AppOpsManager.checkPackage(AppOpsManager.java:7783)
at com.android.server.ConnectivityService.getNetworkCapabilities(ConnectivityService.java:2295)
at android.net.IConnectivityManager$Stub.onTransact(IConnectivityManager.java:1357)
at android.os.Binder.execTransactInternal(Binder.java:1190)
at android.os.Binder.execTransact(Binder.java:1159)
Fatal Exception: java.lang.SecurityException: Package android does not belong to 10267
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.getNetworkCapabilities(IConnectivityManager.java:2456)
at android.net.ConnectivityManager.getNetworkCapabilities(ConnectivityManager.java:1385)
at androidx.work.impl.constraints.trackers.NetworkStateTracker.isActiveNetworkValidated(NetworkStateTracker.java:149)
at androidx.work.impl.constraints.trackers.NetworkStateTracker.getActiveNetworkState(NetworkStateTracker.java:138)
at androidx.work.impl.constraints.trackers.NetworkStateTracker.getInitialState(NetworkStateTracker.java:80)
at androidx.work.impl.constraints.trackers.NetworkStateTracker.getInitialState(NetworkStateTracker.java:50)
at androidx.work.impl.constraints.trackers.ConstraintTracker.addListener(ConstraintTracker.java:67)
at androidx.work.impl.constraints.controllers.ConstraintController.replace(ConstraintController.java:99)
at androidx.work.impl.constraints.WorkConstraintsTracker.replace(WorkConstraintsTracker.java:106)
at androidx.work.impl.background.greedy.GreedyScheduler.schedule(GreedyScheduler.java:163)
at androidx.work.impl.Schedulers.schedule(Schedulers.java:117)
at androidx.work.impl.WorkerWrapper.onWorkFinished(WorkerWrapper.java:362)
at androidx.work.impl.WorkerWrapper$2.run(WorkerWrapper.java:318)
at androidx.work.impl.utils.SerialExecutor$Task.run(SerialExecutor.java:91)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)
-----
Similar crash only on Samsung devices OS 11
Fatal Exception: java.lang.SecurityException: Package android does not belong to 10314
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.getNetworkCapabilities(IConnectivityManager.java:3347)
at android.net.ConnectivityManager.getNetworkCapabilities(ConnectivityManager.java:1549)
at androidx.work.impl.constraints.trackers.NetworkStateTracker.isActiveNetworkValidated(NetworkStateTracker.java:149)
at androidx.work.impl.constraints.trackers.NetworkStateTracker.getActiveNetworkState(NetworkStateTracker.java:138)
at androidx.work.impl.constraints.trackers.NetworkStateTracker.getInitialState(NetworkStateTracker.java:80)
at androidx.work.impl.constraints.trackers.NetworkStateTracker.getInitialState(NetworkStateTracker.java:50)
at androidx.work.impl.constraints.trackers.ConstraintTracker.addListener(ConstraintTracker.java:67)
at androidx.work.impl.constraints.controllers.ConstraintController.replace(ConstraintController.java:99)
at androidx.work.impl.constraints.WorkConstraintsTracker.replace(WorkConstraintsTracker.java:106)
at androidx.work.impl.background.greedy.GreedyScheduler.schedule(GreedyScheduler.java:163)
at androidx.work.impl.background.greedy.DelayedWorkTracker$1.run(DelayedWorkTracker.java:75)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:246)
at android.app.ActivityThread.main(ActivityThread.java:8587)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
Caused by android.os.RemoteException: Remote stack trace:
at android.app.AppOpsManager.checkPackage(AppOpsManager.java:7783)
at com.android.server.ConnectivityService.getNetworkCapabilities(ConnectivityService.java:2295)
at android.net.IConnectivityManager$Stub.onTransact(IConnectivityManager.java:1357)
at android.os.Binder.execTransactInternal(Binder.java:1190)
at android.os.Binder.execTransact(Binder.java:1159)
ad...@google.com <ad...@google.com> #32
The issue has been fixed in Android S and above.
ga...@gmail.com <ga...@gmail.com> #33
The issue is happening in Android R (11-api-30). Is there a fix for earlier versions of Android?
ad...@google.com <ad...@google.com> #34
If it's Pixel then the fix will apply when the devices will get upgraded from R to S. For any non-Pixel devices, device manufacturers have been shared the fix, but its upto the device manufacturer to plan for and apply it to R devices.
[Deleted User] <[Deleted User]> #35
Wanted to +1 that this is the top crash in our app as well. For now, given the circumstances, we will have to catch the error and forego this functionality which is actually important to our app. Not ideal.
li...@gmail.com <li...@gmail.com> #36
+1 We see this/a similar issue in our app as well.
Fatal Exception: java.lang.RuntimeException
Unable to create application com.adeptmobile.alliance.bootstrap.AllianceApplication: java.lang.SecurityException: Package android does not belong to 10479
Caused by android.os.RemoteException
Remote stack trace: at android.app.AppOpsManager.checkPackage(AppOpsManager.java:7783) at com.android.server.ConnectivityService.ensureSufficientPermissionsForRequest(ConnectivityService.java:8546) at com.android.server.ConnectivityService.requestNetwork(ConnectivityService.java:8648) at android.net.IConnectivityManager$Stub.onTransact(IConnectivityManager.java:2051) at android.os.Binder.execTransactInternal(Binder.java:1190)
Fatal Exception: java.lang.RuntimeException
Unable to create application com.adeptmobile.alliance.bootstrap.AllianceApplication: java.lang.SecurityException: Package android does not belong to 10479
Caused by android.os.RemoteException
Remote stack trace: at android.app.AppOpsManager.checkPackage(AppOpsManager.java:7783) at com.android.server.ConnectivityService.ensureSufficientPermissionsForRequest(ConnectivityService.java:8546) at com.android.server.ConnectivityService.requestNetwork(ConnectivityService.java:8648) at android.net.IConnectivityManager$Stub.onTransact(IConnectivityManager.java:2051) at android.os.Binder.execTransactInternal(Binder.java:1190)
lb...@gmail.com <lb...@gmail.com> #37
Wait, this was marked as fixed on Android S (Android 12), and there is no way to solve it for older Android versions? Not even one workaround?
ka...@gmail.com <ka...@gmail.com> #38
Comment has been deleted.
ka...@gmail.com <ka...@gmail.com> #39
Thus this issue was fixed on Android s and above , is there any workaround for android 11(R)? I am facing similar issue...
java.lang.SecurityException: Package android does not belong to 10308
android.app.ActivityThread.handleBindApplication
java.lang.SecurityException: Package android does not belong to 10308
android.app.ActivityThread.handleBindApplication
mo...@gmail.com <mo...@gmail.com> #40
I'm facing similar issue too...
On top of that, this crash is greatly reducing the crash-free rate of the app.
Is there any workaround in Android 11 except to avoid crashes with try catch?
I'm not too keen on the concern that instead of not crashing, some of the features of the app will likely be unusable.
On top of that, this crash is greatly reducing the crash-free rate of the app.
Is there any workaround in Android 11 except to avoid crashes with try catch?
I'm not too keen on the concern that instead of not crashing, some of the features of the app will likely be unusable.
ms...@vivino.com <ms...@vivino.com> #41
Saying "The issue has been fixed in Android S and above." isn't really helping as the users might be stuck on OS 11 for the remainder of their device life time.
is...@gmail.com <is...@gmail.com> #42
what is the fix from the framework level? Please share here.
[Deleted User] <[Deleted User]> #43
Any workaround for this? it is happening in android OS 11
ch...@beyls.net <ch...@beyls.net> #44
Can someone from Google explain the cause of the issue, so we can know in which conditions it happens and figure out a workaround ?
va...@wandera.com <va...@wandera.com> #46
In what OS versions can we see this fix? I hope it will be backported to Android 11.
Is there any workaround for Android 11 for the time being?
Is there any workaround for Android 11 for the time being?
ni...@ironvest.com <ni...@ironvest.com> #47
Any workaround for Android below 12?
Description
When using the connectivity manager, registering a callback sometimes throws an exceptionhttps://github.com/DataDog/dd-sdk-android/pull/400/files
Package does not belong to XXX
. Other libraries like datadog have been experiencing similar problems and are just using a simple try/catch to prevent the crash.Currently I am registering a callback via
and there are error logs which I have not been able to reproduce. 99% of devices affected are Pixel devices (2/3) running android 11.