Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Illegal State Exception in Production for Android 8.0 using latest master commit

See original GitHub issue


We’re testing out 3.1.1 which doesn’t seem to be on NPM just yet. We seem to be getting crashes on version 8.0+ of android in production related to the requestPermission call of the react-native-push-notification’s library.

I’ve attached a screenshot of the crash.

screen shot 2018-07-23 at 6 31 45 pm

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

JakeRawrcommented, Sep 12, 2018

(Issue #803) #809 doesn’t seems to solve the problem. It prevented the crash. But I don’t think notification are received for 8.0+

we need to have implementation like @diegolmello

diegolmellocommented, Jul 24, 2018

I’ve a similar issue with Oreo. Running version 3.1.1 on RN 0.56.

07-24 17:52:01.010 4130-4160/? E/unknown:ReactNative: Exception in native call
	java.lang.IllegalStateException: Not allowed to start service Intent { cmp=chat.rocket.reactnative.debug/com.dieam.reactnativepushnotification.modules.RNPushNotificationRegistrationService (has extras) }: app is in background uid UidRecord{b647c53 u0a86 TRNB idle procs:1 seq(0,0,0)}
		at android.content.ContextWrapper.startService(
		at android.content.ContextWrapper.startService(
		at com.dieam.reactnativepushnotification.modules.RNPushNotification.requestPermissions(
		at java.lang.reflect.Method.invoke(Native Method)
		at com.facebook.react.bridge.JavaMethodWrapper.invoke(
		at com.facebook.react.bridge.JavaModuleWrapper.invoke(
		at Method)
		at android.os.Handler.handleCallback(
		at android.os.Handler.dispatchMessage(
		at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(
		at android.os.Looper.loop(
		at com.facebook.react.bridge.queue.MessageQueueThreadImpl$
Read more comments on GitHub >

github_iconTop Results From Across the Web

Android 8.0: java.lang.IllegalStateException: Not allowed to ...
8. It means that you cannot start a service when your app is in the background · 23. this has nothing to do...
Read more >
Apps may not schedule more than 100 distinct jobs / alpha08 ...
After about 100 jobs the workmanager crashes with: java.lang.IllegalStateException: Apps may not schedule more than 100 distinct jobs.
Read more >
IllegalStateException - Android Developers
Constructs an IllegalStateException with no detail message. A detail message is a String that describes this particular exception.
Read more >
SonarScanner failed in CI with java.lang.IllegalStateException ...
Our Sonar CI job failed after a merge to master (of a squashed commit from a PR where the CI job had succeeded...
Read more >
Jdbi 3 Developer Guide
Jdbi will attempt to rewrite such nextExceptions into "suppressed exceptions" (new in Java 8) so that your logs are more helpful: java.sql.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found