React-native-image-crop-picker: Unable to write to tmp location.

Created on 17 Feb 2017  路  11Comments  路  Source: ivpusic/react-native-image-crop-picker

Version

Tell us which versions you are using:

  • react-native-image-crop-picker v0.12.4
  • react-native v0.41.0

Platform

Tell us to which platform this issue is related

  • iOS

Expected behaviour

Actual behaviour

I can't crop the image. After selecting the image, i can see the image preview.
When i click Choose, the error appear.

Steps to reproduce

1.

2.

3.

Attachments

// stacktrace or any other useful debug info

Warning: Attempt to present <UIAlertController: 0x7f9339486e70> on 
<QBImagePickerController: 0x7f93395526e0> whose view is not in the window hierarchy!

Most helpful comment

I got this error too, from specifying the compressImageMaxWidth option. It seems to not occur if I remove the compressImageMaxWidth option, or if I additionally supply the compressImageMaxHeight option. The image in question has a height of 2500 and width of 1668.

All 11 comments

hmm, cannot reproduce this. can you give me more details? like code example

@ivpusic
ups.. i get the real error now.
I think it's about ios permission, right?
Could you please help me.. 馃檱

{ [Error: Cannot save image. Unable to write to tmp location.]
  line: 7221,
  column: 20,
  sourceURL: 'http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false',
  framesToPop: 1,
  code: 'E_CANNOT_SAVE_IMAGE',
  domain: 'RCTErrorDomain',
  userInfo: null,
  nativeStackIOS: 
.....

I got this error too, from specifying the compressImageMaxWidth option. It seems to not occur if I remove the compressImageMaxWidth option, or if I additionally supply the compressImageMaxHeight option. The image in question has a height of 2500 and width of 1668.

Same happening for me. Providing compressImageMaxHeight is a workaround but I hope it get's a fix soon

have same issue

i have the same error when cropping if both move and scale are used. If i only scale the picture or only move it the save works well, compressImageMaxWidth and compressImageMaxHeight are not relevant in my case

Set atomically from YES to NO will solved the issue
ImageCropPicker.m L940
BOOL status = [data writeToFile:filePath atomically:NO];

. + 1 for issue when cropping and scaling on iOS

same here though

Was this page helpful?
0 / 5 - 0 ratings