question-mark
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.

Requesting and checking permissions in parallel not working

See original GitHub issue

Description

Hi, I think I found a race condition between checking and requesting permissions.

I have the following setup:

  • FragmentA and FragmentB are open in parallel within tabs
  • FragmentA is requesting permissions -> system dialog appears (not selected anything yet)
  • While dialog is displayed (from FragmentA), FragmentB checks for permissions within onMapReady() callback
  • When I select something on the permission dialog, I wont get the result back in FragmentA anymore.

In my opinion is the reason here in the RuntimePermissionRequest init block. It overwrites the listeners in ResultLauncherRuntimePermissionHandler. I know you described in ResultLauncherRuntimePermissionHandler that it can only handle one request at a time, but I think a simple check for permissions should act in a different way.

What do you think about this behavior? Thank you in advance.


KPermissions version: 3.3.0

API level: 33

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
fondesacommented, Nov 22, 2022

Marking this as done since the PR should fix the original issue. Feel free to re-open this if necessary. Thanks for your input and time to open the issue.

0reactions
fondesacommented, Nov 22, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

ERROR: Access denied. You do not have enough rights to ...
Locate the section "Sharing & Permissions", select user A , click on a cogwheel to "Make 'A (Me)' the owner". Launch the virtual...
Read more >
Parallel Space or Multiple Account not working in Android 10
- Open Mobile settings. - Search 'Permission Manager'. - Check all permission and allow permission for 'Parallel Space' and 'Parallel Space ...
Read more >
How to make the parallel port to work? - Unix StackExchange
The issue is with the privileges of the parallel port: by default, it is accessible only by users of the group lp ....
Read more >
zoontek/react-native-permissions - GitHub
An unified permissions API for React Native on iOS and Android - GitHub ... help with issues, prioritize bugfixes, feature requests, etc.
Read more >
Request app permissions - Android Developers
... Provide configuration activities · Address common issues · Improve performace with hardware acceleration · Optimize performance and battery life.
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found