Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index Out of Bounds at Permission Mate init method #1

Open
abdulmic opened this issue Apr 24, 2024 · 0 comments
Open

Index Out of Bounds at Permission Mate init method #1

abdulmic opened this issue Apr 24, 2024 · 0 comments

Comments

@abdulmic
Copy link

abdulmic commented Apr 24, 2024

Hi! I am using Permission mate in my production app. But Some Users are experiencing crashes about index out of bounds below is the stack trace of the problem. Library is implemented according to the details provided in sample app and GitHub repo and worked fine in our testing. Could you please take a look at this issue?

Failure delivering result ResultInfo{who=@android:requestPermissions:, request=1962214691, result=-1, data=Intent { act=android.content.pm.action.REQUEST_PERMISSIONS (has extras) }} to activity {com.packagename.MainActivity}: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at android.app.ActivityThread.deliverResults(ActivityThread.java:5078)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4409)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4470)
at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:51)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2199)
at android.os.Handler.dispatchMessage(Handler.java:112)
at android.os.Looper.loop(Looper.java:216)
at android.app.ActivityThread.main(ActivityThread.java:7625)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)

Exception: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.get(ArrayList.java:437)
at com.farimarwat.permissionmate.PermissionMate.init$lambda$1(PermissionMate.kt:19)
at androidx.activity.result.ActivityResultRegistry.dispatchResult(ActivityResultRegistry.java:49)
at androidx.activity.ComponentActivity$1$1.run(ComponentActivity.java:49)
at android.os.Handler.handleCallback(Handler.java:907)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:216)
at android.app.ActivityThread.main(ActivityThread.java:7625)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant