react-native-compressor icon indicating copy to clipboard operation
react-native-compressor copied to clipboard

{"error": [TypeError: null is not an object (evaluating 'NativeVideoCompressor.compress')]} compression error

Open savataqe1 opened this issue 3 years ago • 2 comments

greetings to all , it seems it is returning my value null but when i console value its not null.

Expected behavior

Platform [X] Android

compressor version : 1.5.0

React Native Version

My Code . const videoGallery = () => { ImagePicker.openPicker({ mediaType: 'video', }).then(video => { if (video.size / (1024 * 1024) < 10) { setLink(video.path); testCompress(video.path); } else { showToast(); } }); };

const testCompress = async e => { try { const result = await Video.compress( e, { compressionMethod: 'auto', }, progress => { if (backgroundMode) { console.log('Compression Progress: ', progress); console.log(progress); } else { setCompressingProgress(progress); console.log(progress); } }, ); console.log(result); console.log({result}, 'compression result'); } catch (error) { console.log({error}, 'compression error'); } };

savataqe1 avatar Feb 07 '22 08:02 savataqe1

@savataqe1 I think you have an issue with linking. can you try to do manual linking and check? https://github.com/Shobbak/react-native-compressor#android

numandev1 avatar Feb 07 '22 09:02 numandev1

@savataqe1 I think you have an issue with linking. can you try to do manual linking and check? https://github.com/Shobbak/react-native-compressor#android

{"error": [TypeError: Cannot read property 'compress' of null]} compression error .. I downloaded it manually and downloaded it normally, but I'm getting the same error

savataqe1 avatar Apr 11 '22 12:04 savataqe1