Closed nimrod-zg closed 5 years ago
Hi ! Your params seem ok. Are you sure that the image given at this filepath exists ? You could try to debug it step by step in xcode, that would allow you to understand when a nil object is given.
A few updates, and some more info that I should have included before -
react-native-document-scanner
.Our current flow -
react-native-document-scanner
.onPictureTaken
callback, this is similar to/private/var/mobile/Containers/Data/Application/0C941FC0-7A82-4F99-8209-65D7ACD1E0FF/tmp/initial_img_1560416408.jpeg
file://
and passing this to the CustomCrop
in the initialImage
prop.crop()
. When not in debug, this causes the error detailed above.Things to note and open questions -
crop()
, so it seems like the file exists and can be read.README.md
the initiailImage
prop described as "Base64 encoded image you want to be cropped". From playing around and reading the native code, this seem to be outdated, as it seems like passing just the base64 data, or even a data URL, is no supported.CIImage
object is causing the ciImage
variable to be set to nil
. What we're failing to understand is why is the file failing to be read. Is it possible that there is some hidden permissions issue or something like that? This sounds unlikely because the file is being read correctly be the preview Image
RN component, but it's the only idea we have at the moment.Hi @nimrod-zg sorry I donβt have time to help. Have you found a way to fix your problem ?
@Michaelvilleneuve - closed this issue now as this seems to have been some strange build issue or something. We've just finished releasing a new native version for iOS without making any changes to the code and this seems to have - somewhat frustratingly I must say - completely resolved the issue π€¦ββ Anyway, we're good now π€·ββ Thank you!
We are getting this exception when calling
crop()
on some iPhone models. We haven't managed to pinpoint the issue exactly, but it seems to be occurring on newer models like the iPhone X, rather than on older ones like the 6. Looking online for this error and finding that the issue happens on newer, presumably faster, iPhones causes us to think it may be some timing issue with accessing the file or something, but we could be in the wrong direction. The issue does not recreate on an iPhone X simulator.Any advice on how to solve this, or even debug this, is welcome.