Open nattesh opened 2 years ago
any update? i face it too.
Any update over this issue ?
maybe you have not set permission to save photo to gallery. add this to ios/runner/info.plist
<key>NSPhotoLibraryUsageDescription</key>
<string>Photo Gallery Set Avatar</string>
you may need permission_handler plugin to check if have perssion to save photo.
Permission.storage.request().then((value)async {
if(PermissionStatus.granted == value) {
//your code
}
});
Thank you for your kind reply. As I said, permissions are set in fact the image is correctly saved on the device (and I can see it browsing the gallery once the app is crashed).
maybe you have not set permission to save photo to gallery. add this to ios/runner/info.plist
<key>NSPhotoLibraryUsageDescription</key>
<string>Photo Gallery Set Avatar</string>
you may need permission_handler plugin to check if have perssion to save photo.
Permission.storage.request().then((value)async {
if(PermissionStatus.granted == value) {
//your code
}
});
The same case happened to me also. Images are saving successfully but app kept crashing, I then figured out that it was because I was downloading media in bulk at the same time so I added delay in downloading the files and it stopped crashing my application.
For me, It shouldn't be the delay crashing the app. I am downloading on tap of a button and mostly one file at a time.
Hi, I'm here to report a very particular issue. The library is awesome and it works as expected in iOS in any circumstance. Using Android everything is good running the debug version of the apk, but when I build the release version of the apk and try to download an image the app just crashes. Thing is: app crashes just after the download.
I'm using v2.3.2.
Here's the code snippet:
You may notice that there's nothing more than the download and two state updates that involve only two flags (just to handle a circular spinner showed during the download).
The logcat:
2022-04-26 18:40:43.369 3921-3921/? V/LogicalMediaSource: onSourceMediaCreated() - media: [MediaStore/121, /storage/emulated/0/Pictures/<filename>], flags: 0 2022-04-26 18:40:43.570 10571-10652/? E/AndroidRuntime: FATAL EXCEPTION: DefaultDispatcher-worker-1 Process: <build> PID: 10571 java.lang.IllegalAccessError: Illegal class access: 'e.a.c' attempting to access 'kotlinx.coroutines.J' (declaration of 'e.a.c' appears in base.apk) at e.a.c.invokeSuspend(Unknown Source:50) at h.m.o.a.a.resumeWith(:2) at kotlinx.coroutines.L.run(Unknown Source:86) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6863) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 2022-04-26 18:40:43.571 483-483/? E/SELinux: avc: denied { find } for service=opdiagnose pid=10571 uid=10119 scontext=u:r:untrusted_app:s0:c119,c256,c512,c768 tcontext=u:object_r:opdiagnose_service:s0 tclass=service_manager permissive=0 2022-04-26 18:40:43.572 483-483/? E/SELinux: avc: denied { find } for service=opdiagnose pid=10571 uid=10119 scontext=u:r:untrusted_app:s0:c119,c256,c512,c768 tcontext=u:object_r:opdiagnose_service:s0 tclass=service_manager permissive=0 2022-04-26 18:40:43.572 10571-10652/? W/OPDiagnose: getService:OPDiagnoseService NULL
Tested on two different devices (OnePlus 7 and OnePlus 3), with stock rom and fully updated (if you're wondering about SELinux). Mind that the picture is actually saved, so if I check the picture in the gallery app I can see it and use it.
Here's my flutter doctor:
Thank you in advance for any help.