prscX / react-native-photo-editor

React Native: Native Photo Editor
Apache License 2.0
1.11k stars 241 forks source link

PhotoEditor.Edit() Crashing #165

Open AllRiskNetto opened 3 years ago

AllRiskNetto commented 3 years ago

When I make a PhotoEditor.Edit it's crashing the app

image

My Coding

aziz-hayan commented 3 years ago

I am Facing the Same problem. I think We are not supposed to be using URI as Path or something like move the image to app sandbox which i don't understand myself. If you Have Figured out the solution please Share.

AllRiskNetto commented 3 years ago

I am studying react-native-fs to come up with a logic of when the image comes from the camera I throw this photo to a directory and then pass the path to the component.

NOTE: if the photo is in the gallery, everything works normally

AllRiskNetto commented 3 years ago

hello, as I'm using the react-native-image-picker in the component's response it gives me the path where the image is stored on the device, so the solution I found was to pass this path to the component instead of the uri

mshehrozsajjad commented 3 years ago

Hi, for me this error was caused due to stickers in iOS you have to either remove them or add them to your project as mentioned in this comment. https://github.com/prscX/react-native-photo-editor/issues/109#issuecomment-582643497

hope this helps.

ProgrammerPawan commented 2 years ago

@AllRiskNetto I'm facing same problem could you please help me, i'm passing uri like below. PhotoEditor.Edit({ path: this.state.imageCollection[0].uri, }); Please help me on how to pass path to the component.

sadewa25 commented 2 years ago

@AllRiskNetto I'm facing same problem could you please help me, i'm passing uri like below. PhotoEditor.Edit({ path: this.state.imageCollection[0].uri, }); Please help me on how to pass path to the component.

Are you solved this issue?, because this is also happen for me

zaraganja commented 1 year ago

pay attention to your image path, get console.log wherever you path is there, and get the correct path of your photo. the problem is your photo path. else pay attention to your pod file and flipper kit installation. i solved the problem!

srinu6 commented 3 weeks ago

Is this crash same as mine? I am getting the crash on main.m file.

Thread 1: "*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil" Please give an helping hand to fix this issue.