AbedElazizShe / light_compressor

A powerful and easy-to-use video compression plugin for Flutter.
MIT License
59 stars 32 forks source link

FATAL EXCEPTION - but the compressed file was created #43

Closed kobimeridor closed 10 months ago

kobimeridor commented 1 year ago

Hello, The compressed file was created but I have exception light_compressor: ^2.0.1 device - Redmi 10C with MIUI 13.0.8 The example working OK! sdk: ">=2.18.0 <3.0.0"

The following command .

`

           final dynamic response = await _lightCompressor.compressVideo(

            path: _videoPath,

            videoQuality: VideoQuality.very_low,

            isMinBitrateCheckEnabled: false,

            video: Video(videoName: videoName),

            android: AndroidConfig(isSharedStorage: true, saveAt: SaveAt.Movies),

            ios: IOSConfig(saveInGallery: false),

          );

The exception

I/flutter ( 798): kobi - post1 - onTap1/data/user/0/com.allerg3/cache/2023-05-28 00:37:47.338511.png-true I/flutter ( 798): kobi - post1 - onTap2/data/user/0/com.allerg3/cache/2023-05-28 00:37:47.338511.png I/flutter ( 798): kobi - picCompress -1-136040 I/flutter ( 798): kobi - picCompress -2-7798-20 I/flutter ( 798): kobi - picCompress -5-2290982-MyVideo-1685223483976.mp4 E/AndroidRuntime( 798): FATAL EXCEPTION: main E/AndroidRuntime( 798): Process: com.allerg3, PID: 798 E/AndroidRuntime( 798): java.lang.RuntimeException: setDataSource failed: status = 0xFFFFFFEA E/AndroidRuntime( 798): at android.media.MediaMetadataRetriever._setDataSource(Native Method) E/AndroidRuntime( 798): at android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java:281) E/AndroidRuntime( 798): at android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java:247) E/AndroidRuntime( 798): at android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java:355) E/AndroidRuntime( 798): at com.abedelazizshe.lightcompressorlibrary.compressor.Compressor$compressVideo$2.invokeSuspend(Compressor.kt:60) E/AndroidRuntime( 798): at com.abedelazizshe.lightcompressorlibrary.compressor.Compressor$compressVideo$2.invoke(Unknown Source:8) E/AndroidRuntime( 798): at com.abedelazizshe.lightcompressorlibrary.compressor.Compressor$compressVideo$2.invoke(Unknown Source:4) E/AndroidRuntime( 798): at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89) E/AndroidRuntime( 798): at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:169) E/AndroidRuntime( 798): at kotlinx.coroutines.BuildersKt.withContext(Unknown Source:1) E/AndroidRuntime( 798): at com.abedelazizshe.lightcompressorlibrary.compressor.Compressor.compressVideo(Compressor.kt:53) E/AndroidRuntime( 798): at com.abedelazizshe.lightcompressorlibrary.VideoCompressor$startCompression$2.invokeSuspend(VideoCompressor.kt:157) E/AndroidRuntime( 798): at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) E/AndroidRuntime( 798): at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) E/AndroidRuntime( 798): at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) E/AndroidRuntime( 798): at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) E/AndroidRuntime( 798): at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) E/AndroidRuntime( 798): at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664) E/AndroidRuntime( 798): Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@9723242, Dispatchers.Main] W/com.allerg3( 798): type=1400 audit(0.0:27268): avc: denied { search } for name="mqsas" dev="dm-9" ino=267 scontext=u:r:untrusted_app:s0:c69,c258,c512,c768 tcontext=u:object_r:mqsas_data_file:s0 tclass=dir permissive=0 app=com.allerg3 W/OOMEventManagerFK( 798): Failed to mkdir /data/mqsas/hprof/ W/com.allerg3( 798): type=1400 audit(0.0:27269): avc: denied { search } for name="mqsas" dev="dm-9" ino=267 scontext=u:r:untrusted_app:s0:c69,c258,c512,c768 tcontext=u:object_r:mqsas_data_file:s0 tclass=dir permissive=0 app=com.allerg3 W/com.allerg3( 798): type=1400 audit(0.0:27270): avc: denied { search } for name="mqsas" dev="dm-9" ino=267 scontext=u:r:untrusted_app:s0:c69,c258,c512,c768 tcontext=u:object_r:mqsas_data_file:s0 tclass=dir permissive=0 app=com.allerg3 W/com.allerg3( 798): type=1400 audit(0.0:27271): avc: denied { search } for name="mqsas" dev="dm-9" ino=267 scontext=u:r:untrusted_app:s0:c69,c258,c512,c768 tcontext=u:object_r:mqsas_data_file:s0 tclass=dir permissive=0 app=com.allerg3 W/com.allerg3( 798): type=1400 audit(0.0:27272): avc: denied { getattr } for path="/data/mqsas" dev="dm-9" ino=267 scontext=u:r:untrusted_app:s0:c69,c258,c512,c768 tcontext=u:object_r:mqsas_data_file:s0 tclass=dir permissive=0 app=com.allerg3 W/System ( 798): A resource failed to call close. W/System ( 798): A resource failed to call close. W/System ( 798): A resource failed to call close. W/System ( 798): A resource failed to call close. W/System ( 798): A resource failed to call close. W/System ( 798): A resource failed to call close. W/System ( 798): A resource failed to call close.

AbedElazizShe commented 10 months ago

Hi @kobimeridor , could you please try in the new version?

kobimeridor commented 10 months ago

Thanks but I don't have to compress and I no longer use this library