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

FFUpdater has crashed #18

Closed
codingepaduli opened this issue Dec 9, 2020 · 10 comments
Closed

FFUpdater has crashed #18

codingepaduli opened this issue Dec 9, 2020 · 10 comments

Comments

@codingepaduli
Copy link

Hi,

in these days, my smartphone was without connection. I had the wire signal, but I was not able to navigate, so I experienced the following crash multiple times:

de.marmaro.krt.ffupdater.utils.ParamRuntimeException at BackgroundUpdateChecker.java:84 de.marmaro.krt.ffupdater.utils.ParamRuntimeException de.marmaro.krt.ffupdater.utils.ParamRuntimeException: background update check failed for FIREFOX_RELEASE at de.marmaro.krt.ffupdater.notification.BackgroundUpdateChecker.lambda$findAppsWithAvailableUpdates$1(BackgroundUpdateChecker.java:84) at de.marmaro.krt.ffupdater.notification.-$$Lambda$BackgroundUpdateChecker$35ZiPKEdROusULgHJI2328BkhpY.accept(Unknown Source:10) at j$.util.Map$-CC.$default$forEach(Map.java:5) at j$.util.Map$-EL.forEach(Map.java:6) at de.marmaro.krt.ffupdater.notification.BackgroundUpdateChecker.findAppsWithAvailableUpdates(BackgroundUpdateChecker.java:75) at de.marmaro.krt.ffupdater.notification.BackgroundUpdateChecker.doBackgroundCheck(BackgroundUpdateChecker.java:62) at de.marmaro.krt.ffupdater.notification.BackgroundUpdateChecker.doWork(BackgroundUpdateChecker.java:47) at androidx.work.Worker$1.run(Worker.java:85) 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:764) Caused by: java.util.concurrent.ExecutionException: de.marmaro.krt.ffupdater.utils.ParamRuntimeException: can't consume API interface https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/mobile.v2.fenix.release.latest.arm64-v8a/artifacts/public/chain-of-trust.json at java.util.concurrent.FutureTask.report(FutureTask.java:123) at java.util.concurrent.FutureTask.get(FutureTask.java:207) at de.marmaro.krt.ffupdater.notification.BackgroundUpdateChecker.lambda$findAppsWithAvailableUpdates$1(BackgroundUpdateChecker.java:77) ... 10 more Caused by: de.marmaro.krt.ffupdater.utils.ParamRuntimeException: can't consume API interface https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/mobile.v2.fenix.release.latest.arm64-v8a/artifacts/public/chain-of-trust.json at de.marmaro.krt.ffupdater.metadata.fetcher.ApiConsumer.consume(ApiConsumer.java:43) at de.marmaro.krt.ffupdater.metadata.fetcher.MozillaCiConsumer.consume(MozillaCiConsumer.java:22) at de.marmaro.krt.ffupdater.metadata.fetcher.Firefox.call(Firefox.java:47) at de.marmaro.krt.ffupdater.metadata.fetcher.Fetcher.fetchAvailableMetadata(Fetcher.java:74) at de.marmaro.krt.ffupdater.metadata.fetcher.Fetcher.call(Fetcher.java:56) at de.marmaro.krt.ffupdater.metadata.fetcher.Fetcher.call(Fetcher.java:15) at java.util.concurrent.FutureTask.run(FutureTask.java:266) ... 3 more Caused by: java.net.ConnectException: Failed to connect to firefox-ci-tc.services.mozilla.com/35.190.5.182:443 at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:143) at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:112) at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:184) at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:126) at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:95) at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:281) at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:224) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:461) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:407) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getHeaders(HttpURLConnectionImpl.java:163) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getHeaderField(HttpURLConnectionImpl.java:207) at java.net.URLConnection.getContentEncoding(URLConnection.java:529) at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getContentEncoding(DelegatingHttpsURLConnection.java:142) at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getContentEncoding(HttpsURLConnectionImpl.java:26) at de.marmaro.krt.ffupdater.metadata.fetcher.ApiConsumer.consume(ApiConsumer.java:33) ... 9 more Android Version: 28 Device Manufacturer: asus Device Model: ASUS_X01BDA

Thank you for your work.

@Tobi823
Copy link
Owner

Tobi823 commented Dec 9, 2020

The original error is:
Caused by: java.net.ConnectException: Failed to connect to firefox-ci-tc.services.mozilla.com/35.190.5.182:443

Does this error occur regularly? (I think that you misconfigured your smartphone - maybe your selected DNS-Server is unreliable, your mobile data config is strange etc.)

The background update checker should only run if your smartphone is connected to the internet.
But obviously, the update checker runs even if the internet is not available.

I'm afraid that I can't fix this bug.

But I can add an option, after how many successive errors the error notification should be displayed.
What do you think?

@Tobi823
Copy link
Owner

Tobi823 commented Dec 10, 2020

BTW similar bug https://gitlab.com/Tobiwan/ffupdater/-/issues/1

@codingepaduli
Copy link
Author

No,

I did NOT misconfigured anything, I did NOT changed my DNS-Server. It was only a temporary issue caused by the mobile phone carrier; After few days, FFUpdater worked greatly again.

I don't ask to set an option to count how many successive errors happens before display the notification.

I just think that only developers are able to understand the stacktrace shown, so I think the stracktrace should be available, but common user should see an understandable error message.

Like Marc Dequènes (Duck) @duck-rh say in the bug https://gitlab.com/Tobiwan/ffupdater/-/issues/1 , a simple notification saying "Due to network connectivity problem the background check failed" would be more useful. And a button to click in order to see the stacktrace and send the bug.

Thanks.

@borisovg
Copy link

I started having the same issue several weeks ago. It is annoying having to dismiss this useless message every time from my notifications.

Tobi823 added a commit that referenced this issue Feb 14, 2021
#19

 - when consuming an API and an exception occurs, then retry up to two times before throwing an exception
@Tobi823
Copy link
Owner

Tobi823 commented Feb 14, 2021

The issue should now be fixed (in version 71.0.0).

FFUpdater retries up to two times before crashing (when contacting the server for available versions)

@Tobi823 Tobi823 closed this as completed Feb 14, 2021
@duck-rh
Copy link

duck-rh commented Feb 15, 2021

@Tobi823 it's nice but that does not solve the problem of the error message. Not anyone is able to make sense of traces.

@Tobi823
Copy link
Owner

Tobi823 commented Feb 16, 2021

@duck-rh What do you think about this?

image

"FFUpdater hasn't been able to check for updates in the background. Maybe this has been caused by a network connectivity issue or an unknown bug. If this error occurs regularly, please report it. Click to view the technical error message."

The "background update check failed" can be triggered by a network connectivity issue or an unknown app. Displaying "Due to network connectivity problem ..." would be misleading.

@Tobi823 Tobi823 reopened this Feb 16, 2021
@duck-rh
Copy link

duck-rh commented Feb 17, 2021

@Tobi823 that's better. Is there no way to separate network issues and bugs, like filtering the exception? I mean you probably do not want people to bother you with tickets each time they have a bad connection. So if you could check the exception raised in order to clearly distinguish connectivity issues then you could have two messages, one to tell the person to check their connection and the other to report a bug, But that's just a suggestion.

@Tobi823
Copy link
Owner

Tobi823 commented Feb 17, 2021

Is there no way to separate network issues and bugs, like filtering the exception?

Not with absolute certainty. But I can make a good guess.

then you could have two messages

Good idea. Why didn't I come up with this myself? 😄

What do you think about these messages?

If it's likely a temporary connectivity issue =>
It's likely that the background check failed due to a temporary network connectivity issue. But if this error occurs more than once a week, please report it. Click to view the error log.

If it's certain a real bug =>
Due to an unknown bug the background check failed. Please report this error. Click to view the error log.

@duck-rh
Copy link

duck-rh commented Feb 18, 2021

looks fine, thanks

Tobi823 added a commit that referenced this issue Feb 18, 2021
 - improve ApiConsumer.kt
 - show to different error messages
Tobi823 added a commit that referenced this issue Feb 18, 2021
 - translate error message
Tobi823 added a commit that referenced this issue Feb 18, 2021
 - show different error messages when the background update check failed due to a network issue or due to an unknown bug
 - add translation for the two error messages
@Tobi823 Tobi823 closed this as completed Feb 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants