expo: FileSystem.copyAsync hanging on iOS

I’m using SDK 24.0.0 and I’m trying to copy an image file created using takePictureAsync and the ImageManipulator to a more permanent location using FileSystem.copyAsync. However on iOS (physical device) the call to FileSystem.copyAsync never returns, it seems to hang with no errors but only on iOS, it all works great on Android (physical device). Any ideas? Thanks!

The flow is as follows:

  1. Take picture with takePictureAsync
    this.camera.takePictureAsync().then(data => {
        this._resizeImage(data.uri);
    });
  1. Resize the image using the ImageManipulator
    const manipResult = await ImageManipulator.manipulate(
        image,
        [{ resize: { height }}]
    );
  1. Move image to permanent location
 const filename = new Date().getTime() + '.jpg';
 const image = Expo.FileSystem.documentDirectory + filename;

 await Expo.FileSystem.copyAsync({
      from: 'image uri',
      to: image
 });

Like I said it works fine on Android device and seems to only be an issue on iOS device, let me know if you need more information.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 20 (9 by maintainers)

Most upvoted comments

ok here is a snack reproducing the issue on iOS: https://snack.expo.io/HJgFbKUSM