Permissions.AskAsync(CAMERA_ROLL) is granted yet missing camera roll permission is returned

Hello,

I tried to add the following code to my main React app

const {status_roll} = await Permissions.askAsync(Permissions.CAMERA_ROLL);
console.info('status_roll = ’ + JSON.stringify(status_roll));

The status_roll returns granted, but any time I try to pick an image from camera roll (ImagePicker.launchImageLibraryAsync), I keep on getting “Missing camera roll permission”. This is happening in iOS Simulator iPhone 8, using latest version of Expo.

Please let me know what I may be doing wrong here.

Thank you,

4 Likes

I’m having the same problem here.

Permissions.askAsync(Permissions.CAMERA) and Permissions.askAsync(Permissions.CAMERA_ROLL) are granted, but when I try to pick an image from ImagePicker.launchCameraAsync I get “[Unhandled promise rejection: Error: Missing camera or camera roll permission.]” or from ImagePicker.launchImageLibraryAsync I get “[Unhandled promise rejection: Error: Missing camera roll permission.]”.

This is happening on device (iPhone 5s) and simulator iPhone SE. Using version 25.0.0 of Expo.

Actually I never had to ask for permission before with ImagePicker, but after installing the latest expo client, it keeps asking me for permission. It doesn’t matter if the permission it’s granted or not. It just don’t work anymore.

1 Like

I am having the same issue. askAsync(Permissions.CAMERA_ROLL) doesn’t even come up with a prompt asking for permissions, it just defaults to status === ‘granted’ and then I get a permission failure when I try to use the ImagePicker.launchImageLibraryAsync. Also sdkVersion is 25.0.0 and package.json is ^25.0.0. Happens in both the iPhone 8 Plus simulator and iPhone X simulator.

1 Like

I tried with the below code and still no luck, we simply cannot access the camera roll any more…

const { status: existingStatus } = await Permissions.getAsync(Permissions.CAMERA_ROLL);
let finalStatus = existingStatus;
// only ask if permissions have not already been determined, because
// iOS won’t necessarily prompt the user a second time.
if (existingStatus !== ‘granted’) {
// Android remote notification permissions are granted during the app
// install, so this will only ask on iOS
const { status } = await Permissions.askAsync(Permissions.CAMERA_ROLL);
finalStatus = status;
}
// Stop here if the user did not grant permissions
if (finalStatus !== ‘granted’) {
return;
}

Hi guys, so sorry for your struggle! It looks like this problem only occurs for SDK 25 so the best idea would be to upgrade. We’ll need to create a patch for expo sdk and will let you know if it is available (hopefully soon).

Hi @aalices, I could upgrade, but everything was working just fine with sdk 25. After installing the latest Expo Client the problem started. I just released a version to testflight and ImagePicker is working as expected. It just don’t work with the lasted Expo Client.

2 Likes

I had this problem as well, it only happens with the latest Expo client, so I believe the problem is in the client

1 Like

Hello @aalices, thank you for your prompt reply and looking forward to getting new patch soon. Will there be an issue open for this we can watch?

Having the same problem. Permissions.AskAsync(Permissions.CAMERA_ROLL) outright doesn’t even bring up the permission prompt and just returns ‘granted’ even though the permission isn’t actually granted.
This is on an iPhone 5S where I installed Expo just a few hours ago, so I’m probably on the latest client too.

We’re seeing this issue come up as well with the latest version of Expo (deleted and re-installed client, that’s when the errors started.)

Same as @nmacambira1d never had to use permissions before with launchCameraAsync and launchImageLibraryAsync, but now it barks about permissions. I implemented the following solution which does work on Pixel with Android 8.1.0. It doesn’t however, work on any iphone devices that we’ve tested yet.

https://gist.github.com/parappathekappa/de3bb375171e07ca9efbbd754aad42fe

For some reason we found that camera functionality needed permissions to both camera and camera roll (maybe for saving the camera to the device?)

ever since i updated the latest expo client on iphone, the following code would show “missing camera roll Permission”

useCameraHandler = async () => {
const permissions = Permissions.CAMERA;
const status = await Permissions.getAsync(permissions);
console.log('permissions and status of CAMERA: ', permissions, status);
let result = await ImagePicker.launchCameraAsync({
allowsEditing: true,
aspect: [4, 3],
base64: true
});

but when i load the app on the ios simulator(installed with older version of expo client) this ‘missing camera roll permission’ error is gone

Same here :frowning:
I have a presentation on Tuesday and don’t know what to do

1 Like

Do anyone here know how, (if possible) you can roll back to an earlier version of the expo client?

Dear Expo team: this is a major problem. Is there any solution?

Thank you!

3 Likes

Upgrading to v27 seems to have fixed the problem.

I am having the same issue.

I have updated expo to v27 and the problem is still there. Nothing changed. Please do fix this as its very major problem.

2 Likes

hey folks, here’s a snack that shows what you need to do: Permissions with ImagePicker - Snack

basically you need to request CAMERA permissions if you want to use the launchCameraAsync method and CAMERA_ROLL if you use launchImageLibraryAsync

6 Likes

Thanks a lot. Now it is solved :slight_smile:

Hello @notbrent, I implemented your code change and I am still getting the same ‘missing camera roll permission’ error. Using iPhone 8 iOS simulator. Is there an update / patch I need to install first?
Thank you,

1 Like