CAMERA_ROLL Permission return denied eventhough user grant it

Please provide the following:

  1. SDK Version: 35
  2. Platforms(Android/iOS/web/all): Android

My app is trying to get photo from user’s camera. I simply use this code in my expo App before calling ImagePicker.launchCameraAsync

const { status } = await Permissions.askAsync(Permissions.CAMERA, Permissions.CAMERA_ROLL);.
if(status !== ‘granted’) {
dispatchMsg(‘error’, ‘We need your permission to get photo’);
return;
}

from user perspective, they will see the system asking for permission twice

The problem is… eventhough user has granted the permission for both, the status are still “denied”! and the funny thing is this only happen in standalone production app. If i’m correctly recall… this issue happen only recently. My app has been in Playstore for more than 6 months and initially there is no problem until recently.

I tried to print debug message on production and this is the result:

  • Permissions.getAsync(Permissions.CAMERA): {“status”:“granted”,“expires”:“never”,“permissions”:{“camera”:{“status”:“granted”,“expires”:“never”}}}
  • Permissions.getAsync(Permissions.CAMERA_ROLL): {“status”:“denied”,“expires”:“never”,“permissions”:{“cameraRoll”:{“status”:“denied”,“expires”:“never”}}}

I was very sure I choose granting the permission… so does the users that reported to me the bug. And like i told you before this issue seem to occur only recently. Any ideas how to solve since this issue only occur in my production app.

EDIT: here is the screenshot of my app permission list from Android Setting. Doesn’t seem to show anything wrong

1 Like

@va1iant Hi, I’m the same issue, did you get anywhere with it please?

currently not… I tried to ask in stackoverflow but no one answering as well. I’m currently migrating to SDK38 (even when that means i need to update the app/play store binary for update) and hope the problem will be gone by itself

Thanks for replying, I’ve been trying all night to get it to work, but it just wont :frowning:

Good luck with migrating, let me know how it goes!

@va1iant

Hi,

Did you get it to work after?

still working on upgrading… really a headache upgrading other modules. Btw, what’s the content of your expo.android.permissions setting in app.json? mine previously “CAMERA”, “READ_EXTERNAL_STORAGE”, without “WRITE_EXTERNAL_STORAGE”, so i suspect if that’s the cause

Hi @va1iant,

Yeah, I can be a little tedious upgrading everything.

My app.json included READ/WRITE to external storage, but when I ran aapt I had a BUNCH more, which I wasn’t expecting.

My post is here, if you want to check it out.