ivpusic / react-native-image-crop-picker

iOS/Android image picker with support for camera, video, configurable compression, multiple images and cropping
MIT License
6.13k stars 1.56k forks source link

App crashes when selecting a video on Android #2002

Open cweise opened 11 months ago

cweise commented 11 months ago

Version

Tell us which versions you are using:

Platform

Expected behaviour

Actual behaviour

Steps to reproduce

  1. Open gallery
  2. Select a video
  3. App crashes

Attachments

Bildschirmfoto 2023-11-23 um 20 15 53

https://github.com/ivpusic/react-native-image-crop-picker/assets/2069576/ade3a5e3-5c67-409f-8685-9ae720801c12

https://github.com/ivpusic/react-native-image-crop-picker/assets/2069576/b0c90358-65f9-4117-985a-49920993704e

julekgwa commented 11 months ago

Try using the path instead of sourceURL

const file = Platform.select({
    ios: `file://${values.profilePhoto.path}`,
    android: values.profilePhoto.path,
 }),
npaul2173 commented 11 months ago

I also am facing the same error, but for around 4-5 videos

Adil7767 commented 8 months ago

"react-native": "0.71.7", "react-native-image-crop-picker": "^0.40.2", when i upload the video greater then 2 minutes app crash with out any error

UsmanAlgoace commented 8 months ago

Getting the same issue, works on videos less than around 200mb, but crashes if the video size is larger, anyone got any solution ?

Adil7767 commented 8 months ago

videos

Getting the same issue, works on videos less than around 200mb, but crashes if the video size is larger, anyone got any solution ?

You can use alternative like react-native-image -picker to get the large size video or images

krmao commented 7 months ago

may be you can try my patch

msaadtabani commented 6 months ago

has any one got the chance to solve this issue??

atultiwaree commented 5 months ago

I'm getting negative file size when larger than 1GB, the reason might be temporary data type allocated for media buffer, media file might exceeding the size limit of that variable and hence getting negative size and app is getting freeze/crash