Tracker capture app not loading dhis2 version 2.30

Dear Altruist,

I have just installed dhis2 version 2.30 in my windows 10 machine . I am using tomcat9 and postgres version 11. Every functionalities working fine and smooth but when I am trying to browse tracker capture app it is not loading. In my browser console I am getting error of angular js. Can you please suggest what I can do for this?
My version details:
Version:2.30
Build revision:e787d29
Build date:2018-11-26 12:26
Jasper reports version:6.3.1
User agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36

Error Details:
jquery.js:3869 Uncaught Error: [$injector:modulerr] AngularJS

5 Likes

Dear @sohel,
how does your networks tab look when opening the tracker app? Is the tracker the only app not working?

Markus

3 Likes

Hi @Markus,

Thanks for your very quick reply. Here is screen shot of networks tab. Only tracker capture and event capture are not working other apps are working fine. I have also tried with version 2.31 but it does not solve the the issue. I feel it is definitely issues with my environment, browser or network but unfortunately could not pin point the reason.

4 Likes

Hi @sohel, I have tried to reproduce your issues in 2.30 without success. Have you cleared your cache? You can do this by using the “Cache cleaner app” in DHIS2. If that does not help, can you try to clear your browser cache? This can be archived by clicking the “>>” symbol in your dev tool (that is open in your screenshots) and selecting “Application”. Then click “Clear Storage” and check all the boxes. After that click “Clear site data”.

5 Likes

Hi @lukasewvd ,

Thanks for your help and very details instruction, I have cleared the cache using dhis2 ‘browser cache cleaner’ several times, also have tried to clean browser cache the way you suggested but still problem remain. I have also tried to browse it from my colleague machine and have tried with other browser in my machine as well but could not success. I may have give another try by deleting everything from my current installation.
So far, I have installed

  1. java
  2. tomcat
  3. postgres + postgis extensions.

in my fresh windows 10 machine.

Do you think any other angular module/component also need to be installed in my machine for this to be worked?

.

3 Likes

Hi @sohel, it should not be necessary to install angular. Could you click the “app-9feb287…js:5990” link next to the “Uncaught SyntaxError” and take a screenshot of the code it displays? Could you also take a screenshot of the “About” page? You find this page by clicking the circle with the two letters in the top right and “About DHIS 2”.

4 Likes

Hi @lukasewvd,

Please find the screenshot attached here.

4 Likes

Hi @lukasewvd ,

I found some extra character coming with else clause , following screenshot might be helpful for you to understand the error.

5 Likes

Hi @sohel, thanks for the last screen-shot. We managed to figure out that the error is caused by a “fake space” (happen when you press “option” and “space” key at the same time on a Mac machine). This fake space causes no direct issues for Unix operating systems, but in Windows this “fake space” is interpreted as a “”. The issue should now be resolved in the newest builds (currently building).

6 Likes

Thanks you @lukasewvd that it helps you to trace the issues, can you please let me know when I am going to get this new build?

4 Likes

It should be done building now.

5 Likes

Hi @lukasewvd,

Thanks for your very prompt action, I have taken latest build from
https://s3-eu-west-1.amazonaws.com/releases.dhis2.org/dev/dhis.war but it seems problem persist. Also for event capture i am getting the same. I am definitely missing something can you please help? Few screen shot of the error attaching here that might help you to get more insight,

Latest Build:

Tracker capture error:

Event capture error:

4 Likes

Hi @sohel,

This is caused by wrong encoding. This can be resolved by the following steps.

JAVA_OPTS environment variable must include:
-Djavax.servlet.request.encoding=UTF-8 -Dfile.encoding=UTF-8

CATALINA_OPTS environment variable must include:
-Dfile.encoding=“UTF-8”

If you are running tomcat 8.5 or higher, you also need to allow some extra url characters.

tomcat server.xml:
Add relaxedQueryChars=“[]:” to the used connector.

For example:
https://pastebin.com/NkyW7Zni

6 Likes

Hi @andrehukkelaas,

Thanks for your valuable information. these really helps, my tracker capture is now working.

@lukasewvd,

Still I am getting error for event capture, an extra character coming while i am trying to browse it can you please check?

Error:

4 Likes

Hi @sohel - If you updated the server config we would expect the problem to be gone in tracker and event capture at the same time. Do you experience the problem consistently across several browsers/machines, or can it be a cache issue?

4 Likes

Hi @Markus,
After update server config tracker capture is working fine but event capture not working, i have checked with several browser, cleared browser cache and even used incognito window but every time result was same tracker capture working but event capture not working. I am not sure but i guess the fixation you applied for tracker capture module for work in windows may need to be applied for event capture module as well.

Tracker capture working:

Event capture not working:

Version information:

3 Likes

Hi @sohel, it might seem as your server is not updated correctly or has not had the desired effect on your setup for some reason. There fake-space has been removed from the tracker capture app, but this would only have an effect on servers that is not set up with the correct UTF-8 encoding.

Can you double check the settings, especially the parts that regards UTF encoding from @andrehukkelaas s post above?

If you cannot find any problems, it would be very interesting if you could send us the details on on which web server version you are running.

5 Likes

Hi @Markus,
I have followed @andrehukkelaas post above and tried different way but still event capture app is not working.

this is my environment variables,
CATALINA_OPTS= -Xms1024m -Xmx2048m -XX:PermSize=1024m -XX:MaxPermSize=2048m -Dfile.encoding=“UTF-8”

JAVA_OPTS = -Xms1024m -Xmx2048m -XX:PermSize=1024m -XX:MaxPermSize=2048m -Djavax.servlet.request.encoding=UTF-8 -Dfile.encoding=UTF-8

these are different relax characters and path characters i have tried in my server.xml
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout - Pastebin.com

I am using webserver tomcat 9 in my windows 10 machine.

3 Likes

@Markus,

I have downgraded tomcat version now I am using Apache Tomcat Version 8.5.37 now everything working fine.

Thanks for your help and @andrehukkelaas points these were really vitals.

3 Likes

I am running DHIS2 2.30 on Tomcat 9 with the following configuration:

 <Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443"
		relaxedQueryChars="[,],|"
    />

Relaxed Query Characters should be separated with commas.

4 Likes