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

[Bug] App crash when selecting video from gallery #91

Open
agavrel opened this issue Jul 29, 2020 · 7 comments
Open

[Bug] App crash when selecting video from gallery #91

agavrel opened this issue Jul 29, 2020 · 7 comments
Labels
bug Something isn't working

Comments

@agavrel
Copy link

agavrel commented Jul 29, 2020

Description

The app crashes with the example provided (logs below).

Platform

Android Emulator

Backtracking step (if has)

  1. Used example main file with dependencies video_player: ^0.10.11+2, image_picker: ^0.6.7+4 and flutter_video_compress: ^0.3.7+8
  2. 'select video from gallery'
  3. then select video that I downloaded here: https://pixabay.com/videos/atoms-electrons-logo-logo-animation-13232/ and click on confirm
  4. crash

Log

 FATAL EXCEPTION: main
E/AndroidRuntime(15143): java.lang.RuntimeException: setDataSource failed: status = 0x80000000
E/AndroidRuntime(15143):        at android.media.MediaMetadataRetriever.setDataSource(Native Method)
E/AndroidRuntime(15143):        at android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java:74)
E/AndroidRuntime(15143):        at android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java:162)
E/AndroidRuntime(15143):        at com.example.flutter_video_compress.Utility.getMediaInfoJson(Utility.kt:38)
E/AndroidRuntime(15143):        at com.example.flutter_video_compress.FFmpegCommander$compressVideo$1.onFinish(FFmpegCommander.kt:83)
E/AndroidRuntime(15143):        at nl.bravobit.ffmpeg.FFcommandExecuteAsyncTask.onPostExecute(FFcommandExecuteAsyncTask.java:77)
E/AndroidRuntime(15143):        at nl.bravobit.ffmpeg.FFcommandExecuteAsyncTask.onPostExecute(FFcommandExecuteAsyncTask.java:12)
E/AndroidRuntime(15143):        at android.os.AsyncTask.finish(AsyncTask.java:695)
E/AndroidRuntime(15143):        at android.os.AsyncTask.access$600(AsyncTask.java:180)
E/AndroidRuntime(15143):        at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:712)
E/AndroidRuntime(15143):        at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(15143):        at android.os.Looper.loop(Looper.java:193)
E/AndroidRuntime(15143):        at android.app.ActivityThread.main(ActivityThread.java:6669)
E/AndroidRuntime(15143):        at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(15143):        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
E/AndroidRuntime(15143):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

Expected solution

Well should be working for basic examples ?

@agavrel agavrel added the bug Something isn't working label Jul 29, 2020
@sharansingh00002
Copy link

@agavrel even I got the same error, its not actually because of flutter_video_compress, but because of Image picker which is returning even video files with jpg extension in Android

@sharansingh00002
Copy link

flutter/plugins#2860
Refer this PR and make the changes it will work then

@agavrel
Copy link
Author

agavrel commented Aug 1, 2020

Good catch. Well this is the base example so we should not have to make tweaks to make it work. I hope they (image_picker) can accept the PR asap

@jawa0919
Copy link

flutter/plugins#2860
Refer this PR and make the changes it will work then

change image_picker fix
flutter/plugins#2860 (comment)

@jpetro416
Copy link

This needs to be fixed ASAP!

@Akshay-akkay
Copy link

flutter/plugins#2860
Refer this PR and make the changes it will work then

change image_picker fix
flutter/plugins#2860 (comment)

Help. Pub giving this error on using the comment's advise.

pub get failed (server unavailable) -- attempting retry 2 in 2 seconds...

Git error. Command: git rev-list --max-count=1 9cac5347d9ab9d111a918a8154fb060565b1bf31

stdout:

stderr: fatal: bad object 9cac5347d9ab9d111a918a8154fb060565b1bf31

exit code: 128

@sudooobro
Copy link

flutter/plugins#2860
Refer this PR and make the changes it will work then

change image_picker fix
flutter/plugins#2860 (comment)

Help. Pub giving this error on using the comment's advise.

pub get failed (server unavailable) -- attempting retry 2 in 2 seconds...

Git error. Command: git rev-list --max-count=1 9cac5347d9ab9d111a918a8154fb060565b1bf31

stdout:

stderr: fatal: bad object 9cac5347d9ab9d111a918a8154fb060565b1bf31

exit code: 128

Same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants