I m requesting for assistance on solving a login error users are getting when logging in using the Android App. The users were able to login just fine 3 or so days ago and now all of a sudden the droid is throwing different types of errors
wrong user credentials
In some cases, this is the error that is coming up on the Android
Cause: Unknown server
Exception: java.net.UnknownHostException: Unable to resolve host “Host URL”: No address associated with hostname
It is not fully clear to me if this problem is happening only in Android or using the web browser as well as per the first picture attached.
Is this happening with every user? I have seen the D2Error before and it was due to a misconfiguration on the server but here it seems there might be problems while accessing the server. I would try the following:
For obvious reasons change the password of that user and try again. To discard wrong credentils
Try connecting from the phone via the web browser. Like this we can discard connectivity issues between the phone and the server
Reset the App
Otherwise, please feel free to provide a username / password / server that we could use for testing via private message. Ideally a testing user with minimum access and a testing (and not production) server if possible.
This problem is only occuring in Android. Users are able to loggin just fine using the web platform.
The Unknown server error is happening for every user, hence no one is able to login using Android.
Have tried connecting to dhis2 on the phone via the phone’s browser, it’s giving ERR_NAME_NOT_RESOLVED. It is not giving the same problem when accessed using the Computer’s web browser.
I have tried uninstalling and reinstalling the app. Downgrading the app, resetting the app cache on the phone… Nothing seems to be working.
I have tried mapping the hosts [ip to hostname]. Even changing the DNS settings on the server…
Been testing it all morning - the error I keep getting is this one.
If you cannot use the web browser of the phone the problem is not coming from the App itself but due to a connectivity issue between the phone and the server. If you are getting ERR_NAME_NOT_RESOLVED I suspect you are having some DNS issues.
Are your phones using wireless or mobile data? If you are using wireless I would try using a laptop on the same network and checking if you can reach from there the server.
Another question. Your phones are not using any kind of proxy or VPN, right?
I have tried to tether from one phone so Laptop and phone are on the same network - I can access the server via Laptop web browser, while I am unable to do the same using the phone broswer.
Your server seems unreachable from where I am and I believe there is a problem at network level. I am not sure if this server is online or on premises. If the second I believe there might be some network forwarding issues that the laptops overcome by accessing the server internally (or being allowed by some rules).
If the server is online you need to check with your provider. It is very difficult to diagnose this problems remotely so I am not sure how much I can help.
If you use your phone to tether (via WiFi AP or USB cable) and connect the laptop you should not be able to see the server. If you can there might be some cache issues that are allowing to access the server (for example if the DNS name / IP changed). Try opening an incognito window, or by clearing the server cache (CTRL + F5 or ALT + F5) and see if after that you also cannot reach the server.
You could also see your DNS cached values on your laptop/desktop. Or try performing a nslookup on the server URL and see if you get an IP. If you get one your laptop/desktop are receiving DNS from a private DNS server. Try getting that IP (if public) and see if your phones can reach it