We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expo 46, iOS,
The picture works fine and can use it, however I cannot access it in any other way.
But doing anything to this file file FileSystem operations (beyond getInfo) fails with a " isn't readable." error.
getInfo
[Error: File '/private/var/mobile/Containers/Data/Application/D606F8F1-0B4C-41D7-81A8-46AF72BED567/tmp/ReactNative/8CED5BE1-61D5-43B7- ... FF9.jpeg' isn't readable.]
This comment mentions the same issue on an enhancement to be able to select the directory images are stored in. #893 (comment)
Saving the image to image library does however work using await MediaLibrary.saveToLibraryAsync(path), but permissions there are probably different.
await MediaLibrary.saveToLibraryAsync(path)
const { path } = await camera.current.takePhoto({ qualityPrioritization: 'balanced', }); const file = FileSystem.documentDirectory + path.substring(path.lastIndexOf('/') + 1); await FileSystem.copyAsync({ from: path, to: file, });
Besides showing the image in an Image tag, there
iPhone 13
2.14.1
The text was updated successfully, but these errors were encountered:
MlKit also failed to access the image:
import ImageLabeling from '@react-native-ml-kit/image-labeling';
ImageLabeling.label(path); // Fails with image is nil which probably means no access
Sorry, something went wrong.
Closing as this is a stale issue - this might have been fixed with the full rewrite in VisionCamera V3 (🥳) - if not, please create a new issue.
Try the file:// prefix
file://
I got the same issue when sending the photo into Google mlkit. Adding file:// prefix did fix it for me. I'm using v3
Adding file:// prefix did fix it for me
This is not a bug, this is how the filesystem works. It's even in the docs that you need to add this if you want to read the file.
No branches or pull requests
What were you trying to do?
Expo 46, iOS,
The picture works fine and can use it, however I cannot access it in any other way.
But doing anything to this file file FileSystem operations (beyond
getInfo
) fails with a " isn't readable." error.[Error: File '/private/var/mobile/Containers/Data/Application/D606F8F1-0B4C-41D7-81A8-46AF72BED567/tmp/ReactNative/8CED5BE1-61D5-43B7- ... FF9.jpeg' isn't readable.]
This comment mentions the same issue on an enhancement to be able to select the directory images are stored in.
#893 (comment)
Saving the image to image library does however work using
await MediaLibrary.saveToLibraryAsync(path)
, but permissions there are probably different.Reproduceable Code
What happened instead?
Besides showing the image in an Image tag, there
Relevant log output
Device
iPhone 13
VisionCamera Version
2.14.1
Additional information
The text was updated successfully, but these errors were encountered: