-
Notifications
You must be signed in to change notification settings - Fork 171
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
App crash with Fatal Exception: android.app.RemoteServiceException #1167
Comments
Can you share what apps are experiencing this crash so we can replicate the setup? Have the apps displaying the issue been certified by the SDLC? |
The app is What3Words. They disabled AppLink support since a lot of users saw crashes. So, App in play store might not work. |
The library enters the foreground calling Have you been able to replicate this issue? |
Also Crashlog 1 isn't specific to the SDL library so it's hard to say if it is relevant or not. |
Also for reference https://issuetracker.google.com/issues/76112072 |
Info received from App developers: "This crash that we are talking about seems to replicate in some situations when the app is closed and you start enabling / disabling bluetooth and start pairing to certain devices." |
Would it be possible for you to get full logs so we can follow the logic? The situation given is a pretty standard test we do so there has to be something specific that is happening. |
Unfortunately, I am not able to reproduce this issue. So, I do not have full logs. Also reported on below devices: Issue reported when connected to Non-SDL enabled Bluetooth devices (e.g. Headphones). |
That's another test we do before releases too, (connecting to non SDL bluetooth hardware). This bug is near impossible to reproduce in testing, but crops up in production. I have started a PR #1168 that hopes to catch any case that the |
Thank you for this info. Can you please let us know when can we expect to get this hotfix? |
My only concern is that while the PR might fix the problem, it's hard to say if it really will and if releasing a hotfix is misleading to developers that we "fixed" this bug. Is there anyway both of our teams can continue try to find reproduction steps for this bug first so we can ensure the PR actually fixes the the issue? |
Closed with #1168 |
The issue still reported after updating SDL lib to 4.10.0. Devices: Fatal Exception: android.app.RemoteServiceException: Context.startForegroundService() did not then call Service.startForeground() |
|
Should this exception handler be also used for SDL Service in Apps? SDL Service is started in
|
So we can't use the exception handler for the app's specific SDL Service since it's outside the scope of the library. There's no way to tell what an app would name that service, or if they would want that type of exception handling. So the developer can use a similar solution as was implemented and include their service; they would need to make sure sure to grab the current handler for the thread and call super of course. As far as bound services, it's up to app and how they want to start their service. However it's not possible to bind a broadcast receiver to a service so they would have to start their activity first and have that bind to their service. Once |
Our company encounters this issue, too. We use SDL lib to 4.11.1. We reference the solution #1168 using in our App and changing this crash into non-fatal event sending to Firebase Crashlytics. We look the event stack trace and check the problem appearing firstly in SdlBroadcastReceiver line:320 Therefore, We think maybe the condition(e.getMessage().contains("SdlRouterService")) is too strict to catch the crash. |
Bug Report
App crash with Fatal Exception: android.app.RemoteServiceException
Reproduction Steps
App crash reported by users, hence no known steps. Some feedback in playstore
Expected Behavior
App should not crash
Observed Behavior
App crashes
OS & Version Information
Test Case, Sample Code, and / or Example App
Crash Logs 1
OS Version: 8.1.0
Device: Galaxy Tab A 10.1
RAM Free: 13.9%
Disk Free: 40.9%
Fatal Exception: android.app.RemoteServiceException: Context.startForegroundService() did not then call Service.startForeground()
at android.app.ActivityThread$H.handleMessage + 1906(ActivityThread.java:1906)
at android.os.Handler.dispatchMessage + 106(Handler.java:106)
at android.os.Looper.loop + 164(Looper.java:164)
at android.app.ActivityThread.main + 7000(ActivityThread.java:7000)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run + 441(RuntimeInit.java:441)
at com.android.internal.os.ZygoteInit.main + 1408(ZygoteInit.java:1408)
Crash Logs 2
OS Version: 9
Device: ONEPLUS A3003
RAM Free: 33.8%
Disk Free: 12.2%
Fatal Exception: android.app.RemoteServiceException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{d132656 u0 com.<APP_NAME>.android/.applink.SdlRouterService}
at android.app.ActivityThread$H.handleMessage + 1835(ActivityThread.java:1835)
at android.os.Handler.dispatchMessage + 106(Handler.java:106)
at android.os.Looper.loop + 193(Looper.java:193)
at android.app.ActivityThread.main + 6863(ActivityThread.java:6863)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run + 537(RuntimeInit.java:537)
at com.android.internal.os.ZygoteInit.main + 858(ZygoteInit.java:858)
The text was updated successfully, but these errors were encountered: