oracle / oracle/pushiomanager-react-native

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

Open
#59 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
19
Forks
19
PR merge metrics
No merged PRs in 30d

Description

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)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Android Studio Logcat trace, especially ReactNativeFirebaseMessagingReceiver.onReceive at ReactNativeFirebaseMessagingReceiver.java:55, and inspect how background messages are handled after the React Native upgrade. Reproduce the issue with Android background messages and verify that notifications are shown without the reported priority-related failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java, react-native
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.