corona-warn-app / cwa-documentation

Project overview, general documentation, and white papers. The CWA development ends on May 31, 2023. You still can warn other users until April 30, 2023. More information:
https://coronawarn.app/en/faq/#ramp_down
Apache License 2.0
3.28k stars 344 forks source link

Bad behavior when adding local incidence without network access #672

Closed fynngodau closed 3 years ago

fynngodau commented 3 years ago

Describe the bug

Adding a new local incidence while the device is not connected to the network causes the application to behave badly.

Steps to reproduce the issue

  1. Disconnect device from internet
  2. Add new Local 7-Day Incidence

The newly added incidence card is not shown at all. No indication that the operation was successful is given.

  1. Reconnect the device to the internet.
  2. Close and reopen application (recreate activity).

The newly added incidence card is now displayed with up-to-date values.

Expected behaviour

Indicate success of the operation even if no internet connection is available.

Possible Fix

The card should be displayed with no value, for example with a character instead of a value, to indicate that the data is not yet available due to missing internet access.

Additional context

The other statistic cards are not shown either if the data has not been loaded yet, for example if the app data had been wiped and the device had not been connected to the internet.


Internal Tracking ID: EXPOSUREAPP-8733 Internal Tracking ID: EXPOSUREAPP-8436

Ein-Tim commented 3 years ago

iOS behaves exactly the same. Please transfer to the documentation repository.

dsarkar commented 3 years ago

@fynngodau @Ein-Tim Thanks for reporting. Internal Tracking ID: EXPOSUREAPP-8733


Corona-Warn-App Open Source Team

fynngodau commented 3 years ago

Android PR: https://github.com/corona-warn-app/cwa-app-android/pull/3815

(Thanks for the ping @vaubaehn)

Ein-Tim commented 3 years ago

I can confirm that the behavior under iOS has improved with version 2.7.

Adding a local 7-day incidence without internet connection now no longer just does nothing while offline but already adds the card to the Home Screen. However, the card is empty (because CWA couldn't download the incidence from the internet - makes sense) Here's a screenshot:

After connecting to the internet, closing and reopening the app, the value is shown:

MikeMcC399 commented 3 years ago

The behaviour under Android 2.7.1 differs to under iOS. If there is no internet connection, the message:

statistics_add_card_warning_no_internet is output:

DE "Ihre Internetverbindung wurde unterbrochen. Hinzufügen einer 7-Tage-Inzidenz nicht möglich. Bitte prüfen Sie die Verbindung und versuchen Sie es erneut."

EN "Your Internet connection was lost. It was not possible to add a 7-day incidence figure. Please check the connection and try again."

The English translation is however inaccurate. "It was not possible to add a 7-day incidence figure." says to me that an attempt was made to add a a 7-day incidence figure and it failed. In fact all I have done is to swipe onto the tile to add a 7-day incidence figure, but I haven't selected a geography to add (because none was displayed to select from).

It makes more sense in this context to say "It is not possible to add a 7-day incidence figure." (present tense: is, not past tense: was).

Apart from that minor text point, the issue is resolved on Android 2.7.1. It is not possible to add a local 7-Day Incidence under Android with no Internet connection. The situation no longer arises that the location is added without feedback that the operation was successful when there was no Internet connection. When Internet connection is restored the tile refreshes and it is then possible to request "Add Local 7-Day Incidence".

Ein-Tim commented 3 years ago

@MikeMcC399 I'll add an issue to the iOS repo requesting to add this message to iOS too.

MikeMcC399 commented 3 years ago

@Ein-Tim

I'll add an issue to the iOS repo requesting to add this message to iOS too.

That seems unnecessary if iOS allows adding a local 7-Day incidence without an Internet connection.

Ein-Tim commented 3 years ago

@MikeMcC399

Although it does allow to add the card, the card can be empty. And IHMO, this is more confusing than just showing a warning message.

Ein-Tim commented 3 years ago

@fynngodau Do you consider this issue as fixed? If yes I'd suggest to close this issue.

fynngodau commented 3 years ago

The behavior is still not optimal when the network connection disappears while the region selector is open, but the core problem is tackled, I suppose.

dsarkar commented 1 year ago

PR https://github.com/corona-warn-app/cwa-app-ios/pull/5018