ffupdater icon indicating copy to clipboard operation
ffupdater copied to clipboard

FFUpdater fails to download Firefox Klar because of socket timeout

Open TeeTeeHaa opened this issue 1 year ago • 14 comments
trafficstars

Describe the bug

I have a brand new Samsung Galaxy S7 (SM-G30F) with a freshly installed e/OS/ (2.3-s-20240816426375-herolte) based on Android 12. I installed FFUpdater using e/OS/'s App Lounge which downloaded FFUpdater from F-Droid. FFUpdater is version 79.2.4.

I tried to install Firefox Klar browser but unfortunately the download always stops at some random percent number all the time. I tried it several times.

Using either the system's browser (e/OS/ has a fork of Chromite) or a browser on my Windows PC to download the APK file directly works perfectly fine.

To Reproduce

Use FFUpdater on a fresh e/OS/ on a new Samsung Galaxy S7 to install Firefox Klar.

Expected behavior

FFUpdater simply downloads and installs Firefox Klar.

Error message from FFUpdater

Stacktrace:

de.marmaro.krt.ffupdater.network.exceptions.NetworkException: Download of https://archive.mozilla.org/pub/focus/releases/130.0/android/klar-130.0-android-arm64-v8a/klar-130.0.multi.android-arm64-v8a.apk failed.
	at de.marmaro.krt.ffupdater.network.file.FileDownloader$downloadFileWithProgress$deferred$1.invokeSuspend(FileDownloader.kt:86)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
Caused by: java.net.SocketTimeoutException: timeout
	at okhttp3.internal.http2.Http2Stream$StreamTimeout.newTimeoutException(Http2Stream.kt:675)
	at okhttp3.internal.http2.Http2Stream$StreamTimeout.exitAndThrowIfTimedOut(Http2Stream.kt:684)
	at okhttp3.internal.http2.Http2Stream$FramingSource.read(Http2Stream.kt:379)
	at okhttp3.internal.connection.Exchange$ResponseBodySource.read(Exchange.kt:281)
	at okio.RealBufferedSource.read(RealBufferedSource.kt:39)
	at okio.ForwardingSource.read(ForwardingSource.kt:27)
	at de.marmaro.krt.ffupdater.network.file.ProgressInterceptorResponseBody$trackTransmittedBytes$1.read(ProgressInterceptorResponseBody.kt:42)
	at okio.RealBufferedSource$inputStream$1.read(RealBufferedSource.kt:158)
	at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:347)
	at java.io.FilterInputStream.read(FilterInputStream.java:107)
	at kotlin.io.ByteStreamsKt.copyTo(IOStreams.kt:110)
	at kotlin.io.ByteStreamsKt.copyTo$default(IOStreams.kt:103)
	at de.marmaro.krt.ffupdater.network.file.FileDownloader.downloadFile2(FileDownloader.kt:168)
	at de.marmaro.krt.ffupdater.network.file.FileDownloader.access$downloadFile2(FileDownloader.kt:42)
	at de.marmaro.krt.ffupdater.network.file.FileDownloader$downloadFile2$1.invokeSuspend(FileDownloader.kt:0)
	... 8 more

Logs:

de.marmaro.krt.ffupdater.network.exceptions.NetworkException: Download of https://archive.mozilla.org/pub/focus/releases/130.0/android/klar-130.0-android-arm64-v8a/klar-130.0.multi.android-arm64-v8a.apk failed.
	at de.marmaro.krt.ffupdater.network.file.FileDownloader$downloadFileWithProgress$deferred$1.invokeSuspend(FileDownloader.kt:86)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
Caused by: java.net.SocketTimeoutException: timeout
	at okhttp3.internal.http2.Http2Stream$StreamTimeout.newTimeoutException(Http2Stream.kt:675)
	at okhttp3.internal.http2.Http2Stream$StreamTimeout.exitAndThrowIfTimedOut(Http2Stream.kt:684)
	at okhttp3.internal.http2.Http2Stream$FramingSource.read(Http2Stream.kt:379)
	at okhttp3.internal.connection.Exchange$ResponseBodySource.read(Exchange.kt:281)
	at okio.RealBufferedSource.read(RealBufferedSource.kt:39)
	at okio.ForwardingSource.read(ForwardingSource.kt:27)
	at de.marmaro.krt.ffupdater.network.file.ProgressInterceptorResponseBody$trackTransmittedBytes$1.read(ProgressInterceptorResponseBody.kt:42)
	at okio.RealBufferedSource$inputStream$1.read(RealBufferedSource.kt:158)
	at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:347)
	at java.io.FilterInputStream.read(FilterInputStream.java:107)
	at kotlin.io.ByteStreamsKt.copyTo(IOStreams.kt:110)
	at kotlin.io.ByteStreamsKt.copyTo$default(IOStreams.kt:103)
	at de.marmaro.krt.ffupdater.network.file.FileDownloader.downloadFile2(FileDownloader.kt:168)
	at de.marmaro.krt.ffupdater.network.file.FileDownloader.access$downloadFile2(FileDownloader.kt:42)
	at de.marmaro.krt.ffupdater.network.file.FileDownloader$downloadFile2$1.invokeSuspend(FileDownloader.kt:0)
	... 8 more

Device information:

Key Value
FFUpdater version 79.2.4 (174) release F-Droid/other
Device SM-G930F (heroltexx, heroltexx, universal8890)
Manufacturer samsung (samsung)
Supported ABIs arm64-v8a, armeabi-v7a, armeabi
Android version 12 (SDK: 32)
OS runner-k3f88v3q-project-53-concurrent-0, root, release-keys, 1723840012000

TeeTeeHaa avatar Sep 15 '24 11:09 TeeTeeHaa

Sorry for my late reply. Do you still have the issues?

Tobi823 avatar Oct 09 '24 21:10 Tobi823

I can't reproduce the problem and I read on GitHub that I should try disabling HTTP2 (and force recreating the connection pool).

I could provide you an APK file so you can test it (if you want) :)

Tobi823 avatar Oct 09 '24 21:10 Tobi823

Yes, still have this issue, just tried it again right now. FFUpdater 79.2.4. and download URL to Firefox Klar 131.0.2.

If you want to provide a special APK for me I would try it out.

TeeTeeHaa avatar Oct 10 '24 18:10 TeeTeeHaa

Can you try this version? Maybe disable the OkHttp connection tool will fix the problem ffupdater-release.zip

Tobi823 avatar Oct 11 '24 18:10 Tobi823

Thank you very much for your efforts. I tried it out, but it still fails, actually at the same progress percentage.

Stacktrace:

de.marmaro.krt.ffupdater.network.exceptions.NetworkException: Download of https://archive.mozilla.org/pub/focus/releases/131.0.2/android/klar-131.0.2-android-arm64-v8a/klar-131.0.2.multi.android-arm64-v8a.apk failed.
	at de.marmaro.krt.ffupdater.network.file.FileDownloader$downloadFileWithProgress$deferred$1.invokeSuspend(FileDownloader.kt:86)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
Caused by: java.net.SocketTimeoutException: timeout
	at okhttp3.internal.http2.Http2Stream$StreamTimeout.newTimeoutException(Http2Stream.kt:675)
	at okhttp3.internal.http2.Http2Stream$StreamTimeout.exitAndThrowIfTimedOut(Http2Stream.kt:684)
	at okhttp3.internal.http2.Http2Stream.takeHeaders(Http2Stream.kt:143)
	at okhttp3.internal.http2.Http2ExchangeCodec.readResponseHeaders(Http2ExchangeCodec.kt:97)
	at okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.kt:110)
	at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:93)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at de.marmaro.krt.ffupdater.network.file.DownloadProgressInterceptor.intercept(DownloadProgressInterceptor.kt:13)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:34)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
	at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:517)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at java.lang.Thread.run(Thread.java:920)

Logs:

de.marmaro.krt.ffupdater.network.exceptions.NetworkException: Download of https://archive.mozilla.org/pub/focus/releases/131.0.2/android/klar-131.0.2-android-arm64-v8a/klar-131.0.2.multi.android-arm64-v8a.apk failed.
	at de.marmaro.krt.ffupdater.network.file.FileDownloader$downloadFileWithProgress$deferred$1.invokeSuspend(FileDownloader.kt:86)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
Caused by: java.net.SocketTimeoutException: timeout
	at okhttp3.internal.http2.Http2Stream$StreamTimeout.newTimeoutException(Http2Stream.kt:675)
	at okhttp3.internal.http2.Http2Stream$StreamTimeout.exitAndThrowIfTimedOut(Http2Stream.kt:684)
	at okhttp3.internal.http2.Http2Stream.takeHeaders(Http2Stream.kt:143)
	at okhttp3.internal.http2.Http2ExchangeCodec.readResponseHeaders(Http2ExchangeCodec.kt:97)
	at okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.kt:110)
	at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:93)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at de.marmaro.krt.ffupdater.network.file.DownloadProgressInterceptor.intercept(DownloadProgressInterceptor.kt:13)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:34)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
	at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:517)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at java.lang.Thread.run(Thread.java:920)

Device information:

Key Value
FFUpdater version 79.2.5 (175) release Github
Device SM-G930F (heroltexx, heroltexx, universal8890)
Manufacturer samsung (samsung)
Supported ABIs arm64-v8a, armeabi-v7a, armeabi
Android version 12 (SDK: 32)
OS runner-k3f88v3q-project-53-concurrent-0, root, release-keys, 1723840012000

TeeTeeHaa avatar Oct 13 '24 14:10 TeeTeeHaa

Next try :) d9d5888d ffupdater-release.zip

Tobi823 avatar Oct 13 '24 23:10 Tobi823

Hmm, different behavior: The download (of Firefox Klar) did not stop at 17% as before but came to 53%. Then it did nothing for a while. And then it crashed, which it did not before. After clicking the notification telling me FFUpdater crashed I was shown the following error message:

Stacktrace:

java.net.SocketTimeoutException: timeout
	at okhttp3.internal.http2.Http2Stream$StreamTimeout.newTimeoutException(Http2Stream.kt:675)
	at okhttp3.internal.http2.Http2Stream$StreamTimeout.exitAndThrowIfTimedOut(Http2Stream.kt:684)
	at okhttp3.internal.http2.Http2Stream$FramingSource.read(Http2Stream.kt:379)
	at okhttp3.internal.connection.Exchange$ResponseBodySource.read(Exchange.kt:281)
	at okio.RealBufferedSource.read(RealBufferedSource.kt:39)
	at okio.ForwardingSource.read(ForwardingSource.kt:27)
	at de.marmaro.krt.ffupdater.network.file.ProgressInterceptorResponseBody$trackTransmittedBytes$1.read(ProgressInterceptorResponseBody.kt:42)
	at okio.RealBufferedSource$inputStream$1.read(RealBufferedSource.kt:158)
	at java.io.InputStream.read(InputStream.java:101)
	at de.marmaro.krt.ffupdater.network.file.FileDownloader$downloadFileWithProgress4$2.invokeSuspend(FileDownloader.kt:87)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
	Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@5da083f, Dispatchers.Main]

Logs:

java.net.SocketTimeoutException: timeout
	at okhttp3.internal.http2.Http2Stream$StreamTimeout.newTimeoutException(Http2Stream.kt:675)
	at okhttp3.internal.http2.Http2Stream$StreamTimeout.exitAndThrowIfTimedOut(Http2Stream.kt:684)
	at okhttp3.internal.http2.Http2Stream$FramingSource.read(Http2Stream.kt:379)
	at okhttp3.internal.connection.Exchange$ResponseBodySource.read(Exchange.kt:281)
	at okio.RealBufferedSource.read(RealBufferedSource.kt:39)
	at okio.ForwardingSource.read(ForwardingSource.kt:27)
	at de.marmaro.krt.ffupdater.network.file.ProgressInterceptorResponseBody$trackTransmittedBytes$1.read(ProgressInterceptorResponseBody.kt:42)
	at okio.RealBufferedSource$inputStream$1.read(RealBufferedSource.kt:158)
	at java.io.InputStream.read(InputStream.java:101)
	at de.marmaro.krt.ffupdater.network.file.FileDownloader$downloadFileWithProgress4$2.invokeSuspend(FileDownloader.kt:87)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
	Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@5da083f, Dispatchers.Main]

Device information:

Key Value
FFUpdater version 79.2.5 (175) release Github
Device SM-G930F (heroltexx, heroltexx, universal8890)
Manufacturer samsung (samsung)
Supported ABIs arm64-v8a, armeabi-v7a, armeabi
Android version 12 (SDK: 32)
OS runner-k3f88v3q-project-53-concurrent-0, root, release-keys, 1723840012000

TeeTeeHaa avatar Oct 15 '24 19:10 TeeTeeHaa

The crashing is reproducible, same error message, different download percentage (53%, 26%, 62%).

I do have a 25 MBit/s = 3,125 MByte/s internet connection and the size of the APK file is 89,2 MB so the download should take 28,544 seconds. 17% of that means a bit under 5 seconds. Maybe 5 seconds is a socket timeout somewhere.

On my Fairphone 5 with e/OS/ based on Android 13 the regular FFUpdater still works perfectly fine (tried out yesterday). It only fails on my Samsung Galaxy S7 with e/OS/ based on Android 12 (also tried out right now, both the regular FFUpdater and "my special" FFUpdater).

TeeTeeHaa avatar Oct 15 '24 19:10 TeeTeeHaa

I can see in your logs that my last attempt removing de.marmaro.krt.ffupdater.network.file.ProgressInterceptorResponseBody was not successful. (I suspect that my ProgressInterceptorResponseBody is misbehaving. And I dont need it anymore because I found an alternative for tracking the download progress).

Tobi823 avatar Oct 15 '24 20:10 Tobi823

Maybe 5 seconds is a socket timeout somewhere.

This could be a clue. Maybe I e.g. use the wrong thread for downloading or forgot to target the downloading thread + Android killing untagged downloads.

I have to check that.

Tobi823 avatar Oct 15 '24 20:10 Tobi823

I removed ProgressInterceptorResponseBody completely. Can you try it again? Maybe this will fix the issue 🙈 ffupdater-release.zip

Tobi823 avatar Oct 15 '24 21:10 Tobi823

Yes, but no: Stopped at 35%, notification it crashed.

Stacktrace:

java.net.SocketTimeoutException: timeout
	at okhttp3.internal.http2.Http2Stream$StreamTimeout.newTimeoutException(Http2Stream.kt:675)
	at okhttp3.internal.http2.Http2Stream$StreamTimeout.exitAndThrowIfTimedOut(Http2Stream.kt:684)
	at okhttp3.internal.http2.Http2Stream$FramingSource.read(Http2Stream.kt:379)
	at okhttp3.internal.connection.Exchange$ResponseBodySource.read(Exchange.kt:281)
	at okio.RealBufferedSource$inputStream$1.read(RealBufferedSource.kt:158)
	at java.io.InputStream.read(InputStream.java:101)
	at de.marmaro.krt.ffupdater.network.file.FileDownloader$downloadFileWithProgress4$2.invokeSuspend(FileDownloader.kt:87)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
	Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@48d898, Dispatchers.Main]

Logs:

java.net.SocketTimeoutException: timeout
	at okhttp3.internal.http2.Http2Stream$StreamTimeout.newTimeoutException(Http2Stream.kt:675)
	at okhttp3.internal.http2.Http2Stream$StreamTimeout.exitAndThrowIfTimedOut(Http2Stream.kt:684)
	at okhttp3.internal.http2.Http2Stream$FramingSource.read(Http2Stream.kt:379)
	at okhttp3.internal.connection.Exchange$ResponseBodySource.read(Exchange.kt:281)
	at okio.RealBufferedSource$inputStream$1.read(RealBufferedSource.kt:158)
	at java.io.InputStream.read(InputStream.java:101)
	at de.marmaro.krt.ffupdater.network.file.FileDownloader$downloadFileWithProgress4$2.invokeSuspend(FileDownloader.kt:87)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
	Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@48d898, Dispatchers.Main]

Device information:

Key Value
FFUpdater version 79.2.5 (175) release Github
Device SM-G930F (heroltexx, heroltexx, universal8890)
Manufacturer samsung (samsung)
Supported ABIs arm64-v8a, armeabi-v7a, armeabi
Android version 12 (SDK: 32)
OS runner-k3f88v3q-project-53-concurrent-0, root, release-keys, 1723840012000

TeeTeeHaa avatar Oct 17 '24 19:10 TeeTeeHaa

By the way: The button to copy the crash report to the clipboard does not copy the following part of the text:

--------- beginning of main
10-17 21:21:32.027 I/FFUpdater( 8005): InstalledAppsCache: Update cache of installed apps.
10-17 21:21:32.140 I/FFUpdater( 8005): InstalledAppsCache: Cache was updated.
10-17 21:21:32.143 I/FFUpdater( 8005): StorageCleaner: Delete possible cached files of BRAVE, BRAVE_BETA, BRAVE_NIGHTLY, CHROMIUM, CROMITE, DUCKDUCKGO_ANDROID, FAIREMAIL, FENNEC_FDROID, FIREFOX_BETA, FIREFOX_FOCUS, FIREFOX_FOCUS_BETA, FIREFOX_NIGHTLY, FIREFOX_RELEASE, ICERAVEN, K9MAIL, KIWI, MULCH, MULCH_SYSTEMWEBVIEW, MULL_FROM_REPO, ORBOT, PRIVACY_BROWSER, THORIUM, TOR_BROWSER, TOR_BROWSER_ALPHA, VIVALDI
10-17 21:21:32.146 I/FFUpdater( 8005): BackgroundJob:: Start BackgroundWork
10-17 21:21:33.229 D/FFUpdater( 8005): InstalledAppStatusFetcher: Search for latest FFUPDATER update.
10-17 21:21:33.648 I/FFUpdater( 8005): InstalledAppStatusFetcher: Found FFUPDATER Version(versionText=79.2.5, buildDate=null) (406ms).
10-17 21:21:33.655 D/FFUpdater( 8005): InstalledAppStatusFetcher: Search for latest FIREFOX_KLAR update.
10-17 21:21:34.398 I/FFUpdater( 8005): InstalledAppStatusFetcher: Found FIREFOX_KLAR Version(versionText=131.0.3, buildDate=null) (742ms).
10-17 21:21:39.192 D/FFUpdater( 8005): MainActivity: Start DownloadActivity to install or update FIREFOX_KLAR.
10-17 21:21:39.325 D/FFUpdater( 8005): DownloadActivity FIREFOX_KLAR: start fetching, downloading and installation process
10-17 21:21:39.332 D/FFUpdater( 8005): DownloadActivity FIREFOX_KLAR: fetching download information for FIREFOX_KLAR
10-17 21:21:39.401 D/FFUpdater( 8005): DownloadActivity FIREFOX_KLAR: check if an existing download can be reused
10-17 21:21:39.401 D/FFUpdater( 8005): DownloadActivity FIREFOX_KLAR: check if no APK file is cached
10-17 21:21:39.404 D/FFUpdater( 8005): DownloadActivity FIREFOX_KLAR: start download (1/3)
10-17 21:21:39.404 D/FFUpdater( 8005): DownloadActivity FIREFOX_KLAR: start downloading (2/3)
10-17 21:21:39.405 D/FFUpdater( 8005): DownloadActivity FIREFOX_KLAR: start downloading (3/3)
10-17 21:22:49.694 D/FFUpdater( 8005): DownloadActivity FIREFOX_KLAR: download failed
10-17 21:22:49.694 D/FFUpdater( 8005): java.net.SocketTimeoutException: timeout
10-17 21:22:49.694 D/FFUpdater( 8005): 	at okhttp3.internal.http2.Http2Stream$StreamTimeout.newTimeoutException(Http2Stream.kt:675)
10-17 21:22:49.694 D/FFUpdater( 8005): 	at okhttp3.internal.http2.Http2Stream$StreamTimeout.exitAndThrowIfTimedOut(Http2Stream.kt:684)
10-17 21:22:49.694 D/FFUpdater( 8005): 	at okhttp3.internal.http2.Http2Stream$FramingSource.read(Http2Stream.kt:379)
10-17 21:22:49.694 D/FFUpdater( 8005): 	at okhttp3.internal.connection.Exchange$ResponseBodySource.read(Exchange.kt:281)
10-17 21:22:49.694 D/FFUpdater( 8005): 	at okio.RealBufferedSource$inputStream$1.read(RealBufferedSource.kt:158)
10-17 21:22:49.694 D/FFUpdater( 8005): 	at java.io.InputStream.read(InputStream.java:101)
10-17 21:22:49.694 D/FFUpdater( 8005): 	at de.marmaro.krt.ffupdater.network.file.FileDownloader$downloadFileWithProgress4$2.invokeSuspend(FileDownloader.kt:87)
10-17 21:22:49.694 D/FFUpdater( 8005): 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
10-17 21:22:49.694 D/FFUpdater( 8005): 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
10-17 21:22:49.694 D/FFUpdater( 8005): 	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
10-17 21:22:49.694 D/FFUpdater( 8005): 	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
10-17 21:22:49.694 D/FFUpdater( 8005): 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
10-17 21:22:49.694 D/FFUpdater( 8005): 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
10-17 21:22:49.694 D/FFUpdater( 8005): 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
10-17 21:22:49.694 D/FFUpdater( 8005): 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
10-17 21:22:49.699 E/FFUpdater( 8005): CrashListener: Uncaught exception: timeout

TeeTeeHaa avatar Oct 17 '24 19:10 TeeTeeHaa

Maybe disabling HTTP 2.0 do the trick ... can you test again? 😆
ffupdater-release.zip

Tobi823 avatar Oct 21 '24 21:10 Tobi823

Crashes on startup. Notification appears that it crashed. Clicking the notification results in starting the app again. Which... well... does not go well.

Is there a way to access the log or the error message without opening the app itself?

TeeTeeHaa avatar Oct 23 '24 18:10 TeeTeeHaa

Is there a way to access the log or the error message without opening the app itself?

I fear that you have to use the Android Debug Bridge. The simplest way would be:

  • install Android Studio https://developer.android.com/studio
  • start Android Studio an example or new project
  • enable developer mode on your smartphone
  • enable ADB over USB or debugging over USB in the developer settings (on your smartphone)
  • connect your smartphone to your computer + click "allow" on the popup on your smartphone
  • look into the Logcat view in Android Studio
  • make sure that your smartphone is selected in the logcat view
  • maybe filter the log messages for FFUpdater

I skipped through this youtube video and it seems to be correct: https://www.youtube.com/watch?v=smOzLSTaso0

Tobi823 avatar Oct 23 '24 18:10 Tobi823

Or you can try deleting the storage + cache of FFUpdater. Maybe one downloaded file is corrupted

Tobi823 avatar Oct 23 '24 18:10 Tobi823

I don't have Android Studio but the adb binary installed. The following output was created by adb logcat with the output written to a text file and then the text file being manually filtered to contain on lines containing the word ffupdater. I uninstalled FFUpdater before starting the logcat, then started the logcat, then installed FFUpdater from your latest binary. Nevertheless I suspect that logcat includes "historic" data from before starting it.

I assume the interesting part is:

10-23 22:31:59.869  7317  7317 E AndroidRuntime: Process: de.marmaro.krt.ffupdater, PID: 7317
10-23 22:31:59.869  7317  7317 E AndroidRuntime: java.lang.RuntimeException: Unable to create application de.marmaro.krt.ffupdater.FFUpdater: java.lang.IllegalArgumentException: protocols must not contain http/1.0: [http/1.1, http/1.0]
10-23 22:31:59.869  7317  7317 E AndroidRuntime: 	at de.marmaro.krt.ffupdater.network.file.FileDownloader.createOkHttpClient(FileDownloader.kt:251)
10-23 22:31:59.869  7317  7317 E AndroidRuntime: 	at de.marmaro.krt.ffupdater.network.file.FileDownloader.init(FileDownloader.kt:52)
10-23 22:31:59.869  7317  7317 E AndroidRuntime: 	at de.marmaro.krt.ffupdater.FFUpdater.onCreate(FFUpdater.kt:44)
10-23 22:31:59.869  7317  7317 E FFUpdater: CrashListener: Uncaught exception: Unable to create application de.marmaro.krt.ffupdater.FFUpdater: java.lang.IllegalArgumentException: protocols must not contain http/1.0: [http/1.1, http/1.0]
10-23 22:31:59.991  3815  4655 W ActivityTaskManager:   Force finishing activity de.marmaro.krt.ffupdater/.activity.main.MainActivity
10-23 22:32:00.065  3815  4655 I ActivityManager: Process de.marmaro.krt.ffupdater (pid 7317) has died: fg  TOP 
10-23 22:32:00.206  3815  3835 W InputManager-JNI: Input channel object '875756b Splash Screen de.marmaro.krt.ffupdater (client)' was disposed without first being removed with the input manager!

Here is the full file (but manually filtered as described above): logcat-ffupdater.txt

TeeTeeHaa avatar Oct 23 '24 20:10 TeeTeeHaa

And just for the record: I absolutely admire your dedication to try to fix a single issue from a single user having a very uncommon combination of operating system (Android fork e/OS/) and smartphone (ages old Samsung Galaxy S7) by creating individual builds just for this.

TeeTeeHaa avatar Oct 23 '24 20:10 TeeTeeHaa

Thanks and also thanks for your work. It is very helpful to have a user who is willing to test some versions and extract log files :)

I assume the interesting part is:

Spot on. OkHttp does not support HTTP 1.0. Next time I should read the documentation before setting the HTTP protocol.

Tobi823 avatar Oct 23 '24 20:10 Tobi823

0aafeb1d5743723a0a0a8394093e3d55a41342e4

I changed the code to only use HTTP 1.1. If you want, you can try again. Hopefully the bug will be fixed this times :)
ffupdater-release.zip

Tobi823 avatar Oct 23 '24 21:10 Tobi823

Ha! It did work. 🚀

I uninstalled FFUpdater, then installed your latest build, opened it, pushed the download button next to Firefox Klar, then it downloaded the file completely, I pushed the button to install this app in Android's default dialog and, voilà, Firefox Klar is now installed in version 131.0.3.

Do you need any log?

TeeTeeHaa avatar Oct 27 '24 14:10 TeeTeeHaa

@all-contributors please add @TeeTeeHaa for debugging

Tobi823 avatar Nov 15 '24 22:11 Tobi823

@Tobi823

I couldn't determine any contributions to add, did you specify any contributions? Please make sure to use valid contribution names.

allcontributors[bot] avatar Nov 15 '24 22:11 allcontributors[bot]

@all-contributors please add @TeeTeeHaa for bug

Tobi823 avatar Nov 15 '24 22:11 Tobi823

@Tobi823

I've put up a pull request to add @TeeTeeHaa! :tada:

allcontributors[bot] avatar Nov 15 '24 22:11 allcontributors[bot]

I revert my "limit connection pool only to one connection" change because I think that HTTP 2.0 was the issue. Please contact me when you have connection problems in the next version.

Tobi823 avatar Nov 15 '24 22:11 Tobi823

@Tobi823 I hope I won't forget to also tell you if the next version is working perfectly fine. 😁 In addition I'm a bit flattered to be listed as contributor. 😊

TeeTeeHaa avatar Nov 16 '24 12:11 TeeTeeHaa

FFUpdater (79.2.5 to 79.3.0) and the browsers successfully updated on my two affected devices. 👍

TeeTeeHaa avatar Nov 25 '24 20:11 TeeTeeHaa