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

Exceptions during download should not crash the app #653

Open
TPS opened this issue Nov 26, 2024 · 4 comments
Open

Exceptions during download should not crash the app #653

TPS opened this issue Nov 26, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@TPS
Copy link

TPS commented Nov 26, 2024

Describe the bug
Firefox Focus has an update. I try to use FfU to update it, but it crashes while downloading before starting update.

To Reproduce
Please insert the steps to reproduce the behavior here:

  1. Start FfU.
  2. Note FfF has an update.
  3. Start the update.

Expected behavior
Download & update proceeds as normal.

Error message from FFUpdater

Stacktrace:
java.net.SocketException: Software caused connection abort
	at java.net.SocketInputStream.socketRead0(Native Method)
	at java.net.SocketInputStream.socketRead(SocketInputStream.java:118)
	at java.net.SocketInputStream.read(SocketInputStream.java:173)
	at java.net.SocketInputStream.read(SocketInputStream.java:143)
	at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.readFromSocket(ConscryptEngineSocket.java:985)
	at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.processDataFromSocket(ConscryptEngineSocket.java:949)
	at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.readUntilDataAvailable(ConscryptEngineSocket.java:864)
	at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.read(ConscryptEngineSocket.java:837)
	at okio.InputStreamSource.read(JvmOkio.kt:94)
	at okio.AsyncTimeout$source$1.read(AsyncTimeout.kt:125)
	at okio.RealBufferedSource.read(RealBufferedSource.kt:39)
	at okhttp3.internal.http1.Http1ExchangeCodec$AbstractSource.read(Http1ExchangeCodec.kt:339)
	at okhttp3.internal.http1.Http1ExchangeCodec$FixedLengthSource.read(Http1ExchangeCodec.kt:376)
	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:218)
	at de.marmaro.krt.ffupdater.network.file.FileDownloader$copyStreamsWithProgressReport$2.invokeSuspend(FileDownloader.kt:94)
	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}@18ad045, Dispatchers.Main.immediate]

Logs:

java.net.SocketException: Software caused connection abort
	at java.net.SocketInputStream.socketRead0(Native Method)
	at java.net.SocketInputStream.socketRead(SocketInputStream.java:118)
	at java.net.SocketInputStream.read(SocketInputStream.java:173)
	at java.net.SocketInputStream.read(SocketInputStream.java:143)
	at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.readFromSocket(ConscryptEngineSocket.java:985)
	at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.processDataFromSocket(ConscryptEngineSocket.java:949)
	at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.readUntilDataAvailable(ConscryptEngineSocket.java:864)
	at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.read(ConscryptEngineSocket.java:837)
	at okio.InputStreamSource.read(JvmOkio.kt:94)
	at okio.AsyncTimeout$source$1.read(AsyncTimeout.kt:125)
	at okio.RealBufferedSource.read(RealBufferedSource.kt:39)
	at okhttp3.internal.http1.Http1ExchangeCodec$AbstractSource.read(Http1ExchangeCodec.kt:339)
	at okhttp3.internal.http1.Http1ExchangeCodec$FixedLengthSource.read(Http1ExchangeCodec.kt:376)
	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:218)
	at de.marmaro.krt.ffupdater.network.file.FileDownloader$copyStreamsWithProgressReport$2.invokeSuspend(FileDownloader.kt:94)
	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}@18ad045, Dispatchers.Main.immediate]

Device information:

Key Value
FFUpdater version 79.3.0 (176) release Github
Device DE2118 (OnePlusN200TMO, OnePlusN200TMO, holi)
Manufacturer OnePlus (OnePlus)
Supported ABIs arm64-v8a, armeabi-v7a, armeabi
Android version 12 (SDK: 31)
OS dg02-pool06-kvm73, root, release-keys, 1729150414000
@TPS TPS added the bug Something isn't working label Nov 26, 2024
@TPS TPS changed the title FfU Crashes on downloading FfF FfU crashes on downloading FfF Nov 26, 2024
@Tobi823
Copy link
Owner

Tobi823 commented Nov 27, 2024

I can't reproduce the error. I can try updating some dependencies but I think that something on your network is blocking the download.

Can you access https://archive.mozilla.org/pub/focus/releases/ (the / at the end is important) ?

@TPS
Copy link
Author

TPS commented Nov 27, 2024

I agree it was a temporary network glitch, & it did indeed clear up later. The concern is the FfU crash: it really shouldn't under any network conditions.

Can you access https://archive.mozilla.org/pub/focus/releases/ (the / at the end is important) ?

Yes, just fine (now; I'm sure not when the crash kept happening).

@Tobi823
Copy link
Owner

Tobi823 commented Nov 27, 2024

Agreed. I have to rewrite some code to better catch these exceptions

@Tobi823 Tobi823 changed the title FfU crashes on downloading FfF Exceptions during download should not crash the app Nov 27, 2024
@Tobi823
Copy link
Owner

Tobi823 commented Nov 28, 2024

FYI this was the problem https://stackoverflow.com/a/46226519

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants