java.lang.IllegalStateException

Tried to use permissions API while not attached to an Activity.

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web25336

  • Tried to use permissions API while not attached to an Activity.
  • via GitHub by renas
    , 1 year ago
    Fragment LookFragment{4187f558} not attached to Activity
  • via GitHub by muzirian
    , 1 year ago
    Fragment OsmEditsFragment{3bbd432c} not attached to Activity
  • Stack trace

    • java.lang.IllegalStateException: Tried to use permissions API while not attached to an Activity. at com.facebook.react.modules.permissions.PermissionsModule.getPermissionAwareActivity(PermissionsModule.java:123) at com.facebook.react.modules.permissions.PermissionsModule.shouldShowRequestPermissionRationale(PermissionsModule.java:73) at java.lang.reflect.Method.invoke(Native Method) at com.facebook.react.bridge.BaseJavaModule$JavaMethod.invoke(BaseJavaModule.java:322) at com.facebook.react.cxxbridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:158) at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31) at android.os.Looper.loop(Looper.java:158) at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:196) at java.lang.Thread.run(Thread.java:818)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    You’re the first here who have seen this exception.