Collect: User should see user friendly error messages when user loses internet connection during downloading new forms or sending finalized forms

Created on 13 Dec 2017  路  7Comments  路  Source: getodk/collect

Software and hardware versions

Collect v1.11.0

Problem description

User should see user friendly error messages when user loses internet connection during downloading new forms or sending finalized forms.

Steps to reproduce the problem

Use case 1:

  1. User opens 'Get Blank Forms' view
  2. User selects forms to download
  3. User clicks on 'Get Selected'
  4. User loses internet connection
  5. User sees error with message :
    screenshot_20171213-110211

Use case 2:

  1. User opens 'Send Finalized Form' view
  2. User selects forms
  3. User clicks on 'Send Selected'
  4. User loses internet connection
  5. User sees error with message :
    screenshot_20171213-110308

Expected behavior

User should see simple, understandable to everyone message.

All 7 comments

Hello @mmarciniak90 do you have any suggestion on what message text should read?

I would suggested something simple like Operation failed. No network connection.
@lognaturel What do you think? How much information do we need to keep?

As long as the full exception is logged (Timber.e) then the message the user sees can be short. Maybe by analogy with "Success" we could do something like "Failure: no network connection."

@nishontan you'll probably want to look for those specific exceptions and replace the message, otherwise let the full message go through because I'm sure there are other reasons the operations can fail.

EDIT: this shouldn't be logged with e (exception) because it's not actually a system failure but a situational one. We certainly don't want those issues reported on Firebase, for example. Maybe it should just be at level i since it provides information on the failure state?

I will suggest that a proper check be done to see what are the possible
causes if this exception. If it occurs only during network failure, then I
think it's a great idea replacing the message with a more user friendly
message.

Hello @icemc there are quite a few network exceptions logged along with a generic IOException(in DownloadFormTask),Exception(in InstanceServerUploader)

The logged network specific exceptions are listed below

-UnknownHostException
-ClientProtocolException
-HttpHostConnectException
-SocketException
-SocketTimeoutException
-NoHttpResponseException
-ConnectTimeoutException
-URISyntaxException

Let's divide the network exception into two categories temporary and permanent
Temporary being the download can succeed if the user retries after some time.

Temporary Exceptions
Exceptions:java.net.SocketException
Message : Temporary Network Error. Please try again.

Permanent Exceptions
Message: Error. Network Connection Failed
Exceptions:UnknownHostException,SSLException,MarlformedUrlException,UnknownServiceException,NoHttpResponseException,HttpHostConnectException

https://docs.oracle.com/javase/7/docs/api/java/net/SocketException.html
java.net.SocketException to parent(indirect) java.net.NoRouteToHostException, ConnectExceptions, PortUnReachableException,BindExceptions
So maybe we could just log them once.

As of Collect v1.28.0, UnknownHostException and SSLException will lead to a special message shown shown in a dialog at time of the form list request. No connectivity at form list time will lead to a "No network connectivity" snackbar. Any issues with the connection when trying to download individual forms will lead to "Failure" being displayed after each failed form. I think we still want to do what @nishontan proposed long ago and write something a little more specific like "network connection failed".

Was this page helpful?
0 / 5 - 0 ratings