{"action":"created","issue":{"url":"https://api.github.com/repos/tbruyelle/RxPermissions/issues/3","labels_url":"https://api.github.com/repos/tbruyelle/RxPermissions/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/tbruyelle/RxPermissions/issues/3/comments","events_url":"https://api.github.com/repos/tbruyelle/RxPermissions/issues/3/events","html_url":"https://github.com/tbruyelle/RxPermissions/issues/3","id":109185782,"number":3,"title":"Crash on rotation","user":{"login":"Gi-lo","id":460060,"avatar_url":"https://avatars.githubusercontent.com/u/460060?v=3","gravatar_id":"","url":"https://api.github.com/users/Gi-lo","html_url":"https://github.com/Gi-lo","followers_url":"https://api.github.com/users/Gi-lo/followers","following_url":"https://api.github.com/users/Gi-lo/following{/other_user}","gists_url":"https://api.github.com/users/Gi-lo/gists{/gist_id}","starred_url":"https://api.github.com/users/Gi-lo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gi-lo/subscriptions","organizations_url":"https://api.github.com/users/Gi-lo/orgs","repos_url":"https://api.github.com/users/Gi-lo/repos","events_url":"https://api.github.com/users/Gi-lo/events{/privacy}","received_events_url":"https://api.github.com/users/Gi-lo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tbruyelle/RxPermissions/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/tbruyelle/RxPermissions/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":45,"created_at":"2015-09-30T21:45:06Z","updated_at":"2015-10-25T17:36:48Z","closed_at":null,"body":"Hey there,\r\n\r\nFirst of all nice work. Sadly I have to say that your solution currently does not work with rotation changes. Simply press \"Enable Camera\", rotate your device and press  \"DENY\" on the popup. This will result in the following crash:\r\n\r\n```\r\n \"09-30 23:42:06.090  31948-31948/com.tbruyelle.rxpermissions.sample E/AndroidRuntime﹕ FATAL EXCEPTION: main\r\n    Process: com.tbruyelle.rxpermissions.sample, PID: 31948\r\n    java.lang.RuntimeException: Failure delivering result ResultInfo{who=@android:requestPermissions:, request=463403621, result=-1, data=Intent { act=android.content.pm.action.REQUEST_PERMISSIONS (has extras) }} to activity {com.tbruyelle.rxpermissions.sample/com.tbruyelle.rxpermissions.sample.MainActivity}: java.lang.IllegalStateException: RxPermission.onRequestPermissionsResult invoked but didn't find the corresponding permission request.\r\n            at android.app.ActivityThread.deliverResults(ActivityThread.java:3699)\r\n            at android.app.ActivityThread.handleSendResult(ActivityThread.java:3742)\r\n            at android.app.ActivityThread.-wrap16(ActivityThread.java)\r\n            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1393)\r\n            at android.os.Handler.dispatchMessage(Handler.java:102)\r\n            at android.os.Looper.loop(Looper.java:148)\r\n            at android.app.ActivityThread.main(ActivityThread.java:5417)\r\n            at java.lang.reflect.Method.invoke(Native Method)\r\n            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)\r\n            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)\r\n     Caused by: java.lang.IllegalStateException: RxPermission.onRequestPermissionsResult invoked but didn't find the corresponding permission request.\r\n            at com.tbruyelle.rxpermissions.RxPermissions.onRequestPermissionsResult(RxPermissions.java:123)\r\n            at com.tbruyelle.rxpermissions.sample.MainActivity.onRequestPermissionsResult(MainActivity.java:36)\r\n            at android.app.Activity.dispatchRequestPermissionsResult(Activity.java:6553)\r\n            at android.app.Activity.dispatchActivityResult(Activity.java:6432)\r\n            at android.app.ActivityThread.deliverResults(ActivityThread.java:3695)\r\n            at android.app.ActivityThread.handleSendResult(ActivityThread.java:3742)\r\n            at android.app.ActivityThread.-wrap16(ActivityThread.java)\r\n            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1393)\r\n            at android.os.Handler.dispatchMessage(Handler.java:102)\r\n            at android.os.Looper.loop(Looper.java:148)\r\n            at android.app.ActivityThread.main(ActivityThread.java:5417)\r\n            at java.lang.reflect.Method.invoke(Native Method)\r\n            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)\r\n            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)\r\n````\r\n\r\nDo you have any ideas how to tackle this problem?"},"comment":{"url":"https://api.github.com/repos/tbruyelle/RxPermissions/issues/comments/150947222","html_url":"https://github.com/tbruyelle/RxPermissions/issues/3#issuecomment-150947222","issue_url":"https://api.github.com/repos/tbruyelle/RxPermissions/issues/3","id":150947222,"user":{"login":"andaag","id":826023,"avatar_url":"https://avatars.githubusercontent.com/u/826023?v=3","gravatar_id":"","url":"https://api.github.com/users/andaag","html_url":"https://github.com/andaag","followers_url":"https://api.github.com/users/andaag/followers","following_url":"https://api.github.com/users/andaag/following{/other_user}","gists_url":"https://api.github.com/users/andaag/gists{/gist_id}","starred_url":"https://api.github.com/users/andaag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andaag/subscriptions","organizations_url":"https://api.github.com/users/andaag/orgs","repos_url":"https://api.github.com/users/andaag/repos","events_url":"https://api.github.com/users/andaag/events{/privacy}","received_events_url":"https://api.github.com/users/andaag/received_events","type":"User","site_admin":false},"created_at":"2015-10-25T17:36:48Z","updated_at":"2015-10-25T17:36:48Z","body":"Also, currently the branch doesn't allow you to click the button more than once. Not an issue with \"turn camera on\" functionality, but it'll break a whole lot of other flows."}}