Skip to content

Crash when HTTP error downloading image #992

Closed
@Douile

Description

@Douile

Jerboa Version
0.0.37

Android version + phone
Android 13

Describe the bug
If there is a HTTP error during download of an image the app crashes

To Reproduce

  1. Preiview image
  2. Press download
  3. Crash (assuming there was error downloading image)

In the case of a crash

Please include the logs.

LOGS
07-07 21:37:23.733 E/AndroidRuntime(19406): FATAL EXCEPTION: main
07-07 21:37:23.733 E/AndroidRuntime(19406): Process: com.jerboa, PID: 19406
07-07 21:37:23.733 E/AndroidRuntime(19406): java.io.IOException: unexpected end of stream on com.android.okhttp.Address@80c8060b
07-07 21:37:23.733 E/AndroidRuntime(19406): 	at com.android.okhttp.internal.http.Http1xStream.readResponse(Http1xStream.java:203)
07-07 21:37:23.733 E/AndroidRuntime(19406): 	at com.android.okhttp.internal.http.Http1xStream.readResponseHeaders(Http1xStream.java:129)
07-07 21:37:23.733 E/AndroidRuntime(19406): 	at com.android.okhttp.internal.http.HttpEngine.readNetworkResponse(HttpEngine.java:750)
07-07 21:37:23.733 E/AndroidRuntime(19406): 	at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:622)
07-07 21:37:23.733 E/AndroidRuntime(19406): 	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:475)
07-07 21:37:23.733 E/AndroidRuntime(19406): 	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:411)
07-07 21:37:23.733 E/AndroidRuntime(19406): 	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:248)
07-07 21:37:23.733 E/AndroidRuntime(19406): 	at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:211)
07-07 21:37:23.733 E/AndroidRuntime(19406): 	at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:30)
07-07 21:37:23.733 E/AndroidRuntime(19406): 	at java.net.URL.openStream(URL.java:1072)
07-07 21:37:23.733 E/AndroidRuntime(19406): 	at com.jerboa.ui.components.common.ImageViewerDialogKt$SaveImage$2.invokeSuspend(Unknown Source:10)
07-07 21:37:23.733 E/AndroidRuntime(19406): 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:8)
07-07 21:37:23.733 E/AndroidRuntime(19406): 	at kotlinx.coroutines.DispatchedTask.run(Unknown Source:109)
07-07 21:37:23.733 E/AndroidRuntime(19406): 	at androidx.core.app.ActivityRecreator$1.run(Unknown Source:15)
07-07 21:37:23.733 E/AndroidRuntime(19406): 	at kotlinx.coroutines.scheduling.TaskImpl.run(Unknown Source:2)
07-07 21:37:23.733 E/AndroidRuntime(19406): 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(Unknown Source:93)
07-07 21:37:23.733 E/AndroidRuntime(19406): 	Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [androidx.compose.ui.platform.MotionDurationScaleImpl@7aa2ac6, androidx.compose.runtime.BroadcastFrameClock@7a0ba87, StandaloneCoroutine{Cancelling}@3aebdb4, AndroidUiDispatcher@c6bcddd]
07-07 21:37:23.733 E/AndroidRuntime(19406): Caused by: java.io.EOFException: \n not found: size=0 content=...
07-07 21:37:23.733 E/AndroidRuntime(19406): 	at com.android.okhttp.okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:202)
07-07 21:37:23.733 E/AndroidRuntime(19406): 	at com.android.okhttp.internal.http.Http1xStream.readResponse(Http1xStream.java:188)
07-07 21:37:23.733 E/AndroidRuntime(19406): 	... 15 more

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions