-
Notifications
You must be signed in to change notification settings - Fork 38
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
Unable to create/stop/unbind ScheduledJobService #350
Comments
@senlsy Can you tell me how you are running? Are you running multiple instances? How do you have this setup? It seems weird that you are trying to unbind a scheduled service. Are you stopping and starting services? Do you know when this happens? |
Hi,
|
https://developer.android.com/reference/android/os/DeadSystemException @senlsy Can we verify that this is being caused by us? It seems that the unbinding is not the cause but the action that was stopped because of a dead system exception. There could have been a reboot or some other issue happening at that time. Your code seems fine. It makes sense that this is happening during a shutdown as the system tries to unbind but we are running scheduled services which should continue to run. |
FYI. We are also seeing a huge spike in similar crash reporting recently so I came looking here. We did update to the latest SDK recently but similar crash was reported in small number previously though. Recent crash is mostly from LG K31, K51 and moto g(7) running Android 10. For LG K51 it 283 instances of the crashes from just 4 users. Also in our case it is from
Anyway, looking at the Exception it may not be related to Optimizely but wanted to provided additional info if anyone is facing similar crash reports. |
Hi, |
@senlsy This is becoming a serious problem for us. The crash counts from Crashlytics are spiking after we updated the Optimizely SDK from 3.5.1 to 3.7.0. And it is mostly coming from LG K31, K51 and moto g(7) play. The numbers do not seem to add up as we are seeing over 1K crashes from just 50~70 users which is hard to believe if |
Not sure if this related but I'm also seeing lots of ANR (Application Not Responding) in Google Play Console which it says it is happening while executing
I guess it could be that we are doing too many things on Appplication.onStart() and it just happened to be executing OptimizelyManager.initialize() when ANR has happened. |
@thomaszurkan-optimizely We integrated optimizely and rolled out very recently and we're noticing similar crashes to the ones reported above in our logs as well. At least the top 10 crashes for our latest release in which we rolled out Optimizely SDK for the first time are the below crashes. Here's a list of crashes within the optimizely SDK Fatal Exception: java.lang.RuntimeException: Unable to create service com.optimizely.ab.android.shared.ScheduledJobService: java.lang.RuntimeException: android.os.DeadSystemException
The devices in which this crash occurs happens for our app are on on LG k31 (Android OS 10), Samsung Galaxy S7(Android OS 8), LG Stylo 4 (Android 8.1), Motorola G7 (Android 10). The numbers are going up on a daily basis. |
Are you running multiple instances of the Optimizely client?
… On Dec 17, 2020, at 2:36 AM, Prasanna ***@***.***> wrote:
That's a screenshot from play console which confirms that ANR's caused by Optimizely SDK are eventually causing the crash. Hope this info is useful.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@thomaszurkan-optimizely We only have one instance of Optimizely client which we reuse. |
@thomaszurkan-optimizely when can we expect a fix? |
@prasannarupan we have updated to androidx and I am in the process of deprecating our job scheduler for the androidx work manager. Along with the job scheduler, I am deprecating the intents to also just use the work manager. The PR is mentioned above if you care to comment. Thanks! |
This is also causing issues for our production app as well. This crash is our top crash and are getting dozens a day. We only utilize once instance of the Optimizely. |
Thank you @thomaszurkan-optimizely for the update |
Library version: 3.5.0
Android API: 29
Code for Android SDK initialization:
try {
OptimizelyManager manager = OptimizelyManager.builder()
.withSDKKey(BuildConfig.ABTEST_KEY)
.withDatafileDownloadInterval(TimeUnit.MINUTES.toSeconds(60))
.build(application);
mSyncOptyClient = manager.initialize(application, R.raw.datafile, true, true);
} catch (Exception e) {
e.printStackTrace();
}
Fatal Exception: java.lang.RuntimeException: Unable to create service com.optimizely.ab.android.shared.ScheduledJobService: java.lang.RuntimeException: android.os.DeadSystemException
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4081)
at android.app.ActivityThread.access$1500(ActivityThread.java:226)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1914)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7615)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)
=====
Fatal Exception: java.lang.RuntimeException: Unable to stop service com.optimizely.ab.android.shared.ScheduledJobService@711222b: java.lang.RuntimeException: android.os.DeadSystemException
at android.app.ActivityThread.handleStopService(ActivityThread.java:4252)
at android.app.ActivityThread.access$1900(ActivityThread.java:226)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1935)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7615)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)
======
Fatal Exception: java.lang.RuntimeException: Unable to unbind to service com.optimizely.ab.android.shared.ScheduledJobService@b07dc23 with Intent { cmp=com.verifly.smb/com.optimizely.ab.android.shared.ScheduledJobService }: java.lang.RuntimeException: android.os.DeadSystemException
at android.app.ActivityThread.handleUnbindService(ActivityThread.java:4139)
at android.app.ActivityThread.access$1700(ActivityThread.java:226)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1924)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7615)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)
The text was updated successfully, but these errors were encountered: