Running ODK Aggregate offline

What is the problem? Please be detailed.
I am trying to run ODK aggregate offline. I am using Postgres for my database. I have tomcat and postgres setup properly and the tables are updated as expected but if I try to open the ODK server in my browser eg: http://localhost:8080/ODKAggregate then it doesnt load because the homepage is trying to load Google Maps JS which is blocking the rest of the page load.

Please note the page loads if I have internet turned on since in that case the googlemaps script can be downloaded. But in my usecase I would like to use ODK offline.

What ODK tool and version are you using? And on what device and operating system version?
I used the ODK Aggreate 1.4.15 to generate the WAR file and DB scripts. I am currently running in Mac OSX but I dont think OS is an issue for this problem.

What steps can we take to reproduce the problem?
Generate the ODK build for postgres run it using tomcat. Turn off internet and try to access the ODK aggregate server in your browser.

What you have you tried to fix the problem?
None so far.

Anything else we should know or have? If you have a test form or screenshots or logs, attach here.
I will try to post a screenshot soon.

Any help would be greatly appreciated.

@ggalmazor Can you look into reproducing this?

I've tried this on Aggregate 1.4.15 and on the latest master version and it's true that Aggregate fails to load the google maps js file but page loading works and you can use Aggregate. I guess that displaying maps won't work (I haven't checked, but it's obvious that it won't).

@Ram_G_Athreya What specific page is not loading? If you have a screenshot, that'd be great to see!

Did you put all the Google API keys necessary into the preferences and setup your permissions for that account? As without the keys and permissions maps won't work (especially not running on google servers).

Hi @W_Brunette! Do you think that configuring the API keys would really make it worse? I mean, it's not loading already...

I was specifically referring to your comment below when talking about the google API keys and security settings

I have seen the JS file not work if you do not have the right settings a google doesn't like to give maps away without know who did it.

But it fails because I'm running Aggregate without an Internet connection... Maybe I'm missing something... I don't understand, sorry!

yes that would do it too :slight_smile:

I was just trying to be helpful and warn you of a common issue with the maps not working.

Oh! Alright! :smiley:

I was trying to think how that would help reproduce @Ram_G_Athreya's problem. It seems the page load is getting stuck while trying to load the library without an internet connection.

In my tests, even though the script fails to be loaded, the page load isn't affected by that

I think the best way to figure out what is going on is to get a copy of the webserver logs. I have seen everything from directory permissions issues to port redirect problems and many more that have caused pages not to load.

1 Like

Hi All

Thank you very much for reaching out and looking into this issue. I am afraid I am unable to reproduce this anymore. Somehow the homepage is no longer blocked even though I dont have access to the internet and the applications tries to access JS files from https://maps.google.com.

I do understand as some of you have rightly pointed out that because the device is offline it cannot support rendering of maps. That is ok and I dont really need it for my present use case.

Please note I am trying to keep a close watch though in each new device I use with the ODK aggregate server. Once again thank you very much for all your help. I apologize in case I wasted your time.

@ggalmazor Yes you are exactly right. This was happening before but is no longer the case. No idea how to reproduce this but I will keep a close watch. Thank you very much for your assistance.

1 Like