Page MenuHomePhabricator

Make error message displayed to user during network error more helpful and less technical
Closed, ResolvedPublic

Description

Steps to reproduce:

  1. Open the app
  2. Turn off your wifi and cellular data
  3. Click on a link, or hit random

Actual:
*"The network connection could not be established" is displayed to the user

Expected:

  • A more helpful error message than that? :-)

The message is overly technical. Compare to Facebook's "Can't connect right now" (with a link to check your internet settings), Messenger's "No internet connection", or Quora's "Can't connect to the internet".

Event Timeline

Deskana raised the priority of this task from to Needs Triage.
Deskana updated the task description. (Show Details)
Deskana subscribed.
Dbrant subscribed.

Just a matter of updating the corresponding string.

Hi. I am a new contributor and I would like to contribute to this. Since I am new around here, I would need a bit of a background as to what is exactly required and what tools need to be used for the same. Please let me know how to proceed further. Thank you.

@Anmolkalia All the information you need to get started is here: https://www.mediawiki.org/wiki/Wikimedia_Apps/Team/Wikipedia_Android_app_hacking

Hint: the string you want to change is "error_network_error" and it's in a file called strings.xml :-)

@Deskana, I am on it :) I am facing some problem using ssh "git clone ssh://<USERNAME>@gerrit.wikimedia.org:29418/apps/android/wikipedia". I am getting the following error "ssh: Could not resolve hostname gerrit.wikimedia.org: Name or service not known". I am trying to resolve it. I'll let you know once it is done. Thanks.

Hi @Deskana. I was able to find that string and replace it, but I am facing errors such as "Failed to resolve: junit:junit:4.12" so haven't been able to test the app. I will try to resolve these, but I guess simply replacing the value of the string "error_network_error" with "Can't connect to the internet" should be able to solve the purpose.

@Anmolkalia At what point do you see the error? Have you set up your development environment with Android Studio?

@Dbrant, I am facing these errors on building. Here is a screenshot. I went through http://i.imgur.com/l4mOpAJ.png. Where do I get information regarding setting up the development environment? Thank you very much for your help.

@Anmolkalia All of the directions are on this wiki page:
https://www.mediawiki.org/wiki/Wikimedia_Apps/Team/Wikipedia_Android_app_hacking

It should be as simple as opening Android Studio and importing the project. Did it show any errors when you imported the project?
(You might want to try again with a clean checkout of the repository)

@Dbrant, I am getting these errors http://i.imgur.com/l4mOpAJ.png when I am importing. I am working behind a proxy. I just simply imported the project and imported the ide proxy settings to this project, but it is showing the same errors.

Gradle sync is failing for me. I am unable to figure out why. I have also adjusted the proxy settings. But there still seems to be a problem.,

@Anmolkalia When using Gradle behind a proxy, you should specify the correct settings to be used by Gradle in your gradle.properties file, or in Android Studio. Refer to these answers:

http://stackoverflow.com/questions/18443208/androidstudio-gradle-proxy
http://stackoverflow.com/questions/31803610/gradle-behind-proxy-in-android-studio-1-3

The Gradle guide itself talks about accessing via a proxy:

https://docs.gradle.org/current/userguide/build_environment.html

@Dbrant, I managed to run the app and also change the error message. Let me know if this works fine. http://i.imgur.com/dOn6JTJ.png. Thanks.

@Dbrant, what should I do next? Submit the code on gerrit? Thanks.

@Anmolkalia That's correct; submit it on gerrit, and we'll review it.

Hi @Dbrant. I was caught up in organising the tech-fest in my college the past few days and never got a chance to submit the code on gerrit. I'll get it done by tonight. Really sorry for the inconvenience.

Dbrant claimed this task.