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

  1. Take Images using ImagePicker Component
  2. Tried to upload the image i am getting this error
  3. it’s not often but it will happen once out of 5 times.

Expected Behavior

  1. 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

  1. Take Images using ImagePicker Component
  2. Tried to upload the image i am getting this error
  3. it’s not often but it will happen once out of 5 times.

img_82754333519b-1

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 16 (1 by maintainers)

Most upvoted comments

Use image.path instead of image.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? screen shot 2017-11-20 at 10 52 54 am