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

Android App crashing with while saving the image path on gallery_saver #69

Closed
mr-techiee opened this issue Sep 8, 2020 · 6 comments
Closed

Comments

@mr-techiee
Copy link

I have facing the below error while am saving the images on android using this plugin,

E/AndroidRuntime( 8194): FATAL EXCEPTION: DefaultDispatcher-worker-1
E/AndroidRuntime( 8194): Process: com.ventechsolutions.myFHB, PID: 8194
E/AndroidRuntime( 8194): java.io.FileNotFoundException: 19c879d4-6353-48da-bccf-6f93cbf4126a.jpg: open failed: ENOENT (No such file or directory)
E/AndroidRuntime( 8194): 	at libcore.io.IoBridge.open(IoBridge.java:496)
E/AndroidRuntime( 8194): 	at java.io.FileInputStream.<init>(FileInputStream.java:159)
E/AndroidRuntime( 8194): 	at carnegietechnologies.gallery_saver.FileUtils.getBytesFromFile(FileUtils.kt:216)
E/AndroidRuntime( 8194): 	at carnegietechnologies.gallery_saver.FileUtils.insertImage(FileUtils.kt:47)
E/AndroidRuntime( 8194): 	at carnegietechnologies.gallery_saver.GallerySaver$saveMediaFile$1$success$1.invokeSuspend(GallerySaver.kt:69)
E/AndroidRuntime( 8194): 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
E/AndroidRuntime( 8194): 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
E/AndroidRuntime( 8194): 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
E/AndroidRuntime( 8194): 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
E/AndroidRuntime( 8194): 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
E/AndroidRuntime( 8194): 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
E/AndroidRuntime( 8194): Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
E/AndroidRuntime( 8194): 	at libcore.io.Linux.open(Native Method)
E/AndroidRuntime( 8194): 	at libcore.io.ForwardingOs.open(ForwardingOs.java:167)
E/AndroidRuntime( 8194): 	at libcore.io.BlockGuardOs.open(BlockGuardOs.java:252)
E/AndroidRuntime( 8194): 	at libcore.io.ForwardingOs.open(ForwardingOs.java:167)
E/AndroidRuntime( 8194): 	at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7499)
E/AndroidRuntime( 8194): 	at libcore.io.IoBridge.open(IoBridge.java:482)
E/AndroidRuntime( 8194): 	... 10 more
I/Process ( 8194): Sending signal. PID: 8194 SIG: 9
Lost connection to device.
Exited (sigterm)

here I have attached my flutter doctor summary,

[√] Flutter (Channel stable, 1.20.3, on Microsoft Windows [Version
10.0.18363.959], locale en-IN)
• Flutter version 1.20.3 at C:\flutter_config\flutter
• Framework revision 216dee60c0 (7 days ago), 2020-09-01 12:24:47 -0700
• Engine revision d1bc06f032
• Dart version 2.9.2

[√] Android toolchain - develop for Android devices (Android SDK version
30.0.0)
• Android SDK at C:\Users\vmohan\AppData\Local\Android\sdk
• Platform android-30, build-tools 30.0.0
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b01)
• All Android licenses accepted.

[√] Android Studio (version 4.0)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 48.1.2
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b01)

[√] VS Code (version 1.48.2)
• VS Code at C:\Users\vmohan\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.14.0

[√] Connected device (1 available)
• moto g 7 (mobile) • ZF6224BH73 • android-arm64 • Android 10 (API 29)

• No issues found!

@novas1r1
Copy link

novas1r1 commented Nov 4, 2020

For me it crashes as well when saving but with a different error:
E/AndroidRuntime(18563): FATAL EXCEPTION: main E/AndroidRuntime(18563): Process: de.betriebsratzitate, PID: 18563 E/AndroidRuntime(18563): java.lang.IllegalArgumentException: Invalid column NULL E/AndroidRuntime(18563): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:172) E/AndroidRuntime(18563): at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:153) E/AndroidRuntime(18563): at android.content.ContentProviderProxy.openAssetFile(ContentProviderNative.java:704) E/AndroidRuntime(18563): at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1816) E/AndroidRuntime(18563): at android.content.ContentResolver.openOutputStream(ContentResolver.java:1518) E/AndroidRuntime(18563): at android.content.ContentResolver.openOutputStream(ContentResolver.java:1494) E/AndroidRuntime(18563): at carnegietechnologies.gallery_saver.FileUtils.storeThumbnail(FileUtils.kt:172) E/AndroidRuntime(18563): at carnegietechnologies.gallery_saver.FileUtils.insertImage(FileUtils.kt:84) E/AndroidRuntime(18563): at carnegietechnologies.gallery_saver.GallerySaver$saveMediaFile$1$success$1.invokeSuspend(GallerySaver.kt:69) E/AndroidRuntime(18563): at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)

@crossplatfrom
Copy link

@novas1r1 It seems this is occurring on Android 11.0+, can you confirm?

@novas1r1
Copy link

@crossplatfrom Yes, its occurring on Android 11

@VOIDCRUSHER
Copy link

@novas1r1 I get a similar error on Android API 29+ :

E/AndroidRuntime(10136): Process: com.*.app, PID: 10136
E/AndroidRuntime(10136): java.lang.IllegalArgumentException: Invalid column NULL
E/AndroidRuntime(10136): 	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:172)
E/AndroidRuntime(10136): 	at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:153)
E/AndroidRuntime(10136): 	at android.content.ContentProviderProxy.openAssetFile(ContentProviderNative.java:704)
E/AndroidRuntime(10136): 	at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1816)
E/AndroidRuntime(10136): 	at android.content.ContentResolver.openOutputStream(ContentResolver.java:1518)
E/AndroidRuntime(10136): 	at android.content.ContentResolver.openOutputStream(ContentResolver.java:1494)
E/AndroidRuntime(10136): 	at c.a.a.a(:172)
E/AndroidRuntime(10136): 	at c.a.a.a(:84)
E/AndroidRuntime(10136): 	at c.a.b$b$a.b(:69)
E/AndroidRuntime(10136): 	at h.x.j.a.a.a(:33)
E/AndroidRuntime(10136): 	at kotlinx.coroutines.r0.run(:238)
E/AndroidRuntime(10136): 	at kotlinx.coroutines.f2.a.a(:594)
E/AndroidRuntime(10136): 	at kotlinx.coroutines.f2.a.a(:60)
E/AndroidRuntime(10136): 	at kotlinx.coroutines.f2.a$b.run(:742)
I/Process (10136): Sending signal. PID: 10136 SIG: 9

Other than the fatal error, It saves to gallery as intended so I'm considering either using the suggested patch on #67 or completely disabling saving to gallery entirely. This project is great but it needs more maintainers.

Still no response from @jelenalecic

@jelenalecic
Copy link
Contributor

please try the newest version :)
and sorry for such a delay - this lib is not out top priority :/

@jelenalecic
Copy link
Contributor

@VOIDCRUSHER all my tags notification emails end up in my spam folder, sorry again! :)

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

5 participants