Android data capture app does not connect to server

we have set up a server and a data capture form.

The app cannot connect to the server, the login fails. The error message is:
“Login Error - Provided server url is not a dhis instance”

But the url is correct.

What is this bug?

HI @Intimidator . Are you sure you are typing the correct URL? If your server is not forwarding HTTP to HTTPS you might be typing the wrong one. Please verify and let us know.

1 Like

Dear Jaime Bosque,

Thank you for your quick reply.
The server url is
We have configured a redirect from http to https.
I have typed in the dhis2 capture app:
and with a ‘/’ at the end,
but both lead to the same error.

Hi @Intimidator . I think you might have a problem with your setup, have you followed the official guide: System Administration Guide - DHIS2 Documentation and specifically the Tomcat set up (with the special chars in the configuration file?)

<Connector port="8080" protocol="HTTP/1.1"
  relaxedQueryChars="[]" />

Please try that and let us know if it doesn’t work.

1 Like

Dear Jaime,

Thank you very much, indeed the last line about the relaxedQueryChars was missing. It is working perfectly now!
Again thank you.

1 Like

Hi @jaime.bosque , @Gassim , and @phil i have similar issue, i am trying to connect to my locally hosted DHIS2 and its is connecting fine, But when i do a port forwarding of my locally hosted DHIS2, my android app says “Provided server url is not a dhis instance”. How can i over come this issue ?

If you have machine hosted locally I guess you are trying to connect by IP and not by URL, is that assumption right? And being the case, are you sure you are using HTTP and not HTTPS? You cannot use HTTPS with IP as URL.

1 Like

yes i am trying to access via http protocol. You are right, my machine is hosted locally and i am trying to access via IP address with http protocol and a specific port, but still this error is displayed “Provided server url is not a dhis instance”.

Can you access from a non Android device? Or from an Android but using the web browser and not the app?

When port forwarding is done, that IP is not accessible via app nor by android Browser, i found a way, i used IP Tunneling for this task and now it is accessible via app and browser…

I am not sure I understand, but if you have created a tunnel between the Android and the server and you can connect but if the tunnel is not present you cannot access maybe you have to check your firewall settings? I am not sure if you have installed everything manually but if you can describe better your set up we can try to help. Otherwise, if you say the problem is solved, perfect! :slight_smile: