Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Error 9002 - "Connection reset." appears once per day. #2953

Closed
3 tasks done
sfadschm opened this issue Apr 25, 2021 · 19 comments
Closed
3 tasks done

Error 9002 - "Connection reset." appears once per day. #2953

sfadschm opened this issue Apr 25, 2021 · 19 comments
Assignees
Labels
bug Something isn't working mirrored-to-jira This item is also tracked internally in JIRA

Comments

@sfadschm
Copy link

sfadschm commented Apr 25, 2021

Avoid duplicates

  • Bug is not mentioned in the [FAQ]
  • Bug is specific for Android
  • Bug is not already reported in another issue

Technical details

  • Device name: Google Pixel 3a
  • Android version: 11
  • App version: 2.0.4

Describe the bug

When opening the app for the first time of the day, the error 9002 "Connection reset" occurs.
This error only occurs since the 2.0.4 update but is reproducible every day. It is only triggered when opening the app for the first time.
I tried triggering it by switching from WLAN to LTE during daytime, resetting our Router connection, turning the phone off and on, but did not have any success.

As far as I can tell, functionality of the app is not touched by this, as after confirming the error, contacts get checked like normally.

Steps to reproduce the issue

Screenshot_20210425-094951
Screenshot_20210425-081521

  1. Have CWA App closed overnight.
  2. Wake up in the morning.
  3. Open CWA App.
  4. Get error.

Expected behaviour

The App opens without any error.


Internal Tracking ID: EXPOSUREAPP-6714

@sfadschm sfadschm added the bug Something isn't working label Apr 25, 2021
@dsarkar dsarkar added the mirrored-to-jira This item is also tracked internally in JIRA label Apr 25, 2021
@dsarkar
Copy link
Member

dsarkar commented Apr 25, 2021

Hi @sfadschm,
Thanks for reporting. We created an Internal Tracking ID: EXPOSUREAPP-6714. The development team will have a look at this issue. Any further news regarding this issue will be published here. Best wishes, DS


Corona-Warn-App Open Source Team

@schuhmi2
Copy link

Ditto, I'm experiencing this too
OnePlus 6T android 10
CoronaWarn app v 2.0.4

@sfadschm
Copy link
Author

Addition:
Just got the same error a second time today.
Still cannot trigger it intentionally.

@MikeMcC399
Copy link
Contributor

This issue is listed in the resolved section of the FAQs https://www.coronawarn.app/en/faq/#cause9002_timeout which refers also to issue #998.

I have seen it occurring sporadically on an emulated Google Pixel 3a device using Android 11. Emulators are generally slower than real physical devices, so this would be consistent with a timeout issue.

@sfadschm
Copy link
Author

sfadschm commented Apr 25, 2021

Not sure this is the same issue. From the GitHub issue list, it seems error 9002 can have multiple causes. This here is "Connection reset". Not sure its the same as "timeout".

@MikeMcC399
Copy link
Contributor

@sfadschm

Not sure this is the same issue. From the GitHub issue list, it seems error 9002 can have multiple causes. This here is "Connection reset". Not sure its the same as "timeout".

Thanks for pointing this out.
You're right that error 9002 can cover many reasons:

In the case of the timeout issue #998 the stack trace is showing
java.net.SocketTimeoutException: timeout

whereas your stack trace from this issue (#2953) shows
java.net.SocketException: Connection reset

There may be a relationship between the two, but we probably need the help of the developers to troubleshoot further. I did try again today to see if I could reproduce, but as it happens I'm not getting any error.

@holgel
Copy link

holgel commented Apr 26, 2021

With me it also occurs sporadically during startup.
I had generated a QR code after the update to 2.0.3, logged into this event and logged out again. The next time I restarted, the above-mentioned problem occurred.

Stack trace:

java.net.SocketException: Connection reset
	at java.net.SocketInputStream.read(SocketInputStream.java:209)
	at java.net.SocketInputStream.read(SocketInputStream.java:139)
	at org.conscrypt.ConscryptEngineSocket$SSLInputStream.readFromSocket(ConscryptEngineSocket.java:5)
	at org.conscrypt.ConscryptEngineSocket$SSLInputStream.processDataFromSocket(ConscryptEngineSocket.java:21)
	at org.conscrypt.ConscryptEngineSocket$SSLInputStream.access$100(ConscryptEngineSocket.java:1)
	at org.conscrypt.ConscryptEngineSocket.doHandshake(ConscryptEngineSocket.java:7)
	at org.conscrypt.ConscryptEngineSocket.startHandshake(ConscryptEngineSocket.java:10)
	at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.kt:30)
	at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:27)
	at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:113)
	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:20)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:14)
	at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:222)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:14)
	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:36)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:14)
	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:35)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:14)
	at de.rki.coronawarnapp.http.HttpErrorParser.intercept(HttpErrorParser.kt:1)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:14)
	at de.rki.coronawarnapp.http.interceptor.RetryInterceptor.intercept(RetryInterceptor.kt:2)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:14)
	at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.kt:4)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:14)
	at de.rki.coronawarnapp.http.interceptor.WebSecurityVerificationInterceptor.intercept(WebSecurityVerificationInterceptor.kt:1)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:14)
	at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:25)
	at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:12)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
	at java.lang.Thread.run(Thread.java:764)

@d4rken
Copy link
Member

d4rken commented Apr 26, 2021

Thanks for the stacktrace in text form 😁

My current theory is that the error orginates from:

suspend fun getDayIndex(location: LocationCode): List<LocalDate> = withContext(Dispatchers.IO) {
keyApi
.getDayIndex(location.identifier)
.map { dayString ->
// 2020-08-19
LocalDate.parse(dayString, DAY_FORMATTER)
}
}

It should not have a relation with CheckIns, I don't know yet why this suddenly occurs.

@holgel
Copy link

holgel commented Apr 26, 2021

In any case, the time factor plays a role. If I wait a certain amount of time (about 3h I tried) before restarting the app after the last crash, the error comes back, otherwise it starts normally.

@d4rken
Copy link
Member

d4rken commented Apr 27, 2021

Did anyone have a registered test when the error showed?

@sfadschm
Copy link
Author

Did anyone have a registered test when the error showed?

Now that you mention it: yes!
It was an old one and it expired yesterday so it was deleted. Today I did not get the error yet.

@dsarkar
Copy link
Member

dsarkar commented Apr 27, 2021

FYI PR #2973

Edit: disregard, see #2953 (comment)

@schuhmi2
Copy link

Did anyone have a registered test when the error showed?

Yeh, I did have an old one too that just expired. Upon deleting it, I too did not get this error this morning.

@d4rken d4rken removed the Fix 2.0.5 label Apr 27, 2021
@d4rken
Copy link
Member

d4rken commented Apr 27, 2021

@dsarkar #2973 is not a fix for the connection reset error. That likely can't be fixed on client side. Maybe hidden, but without any other error reporting, just hiding it is also not great.

#2973 fixes EXPOSUREAPP-6784, it will prevent the connection reset error from causing the "test invalid" card to display which could cause the user to remove actually valid test.

We should leave this ticket open for other users to find it until either server side the error is fixed, or a decision was made to hide the error popup for this case type of error.

@holgel
Copy link

holgel commented Apr 27, 2021

Did anyone have a registered test when the error showed?

I also have an expired test that I have not yet deleted.

@sfadschm
Copy link
Author

I also have an expired test that I have not yet deleted.

Do you still get the error?

@holgel
Copy link

holgel commented Apr 28, 2021

I also have an expired test that I have not yet deleted.

Do you still get the error?

No, the error does not seem to occur anymore.

@MikeMcC399
Copy link
Contributor

I have been trying to reproduce this error on an Android 8 device with a dummy test registered, but so far, no error message. I tried for instance disabling WiFi for more than 4 hours (with no mobile data enabled either), then starting CWA before and after WiFi was reenabled.

Sidenote: CWA Android 2.0.5 has been released and I have installed it from the Google Play Store.

@svengabr
Copy link
Member

I have just checked the linked Jira issue.

Jira Ticket is flagged as:
Resolution: Wont Fix
Status: Obsolete

The DDOS was happening against the CWA Servers and/or the CDN network infront of it. The CDN firewall likely killed connections prematurely during the DDOS to not be overwhelmed by it.

At the time, I discussed the error dialog behavior with ***, and we decided that we want to keep the dialog and not hide, as it is otherwise not possible to know about such issues.

Ideally we would want a better way to display errors than the usual popup, but so far better error display was not high priority enough to be part of a sprint.

A cheaper change could be to detect these types of errors and only show them if they continue long enough, and not every time they happen.

I agree that it is not nice for the user and would be happy to implement something nicer if someone creates a feature ticket and puts it in a sprint .

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working mirrored-to-jira This item is also tracked internally in JIRA
Projects
None yet
Development

No branches or pull requests

8 participants