Skip to content

Background messages only work if the message priority is set to 'high' #59

Description

@giovanijfc

Hello, I updated my react-native from version 0.66.3 to 0.69.5 and notifications on Android are not showing, iOS works normally.

Found this error in Android Studio Logcat:

2022-09-22 16:51:46.996 9240-9240/com.app E/RNFirebaseMsgReceiver: Background messages only work if the message priority is set to 'high' android.app.BackgroundServiceStartNotAllowedException: Not allowed to start service Intent { cmp=com.app/io.invertase.firebase.messaging.ReactNativeFirebaseMessagingHeadlessService (has extras) }: app is in background uid UidRecord{b3a7cf6 u0a870 RCVR idle change:idle|uncached procs:0 seq(0,0,0)} at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1941) at android.app.ContextImpl.startService(ContextImpl.java:1887) at android.content.ContextWrapper.startService(ContextWrapper.java:793) at android.content.ContextWrapper.startService(ContextWrapper.java:793) at io.invertase.firebase.messaging.ReactNativeFirebaseMessagingReceiver.onReceive(ReactNativeFirebaseMessagingReceiver.java:55) at android.app.ActivityThread.handleReceiver(ActivityThread.java:4843) at android.app.ActivityThread.access$1800(ActivityThread.java:315) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2297) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8751) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions