-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
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
FileSystem.getInfoAsync on IOS throw error "ph://...' isn't readable" #4995
Comments
Hey @AramArakelyan22 - could you provide a snack that reproduces this issue? |
Hey @cruzach I'm also having this issue, here is a snack that reproduces it. https://snack.expo.io/By5ImfRZH Ultimately I'm trying to convert the image to Base64. |
Hm..I just tested that snack on my iPhone 7 and it worked without any problems. What device are you using to test? |
An iPad Pro, the simulator and device. Are you sure it works? In the demo, when you click on an image then FileSystem will error. It shows that way in the online snack I posted above |
Oops, sorry I made a mistake. You're right, I'm getting the same error |
Any ideas how to fix this? I am using SDK33 and having the same problem. |
Same problem, SDK 33, please let me know if we find a solution! |
Still broken in SDK 34 |
This also happens in published builds in testflight, not just in simulator. |
# Why Should fix #4995. # How Added support for `ph://` scheme in FileSystem. # Test Plan With this change running ```js CameraRoll.getPhotos({ first: 10, assetType: 'All', }).then(({ edges }) => FileSystem.getInfoAsync(edges[0].node.image.uri).then(console.log)); ``` rendered ``` Object { "exists": true, "isDirectory": false, "modificationTime": 1526314683.382386, "uri": null, } ``` instead of ``` [Unhandled promise rejection: Error: File 'ph://4607021A-7369-459C-881D-277E6612A4E7/L0/001' isn't readable.] ```
# Why Should fix #4995. # How Added support for `ph://` scheme in FileSystem. # Test Plan With this change running ```js CameraRoll.getPhotos({ first: 10, assetType: 'All', }).then(({ edges }) => FileSystem.getInfoAsync(edges[0].node.image.uri).then(console.log)); ``` rendered ``` Object { "exists": true, "isDirectory": false, "modificationTime": 1526314683.382386, "uri": null, } ``` instead of ``` [Unhandled promise rejection: Error: File 'ph://4607021A-7369-459C-881D-277E6612A4E7/L0/001' isn't readable.] ```
@sjchmiela does it make camera roll files accessible using Filesystem. readAsStringAsync ? Also documentation probably should be updated regarding receiving null in uri, not inputted uri as stated in docs. |
@sjchmiela I know this issue is closed, but how can we get this fix? For those running into this issue, I have added instructions on how to patch
|
Did you do them on an ejected project? Since these are in native code, you'll need to edit native code, i. e. also rebuild native code (or wait for native code update coming with SDK35-compatible Expo client). |
I did not, I was trying to edit on node_modules directly and rebuild the bundle. Thanks @sjchmiela |
Environment:
OS: IOS 10.14.4,
Node: 10.15.3,
npm: 6.4.1
Packages:
expo: 33.0.0,
react: 16.8.3,
react-native: https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gz
Device:
iphone Xr, IOS 12.2
Steps to Reproduce
code:
try {
FileSystem.getInfoAsync(url);
} catch(e) {
console.log(error.message);
}
output: File 'ph://1724924E-9632-492E-B4E1-8DB6C818FF5B/L0/001' isn't readable.
permissions CAMERA_ROLL granted.
It reproduce only on IOS, on Android it works fine.
How can i solve this problem?
The text was updated successfully, but these errors were encountered: