Comments (5)
I had same error today in Craslytics(lg_h815 - Android 6.0):
Fatal Exception: java.lang.RuntimeException
Failure delivering result ResultInfo{who=@android:requestPermissions:, request=42, result=-1, data=Intent { act=android.content.pm.action.REQUEST_PERMISSIONS (has extras) }} to activity {xxx/com.tbruyelle.rxpermissions.ShadowActivity}: java.lang.IllegalStateException: RxPermissions.onRequestPermissionsResult invoked but didn't find the corresponding permission request.
Raw
android.app.ActivityThread.deliverResults (ActivityThread.java:3742)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:620)
Caused by java.lang.IllegalStateException
com.tbruyelle.rxpermissions.RxPermissions.onRequestPermissionsResult (RxPermissions.java:286)
com.tbruyelle.rxpermissions.ShadowActivity.onRequestPermissionsResult (ShadowActivity.java:32)
android.app.Activity.dispatchRequestPermissionsResult (Activity.java:6588)
android.app.Activity.dispatchActivityResult (Activity.java:6467)
android.app.ActivityThread.deliverResults (ActivityThread.java:3738)
android.app.ActivityThread.handleSendResult (ActivityThread.java:3785)
android.app.ActivityThread.access$1400 (ActivityThread.java:157)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1405)
android.os.Handler.dispatchMessage (Handler.java:102)
android.os.Looper.loop (Looper.java:148)
android.app.ActivityThread.main (ActivityThread.java:5525)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:730)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:620)
from rxpermissions.
ok, first you don't need to check the sdk version, it's handled by the library. If Build.VERSION.SDK_INT < 23
, the observer will immediately receive a granted result.
Secondly, it seems you're not well informed about runtime permissions. Only a part of the permissions requires a request : the dangerous ones, as Google names them [1].
About the crash itself, I think it's exactly because you request permissions that don't need to be requested. Try to filter the parameter list with only dangerous permissions and it should work.
That said you pointed a weakness in the library that needs a fix. Thanks !
[1] https://developer.android.com/guide/topics/security/permissions.html#normal-dangerous
from rxpermissions.
After some tests, there is finally no issue in requesting non-dangerous permissions, but the framework will always answer the permission is not granted. The answer is propagated without change by the library.
Could you tell me if you still have the issue with the last version of RxPermissions
?
from rxpermissions.
Closed for no activity
from rxpermissions.
+1 Same error on Samsyng galaxy edge 7 in crashlytics
Fatal Exception: java.lang.RuntimeException: Unable to resume activity {com.bound360.temed.patient/com.tbruyelle.rxpermissions.ShadowActivity}: java.lang.RuntimeException: Failure delivering result ResultInfo{who=@android:requestPermissions:, request=42, result=-1, data=Intent { act=android.content.pm.action.REQUEST_PERMISSIONS VirtualScreenParam=Params{mDisplayId=-1, null, mFlags=0x00000000)} (has extras) }} to activity {com.bound360.temed.patient/com.tbruyelle.rxpermissions.ShadowActivity}: java.lang.IllegalStateException: RxPermissions.onRequestPermissionsResult invoked but didn't find the corresponding permission request.
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4156)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4250)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3361)
at android.app.ActivityThread.access$1100(ActivityThread.java:222)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1795)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7229)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Caused by java.lang.RuntimeException: Failure delivering result ResultInfo{who=@android:requestPermissions:, request=42, result=-1, data=Intent { act=android.content.pm.action.REQUEST_PERMISSIONS VirtualScreenParam=Params{mDisplayId=-1, null, mFlags=0x00000000)} (has extras) }} to activity {com.bound360.temed.patient/com.tbruyelle.rxpermissions.ShadowActivity}: java.lang.IllegalStateException: RxPermissions.onRequestPermissionsResult invoked but didn't find the corresponding permission request.
at android.app.ActivityThread.deliverResults(ActivityThread.java:4925)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4142)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4250)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3361)
at android.app.ActivityThread.access$1100(ActivityThread.java:222)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1795)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7229)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Caused by java.lang.IllegalStateException: RxPermissions.onRequestPermissionsResult invoked but didn't find the corresponding permission request.
at com.tbruyelle.rxpermissions.RxPermissions.onRequestPermissionsResult(RxPermissions.java:286)
at com.tbruyelle.rxpermissions.ShadowActivity.onRequestPermissionsResult(ShadowActivity.java:32)
at android.app.Activity.dispatchRequestPermissionsResult(Activity.java:7263)
at android.app.Activity.dispatchActivityResult(Activity.java:7141)
at android.app.ActivityThread.deliverResults(ActivityThread.java:4921)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4142)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4250)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3361)
at android.app.ActivityThread.access$1100(ActivityThread.java:222)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1795)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7229)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
from rxpermissions.
Related Issues (20)
- Move library to maven central HOT 2
- I want to know about it's licensing
- How does it work with Android 11? HOT 1
- bug: request permission twice, in one subscribe receive callback twice
- 点击dialog外侧,dialog也会取消,且shouldShowRequestPermissionRationale=flase HOT 3
- Migrate to Maven Central
- Typo is Readme File HOT 3
- Bug:Can not perform this action after onSaveInstanceState
- Gradle import failed HOT 8
- Need to Migrate JCenter to mavenCentral HOT 5
- Cannot access class 'io.reactivex.rxjava3.core.Observable'. Check your module classpath for missing or conflicting dependencies HOT 2
- Bug: requestEach callback do not contain each permission result HOT 3
- Memory Leak
- FragmentTransition Bug
- Crash with new navigation library HOT 3
- Removing Jetifier
- android 11 中 获取应用列表时一个神奇现象
- Bug can not import packagename library HOT 2
- compileSdk 33,pixel 手机android 13,请求权限失败 HOT 7
- 没有subscribe方法 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rxpermissions.