Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compression crash (v2.1.1) #82

Open
Abacaxi-Nelson opened this issue Jan 7, 2021 · 3 comments
Open

Compression crash (v2.1.1) #82

Abacaxi-Nelson opened this issue Jan 7, 2021 · 3 comments

Comments

@Abacaxi-Nelson
Copy link

Abacaxi-Nelson commented Jan 7, 2021

Hi,
On IOS, picking a video from library; then trying to compress it crash app

final MediaInfo mediaInfo = await VideoCompress.compressVideo(
widget.path, 
quality: VideoQuality.MediumQuality, 
deleteOrigin: false, 
includeAudio: true);
Error : Invalid argument(s) (path): Must not be null 

i double check, path is never null and exists.
adding some logging show that

At some point, data is erased, and it remain only ::
{"isCancel":false}

v2.1.1 should correct this according some issue, but its not my case.
Thanks, Nelson

Edit:
Video is picked from library (https://github.com/CaiJingLong/flutter_photo_manager).
It worked when video is record from camera, but crash when picking from library

@hyobbb
Copy link

hyobbb commented Jan 20, 2021

I am having the same problem when includeAudio is false.

[VERBOSE-2:ui_dart_state.cc(177)] Unhandled Exception: Invalid argument(s) (path): Must not be null
#0      ArgumentError.checkNotNull (dart:core/errors.dart:194)
#1      _Directory._checkNotNull (dart:io/directory_impl.dart:276)
#2      new _File (dart:io/file_impl.dart:205)
#3      new File (dart:io/file.dart:250)
#4      new MediaInfo.fromJson (package:video_compress/src/media/media_info.dart:24)
#5      Compress.compressVideo (package:video_compress/src/video_compress/video_compressor.dart:158)

I also checked that filePath and ExistSync. It has no problem in Android.

@mrgnhnt96
Copy link

I am getting the same error. Its occuring in video_compressor.dart line 158. It is trying to convert json into the MediaInfo class. It is receiving only a string of "{"isCancel":false}".

With a little debugging I noticed that if I call await VideoCompress.cancelCompression(); it will not through the error and compress the video. However, when I call await VideoCompress.getFileThumbnail...) it just stops running without an errors.

@arashbi
Copy link

arashbi commented Apr 17, 2021

I have the same problem. The method Future<T> _invoke<T>(String name, [Map<String, dynamic> params]) async doesn't work properly it seems. It returns immediately with no good result

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants