Skip to content

Push notification is not working on Android 8 #380

@diegolmello

Description

@diegolmello
07-24 17:03:48.441 2823-2823/? E/AndroidRuntime: FATAL EXCEPTION: main
	Process: chat.rocket.reactnative.debug, PID: 2823
	java.lang.RuntimeException: Unable to start receiver com.google.android.gms.gcm.GcmReceiver: java.lang.IllegalStateException: Not allowed to start service Intent { act=com.google.android.c2dm.intent.RECEIVE flg=0x1000010 pkg=chat.rocket.reactnative.debug cmp=chat.rocket.reactnative.debug/com.wix.reactnativenotifications.gcm.GcmMessageHandlerService (has extras) }: app is in background uid UidRecord{982ece1 u0a86 RCVR idle procs:1 seq(0,0,0)}
		at android.app.ActivityThread.handleReceiver(ActivityThread.java:3259)
		at android.app.ActivityThread.-wrap17(Unknown Source:0)
		at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1677)
		at android.os.Handler.dispatchMessage(Handler.java:105)
		at android.os.Looper.loop(Looper.java:164)
		at android.app.ActivityThread.main(ActivityThread.java:6541)
		at java.lang.reflect.Method.invoke(Native Method)
		at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
		at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
	Caused by: java.lang.IllegalStateException: Not allowed to start service Intent { act=com.google.android.c2dm.intent.RECEIVE flg=0x1000010 pkg=chat.rocket.reactnative.debug cmp=chat.rocket.reactnative.debug/com.wix.reactnativenotifications.gcm.GcmMessageHandlerService (has extras) }: app is in background uid UidRecord{982ece1 u0a86 RCVR idle procs:1 seq(0,0,0)}
		at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1505)
		at android.app.ContextImpl.startService(ContextImpl.java:1461)
		at android.content.ContextWrapper.startService(ContextWrapper.java:644)
		at android.content.ContextWrapper.startService(ContextWrapper.java:644)
		at android.support.v4.content.WakefulBroadcastReceiver.startWakefulService(WakefulBroadcastReceiver.java:99)
		at com.google.android.gms.gcm.GcmReceiver.doStartService(Unknown Source:22)
		at com.google.android.gms.gcm.GcmReceiver.zzd(Unknown Source:0)
		at com.google.android.gms.gcm.GcmReceiver.onReceive(Unknown Source:98)
		at android.app.ActivityThread.handleReceiver(ActivityThread.java:3252)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions