"File isn't readable" when using `ImageManipulator.manipulateAsync` with Expo SDK 39 on iOS

SDK Version: 39
Platforms(Android/iOS/web/all): iOS

ImageManipulator.manipulateAsync works for me on Android but on iOS, I get “File isn’t readable” as described in this bug:

https://github.com/expo/expo/issues/3967

It was supposedly fixed in September. Wondering if anyone is getting this old bug again in SDK 39.

my code:

	const compressImage = async (uri) => {
		const result = await manipulateAsync(`${uri}`, [{ rotate: -90 }], { compress: 0.4, format: SaveFormat.JPEG })
		return setFileUri(result.uri)
	}

Because the imageManipulator documentation says it was designed for local, not network, images, I tried to download the image first using Filesystem.downloadAsync. Once again, it works fine in Android and not in iOS. The error given is "Unable to download file: Error Domain=NSURLErrorDomain Code=-1002 “unsupported URL” "

The problem is that the URL wasn’t readable on iOS for imageManipulator (and Expo’s FileSystem functions) because some of the sequences in the URL needed escaping. Wrapped it in JavaScript’s encodeURI() and the remote image was read just fine.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.