in the differences between the 2 instances we notice the content of the dataStore DHIS2_MAP_CORE/MANAGED_LAYER_SOURCES to be really different but I don’t know the source of it (user config or migration ?).
Is there something we need to do to reset
not working instance
Just one quick question please, are these two instances and apps all the same version (both the one that’s working and the one that’s not working)? You said you tried to upgrade the apps so they’re now the same versions on both instances?
Did you try to run the analytics tables export, clear the application cache and reset apps (from the Data Administration app), and then test while on your browser’s Guest mode? After running analytics tables export in the instance that’s not working, do you see any errors in the Catalina.out log (just to eliminate any DB issues)?
Yes, I’d only recommend making changes to a working production one, only after testing in a development environment.
I am not sure how to reproduce this on play, so I will go ahead and triage this and see if more info is needed or this is enough to be able to debug. Thanks again!
I discovered that worker are hidden from the default / main devtools in most browsers, making it complicated to debug.
I found a request to that seem to pass
So I don’t know “why” but simplifying/cleaning the geometries fixed the issues.
Clearly I don’t know the link. I guess some operation is done to get a bbox or something like that and it slow/dying/… Strangely the shapes where ok in other maps but not once bundled for a google related map.
I made a Dhis Taskr recipe
to update the geometries and now it’s fast and displaying data
I was on leave, I’m glad you figured it out by yourself.
More detailed geometries require more resources from Google Earth Engine to retrive the data, it seems plausible that you were hitting a limit there.
Here is a follow-up ticket I’ve created to see what we can do to catch these type of errors and provide user with helpful information: JIRA - DHIS2-22015
Don’t hesitate to comment there if you want to add details or watch the ticket to follow its resolution.
Finally thanks for sharing your snippet of code. We have a section about geometry simplification in our documentation here: Maps - DHIS2 Documentation, we’ve been recommending MapShaper, but a code based alternative certainly has its advantages. The use of turf.simplify is sensible.
Thanks, indeed the lack of error message or network error from the main app is not helping.
From my understanding each js worker is isolated in its own env (so debugger env too), making it hard to see the real error. The classic advice “look in the dev console” is not really working here.