Tobi823 / ffupdater

FFUpdater: Updater for privacy friendly browser
https://f-droid.org/en/packages/de.marmaro.krt.ffupdater
GNU General Public License v3.0
716 stars 34 forks source link

Crash while downloading/checking update #376

Closed DxBONESxBACK closed 1 year ago

DxBONESxBACK commented 1 year ago

After my Android Model: REVVL V+ 5G was at rest for a bit I signed into it and noticed that the FFUpater was downloading in process and I clicked on the notification to see how much longer it had and it didn't open a progressive note so I went to the actual app and opened it and it apparently started to check for available updates and the two apps that it changed on popped up with errors. At that point I figured to just close the app and wait till the download notification disappeared. As I closed the app this crash report popped up:

Stacktrace:

de.marmaro.krt.ffupdater.FFUpdaterException: Can't find latest update for DUCKDUCKGO_ANDROID.
    at de.marmaro.krt.ffupdater.storage.MetadataCache.getCachedOrFetchIfOutdated(MetadataCache.kt:31)
    at de.marmaro.krt.ffupdater.storage.MetadataCache$getCachedOrFetchIfOutdated$1.invokeSuspend(MetadataCache.kt:0)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
    at android.os.Handler.handleCallback(Handler.java:938)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:223)
    at android.app.ActivityThread.main(ActivityThread.java:7871)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:612)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:997)
Caused by: de.marmaro.krt.ffupdater.FFUpdaterException: Can't find latest update for DuckDuckGo Android.
    at de.marmaro.krt.ffupdater.app.impl.AppBase.findAppUpdateStatus(AppBase.kt:94)
    at de.marmaro.krt.ffupdater.app.impl.AppBase$findAppUpdateStatus$1.invokeSuspend(AppBase.kt:0)
    ... 9 more
Caused by: de.marmaro.krt.ffupdater.network.exceptions.NetworkException: Fail to request the latest version of Android from GitHub.
    at de.marmaro.krt.ffupdater.network.github.GithubConsumer.getLatestRelease(GithubConsumer.kt:59)
    at de.marmaro.krt.ffupdater.network.github.GithubConsumer.access$getLatestRelease(GithubConsumer.kt:12)
    at de.marmaro.krt.ffupdater.network.github.GithubConsumer$getLatestRelease$1.invokeSuspend(GithubConsumer.kt:0)
    ... 9 more
Caused by: de.marmaro.krt.ffupdater.network.exceptions.NetworkException: Request of HTTP-API https://api.github.com/repos/duckduckgo/Android/releases/latest failed.
    at de.marmaro.krt.ffupdater.network.FileDownloader$downloadSmallFileAsync$2.invokeSuspend(FileDownloader.kt:87)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
    at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
    at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:749)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
Caused by: java.net.UnknownHostException: Unable to resolve host "api.github.com": No address associated with hostname
    at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:156)
    at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:103)
    at java.net.InetAddress.getAllByName(InetAddress.java:1152)
    at okhttp3.Dns$Companion$DnsSystem.lookup(Dns.kt:49)
    at okhttp3.internal.connection.RouteSelector.resetNextInetSocketAddress(RouteSelector.kt:164)
    at okhttp3.internal.connection.RouteSelector.nextProxy(RouteSelector.kt:129)
    at okhttp3.internal.connection.RouteSelector.next(RouteSelector.kt:71)
    at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:205)
    at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)
    at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)
    at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255)
    at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)
    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:923)
Caused by: android.system.GaiException: android_getaddrinfo failed: EAI_NODATA (No address associated with hostname)
    at libcore.io.Linux.android_getaddrinfo(Native Method)
    at libcore.io.ForwardingOs.android_getaddrinfo(ForwardingOs.java:73)
    at libcore.io.BlockGuardOs.android_getaddrinfo(BlockGuardOs.java:202)
    at libcore.io.ForwardingOs.android_getaddrinfo(ForwardingOs.java:73)
    at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:135)
    ... 23 more
Device information: Key Value
FFUpdater version 77.7.9 (135) release
Device REVVL V+ 5G (Sprout, Sprout, S98115AA1)
Manufacturer T-Mobile (Wingtech)
Supported ABIs arm64-v8a, armeabi-v7a, armeabi
Android version 11 (SDK: 30)
OS cibuild, cibuild, release-keys, 1672991245000
Tobi823 commented 1 year ago

it didn't open a progressive note

I never implemented once because it is a lot of work for little benefit. But you are right - this confuse some users and maybe I will change it.

The real reason for the crash seems to be your network: ``android_getaddrinfo failed: EAI_NODATA (No address associated with hostname)''. But

As I closed the app this crash report popped up:

the app should not crash due to network problems. I forgot to catch some exceptions and let them crash the app.

Fixed will be released in 77.7.14