Random 404 error with Open Web Apps module

During GSoC application periods we were having problems with deploying an owa. We kept having 404 errors. And somehow I fixed it(at least I thought I did) without doing anything.

We were all deploying our app to either the demo or using the docker image to setup a toolkit server and deploying our app. So what I did was setup toolkit manually using tomcat and deployed the owa module and when I deployed my app there was no 404 error. So I thought the fix was just to ditch the docker setup and do a manual setup instead.

But recently Judy started facing the problem again with radiology.librehealth.io and to investigate locally I setup toolkit using the docker image and I had the same 404 error. So I decided to setup toolkit manually via tomcat and I still had the same error. With very little knowledge about the codebase of the owa module I didn’t know where to start looking. I decided to start with tomcat remote debugging. After successfully turning remote debugging on in tomcat and connected the owa module to the debugger, I placed some breakpoints in the module and visited the running web app but before I could even hit my breakpoint, I noticed that the 404 error was gone. So I’m confused as to how to proceed. Seems like something I did while trying to enable remote debugger may have fixed it but I’m not sure.

Clicking on the app shows the app interface

Hoping someone with more knowledge of how the owa module works can guide me on how to proceed with this. I no longer face the error locally so I don’t know how to fix the demo server.

The reason I never complained of this issue during GSoC is because I was using the openmrs-sdk to create my servers and this error doesn’t show up when the server is openmrs only when it’s toolkit.

cc @sunbiz @judywawira

I really don’t know much on OWA … @sunbiz and @namratanehete have more domain expertise