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

background update check failed, stack trace shown #637

Open
myuseraccount opened this issue Oct 20, 2024 · 4 comments
Open

background update check failed, stack trace shown #637

myuseraccount opened this issue Oct 20, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@myuseraccount
Copy link

Important first questions

  1. FFUpdater up-to-date: 79.2.5, F-Droid build

  2. similar issues: 582 and 626, both closed

Describe the bug
I get notifications titled "background update failed" with a stack trace

To Reproduce
Not predictable. But I don't allow battery optimization exemption (unrestricted background) for ffupdater, and I leave data saver on. Update checks on metered networks is on, but not downloads.

Expected behavior
Ffupdater should tolerate data being turned off or restricted through intentional means in the OS.

Error message from FFUpdater
Stacktrace:

de.marmaro.krt.ffupdater.background.exception.AppUpdaterRetryableException: Simple network test was not successful. Retry later.
	at de.marmaro.krt.ffupdater.background.AppUpdater.isUpdateCheckPossible-gIAlu-s(AppUpdater.kt:135)
	at de.marmaro.krt.ffupdater.background.AppUpdater.access$isUpdateCheckPossible-gIAlu-s(AppUpdater.kt:44)
	at de.marmaro.krt.ffupdater.background.AppUpdater$isUpdateCheckPossible$1.invokeSuspend(AppUpdater.kt:0)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	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)

Logs:

de.marmaro.krt.ffupdater.background.exception.AppUpdaterRetryableException: Simple network test was not successful. Retry later.
	at de.marmaro.krt.ffupdater.background.AppUpdater.isUpdateCheckPossible-gIAlu-s(AppUpdater.kt:135)
	at de.marmaro.krt.ffupdater.background.AppUpdater.access$isUpdateCheckPossible-gIAlu-s(AppUpdater.kt:44)
	at de.marmaro.krt.ffupdater.background.AppUpdater$isUpdateCheckPossible$1.invokeSuspend(AppUpdater.kt:0)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	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)

Device information:

Key Value
FFUpdater version 79.2.5 (175) release F-Droid/other
Device Pixel 5 (redfin, redfin, redfin)
Manufacturer google (Google)
Supported ABIs arm64-v8a, armeabi-v7a, armeabi
Android version 14 (SDK: 34)
OS tuotanto.eu.calyxos.net, cdesai, release-keys, 1728652786000
@myuseraccount myuseraccount added the bug Something isn't working label Oct 20, 2024
@bearhoney
Copy link

I see same crash reports.
Device: OnePlus 8T, LineageOS with older Kernel (based on Android 11)

@Tobi823
Copy link
Owner

Tobi823 commented Oct 21, 2024

@myuseraccount Thanks for the detailed error report.

I think this is a logic error on my side.

The "background update check" notification is only shown, if the "Simple network test was not successful" failed for 5 times in a row. (with 30s waiting time between the first and second try, 60s between 2nd and 3rd, 120s ...)

("Simple network test was not successful" = a HTTP head request to e.g. https://api.github.com failed)

I guess it is quite normal to have no internet/network for 30min. Maybe you also uses the airplane mode?

@Tobi823
Copy link
Owner

Tobi823 commented Oct 21, 2024

@Tobi823 Solution: skip AppUpdater.kt when simple network test failed, because a failed HTTP head request is a good indicator for no internet

@myuseraccount
Copy link
Author

Just got a slightly different crash.

Stacktrace:

de.marmaro.krt.ffupdater.background.exception.AppUpdaterRetryableException: Simple network test was not successful. Retry later.
	at de.marmaro.krt.ffupdater.background.AppUpdater.isUpdateCheckPossible-gIAlu-s(AppUpdater.kt:135)
	at de.marmaro.krt.ffupdater.background.AppUpdater.access$isUpdateCheckPossible-gIAlu-s(AppUpdater.kt:44)
	at de.marmaro.krt.ffupdater.background.AppUpdater$isUpdateCheckPossible$1.invokeSuspend(AppUpdater.kt:0)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	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)

Logs:

de.marmaro.krt.ffupdater.background.exception.AppUpdaterRetryableException: Simple network test was not successful. Retry later.
	at de.marmaro.krt.ffupdater.background.AppUpdater.isUpdateCheckPossible-gIAlu-s(AppUpdater.kt:135)
	at de.marmaro.krt.ffupdater.background.AppUpdater.access$isUpdateCheckPossible-gIAlu-s(AppUpdater.kt:44)
	at de.marmaro.krt.ffupdater.background.AppUpdater$isUpdateCheckPossible$1.invokeSuspend(AppUpdater.kt:0)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	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)

Device information:

Key Value
FFUpdater version 79.2.5 (175) release F-Droid/other
Device Pixel 5 (redfin, redfin, redfin)
Manufacturer google (Google)
Supported ABIs arm64-v8a, armeabi-v7a, armeabi
Android version 14 (SDK: 34)
OS tuotanto.eu.calyxos.net, cdesai, release-keys, 1728652786000

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

3 participants