You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Crash when saving image: java.io.FileNotFoundException: open failed: ENAMETOOLONG #1315
Tap on any image/picture to view it in full-screen/separate view.
Tap the "Save" (or download) button.
The application crashes immediately, and the error screen appears.
Crash report
### Description
The application crashes and fails to save an image due to an overly long filename issue (`ENAMETOOLONG`).
### Environment
- **App Version:** 0.16.2
- **Device:** Xiaomi selene
- **OS Version:** Android 11 (API 30)
### Steps to reproduce
1. Open the app.
2. Attempt to download/save an image with a long title or long URL-based name.
3. The app throws a `FileNotFoundException` and fails to save.
### Expected behavior
The app should automatically truncate or sanitize long filenames before saving to prevent OS-level errors.
### Error Log
<details>
<summary>Click to expand Stack Trace</summary>
java.io.FileNotFoundException: open failed: ENAMETOOLONG (File name too long)
at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:151)
at android.content.ContentProviderProxy.openAssetFile(ContentProviderNative.java:704)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1816)
at android.content.ContentResolver.openFileDescriptor(ContentResolver.java:1631)
at me.ash.reader.infrastructure.android.AndroidImageDownloaderdownloadImage2.invokeSuspend(AndroidImageDownloader.kt:181)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:9)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:112)
at kotlinx.coroutines.internal.LimitedDispatcher\$Worker.run(LimitedDispatcher.kt:8)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:3)
at kotlinx.coroutines.scheduling.CoroutineScheduler\$Worker.run(CoroutineScheduler.kt:93)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@797be09, Dispatchers.Main.immediate]
</details>
This looks like the same crash #1324 is addressing — the image URL's filename segment exceeds the filesystem's 255-byte per-name limit, so ContentResolver.openOutputStream fails with ENAMETOOLONG. The PR truncates the derived filename to a safe length while keeping the extension intact.
Activity
ibrahim-iqbal commentedon Sep 6, 2026
This looks like the same crash #1324 is addressing — the image URL's filename segment exceeds the filesystem's 255-byte per-name limit, so
ContentResolver.openOutputStreamfails withENAMETOOLONG. The PR truncates the derived filename to a safe length while keeping the extension intact.Once #1324 lands this should close automatically.