react-native: Error processing request body: Error Domain=NSCocoaErrorDomain Code=257
Is this a bug report?
YES
Have you read the Contributing Guidelines?
YES
Environment
Environment: OS: macOS Sierra 10.12.6 Node: 8.5.0 Yarn: Not Found npm: 5.3.0 Watchman: 4.9.0 Xcode: Xcode 9.0 Build version 9A235 Android Studio: Not Found
Packages: (wanted => installed) react: 16.0.0-alpha.12 => 16.0.0-alpha.12 react-native: 0.48.4 => 0.48.4
Steps to Reproduce
- Take Images using ImagePicker Component
- Tried to upload the image i am getting this error
- it’s not often but it will happen once out of 5 times.
Expected Behavior
- Able to capture image and system should be able to get the image from the specified url/path
Actual Behavior
Error processing request body: Error Domain=NSCocoaErrorDomain Code=257 "The file “InspireME” couldn’t be opened because you don’t have permission to view it." UserInfo={NSFilePath=/var/containers/Bundle/Application/E7F57FD7-965B-4C2D-9765-E445356CA8C7/InspireME.app, NSUnderlyingError=0x1c085dc70 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}
Reproducible Demo
- Take Images using ImagePicker Component
- Tried to upload the image i am getting this error
- it’s not often but it will happen once out of 5 times.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 16 (1 by maintainers)
Use
image.path
instead ofimage.sourceUri
Use image.path instead of image.sourceUri This worked for me 😃
@LuisRizo
image.sourceURL
. For others running into this issue, confirm your source path/uri/url, it’s likely pointed somewhere other than it should be.I am uploading multi images to server, but if i don’t chose enough image, this error will happen. Now, i am checking image in client, anyone have other solution?