Maps App Not working with Google Earth Engine

I have a working google-service to run the earth engine service in dhis2 map application. I am attaching screens for the responses I am getting for a delve from the community.

Once again, just on the interface, when I click Add Layer and chooses any of the Google Earth Engine service, data, organisation units and style loads except for Period which shows “Loading Periods” by never get loaded.

I am using version 2.37.4.

Thank you for sharing.


I think the issue that appeared is related to Cross-Origin Resource Sharing (CORs). Please read more about it here: How to debug common development errors | DHIS2 Developer Portal

Based on the Console screenshot you posted above. It seems that a script is being blocked and it’s stopping the service you added to work. You’ll probably need to whitelist some URLs for this to work.

1 Like

Thanks for the quick response. I will look into it and revert.

1 Like

Hello @Gassim

I have taken time to go through the set up and to no avail. None of the google earth engine services works. I am sharing with you and the family, screens from the setup and errors I am getting upon an attempt to access them.

Again, you have mentioned some Whitelisting, please can you share with me, a possible url of google earth service url I must whitelist?

Thank you.

  1. Content of dhis-google-auth.json at /home/xx/config

  1. Outcome of response form …/logs/catalina.out

  1. Response from google earth engine temperature layer from maps app

  1. From google chrome console on accessing google earth service

  1. Header response from the console.

Thank you all for the support.

NB: From the google service account: these roles are give : Basic → owner, Google Earth Engine =.> Admin, Publisher, Viewer, Writer.

I have enable Google Earth Engine Api, and have registered the service account email and json keys generated.

From the error message this don’t seem to be an issue with Google Earth Engine itself, but about running Web Workers in your environment (Content-Security-Policy).

I need to investigate further. Could you please tell me how you run DHIS2 on the server? Did this stop working after upgrading DHIS2?

1 Like

Good morning @Bjorn_Sandvik

I am using non-root user to run the dhiss instance eg: sudo -u xx /home/xx/tomcat-dhis/bin/startup.sh

The service still works after the upgrade.

Please could you give a guide or sample virtualHost for apache2.
Attached is the apache virtualhost screen.

Thank you.

Please contact me on bjorn@dhis2.org and I will try to help you :slight_smile:

1 Like