Skip to content
This repository has been archived by the owner on Jan 14, 2018. It is now read-only.

Android O (8.1.0) : invalid channel for service notification #473

Open
MS893 opened this issue Dec 8, 2017 · 8 comments
Open

Android O (8.1.0) : invalid channel for service notification #473

MS893 opened this issue Dec 8, 2017 · 8 comments

Comments

@MS893
Copy link

MS893 commented Dec 8, 2017

I've got this new error for users using android 8.1.0 :
"android.app.RemoteServiceException: Bad notification for startForeground: java.lang.RuntimeException: invalid channel for service notification: Notification(channel=null..."

I can reproduce the error on emulator using API level 27.

I've found this topic :
https://stackoverflow.com/questions/47531742/startforeground-fail-after-upgrade-to-android-8-1

The error is not systematic and depend on the robospice service : if the service is completed when onDestroy is called => no crash, if the service is still running => crash.

I'm not 100% that the crash is due to Robospice, but I do not use notification manager in my code, and it always crash when leaving the app with service un background.

Here is the full error in logcat :
E/UncaughtException: android.app.RemoteServiceException: Bad notification for startForeground: java.lang.RuntimeException: invalid channel for service notification: Notification(channel=null pri=-2 contentView=null vibrate=null sound=null defaults=0x0 flags=0x40 color=0x00000000 vis=PRIVATE)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1768)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

Thanks for your help.

@shanuka
Copy link

shanuka commented Dec 8, 2017

i got this isse because of the firebase. disable firebase check again

@MS893
Copy link
Author

MS893 commented Dec 8, 2017

Thanks for your answer, but I want to use Firebase ! is there a solution to enable Firebase after ?

For the moment, I found a solution : I use API 26 target instead of API 27. But I think it is provisional...

@shanuka
Copy link

shanuka commented Dec 8, 2017

which servces you may use in your project.

@MS893
Copy link
Author

MS893 commented Dec 8, 2017

I use crash reporting and notifications, but I can remove notifications, it's not essential...

@shanuka
Copy link

shanuka commented Dec 8, 2017

crash reporting working fine with 27. i dont know about notifications. i had trouble with Performance.

@shanuka
Copy link

shanuka commented Dec 8, 2017

i thought performance services still in beta if i found soution ill let you know 🙂

@MS893
Copy link
Author

MS893 commented Dec 8, 2017

OK thanks !

@tyates
Copy link

tyates commented Dec 21, 2017

Did anyone find any solution for this?

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

No branches or pull requests

3 participants