dmgogorza
(Diego Martin Gogorza)
August 5, 2018, 11:06pm
1
Hi!
My goal is use FHIR module on OpenMRS Platform and make requests from an external client…
For this I use the OAuth2 module: OAuth2 module
The problem is that when starting the server (with OAuth2 loaded), jquery does not work, for example, to search for patients or search for concepts using ajax.
At home, the errors are:
Refused to execute script from ‘http://localhost:8080/openmrs/scripts/openmrsmessages.js?v=2.2.0-${revisionNumber}&locale=es ’ because its MIME type (‘text/html’) is not executable, and strict MIME type checking is enabled.
Refused to execute script from ‘http://localhost:8080/openmrs/dwr/interface/DWRAlertService.js?v=2.2.0-${revisionNumber} ’ because its MIME type (‘text/plain’) is not executable, and strict MIME type checking is enabled.
I attach some images:
How can i fix this? @mavrk @pkatopenmrs
prabodhk
(Prabodh Kotasthane)
August 6, 2018, 6:46am
2
@dmgogorza I recommend you to read this : https://wiki.openmrs.org/display/projects/OAuth2+Module
If you want to make requests from an external client, you first have to register the client. For that you can refer this : https://wiki.openmrs.org/display/projects/OAuth2+Module+-+Client+REST+Controller
After you figure these things out, help us with the exact requests that you are making.
dmgogorza
(Diego Martin Gogorza)
August 6, 2018, 11:54am
3
Thanks for your reply!
I had read the documentation. I had no problems to create the user, I could also get an access token, executing the URL from a browser.
This happens before any other, that is, when the OAuth module is loaded, I found those errors in all OpenMRS pages.
You can observe in the screen “Buscar Paciente(s)” (Patient search) the “input text” for the search, is not loaded. Does not this happen to you?
prabodhk
(Prabodh Kotasthane)
August 7, 2018, 10:03pm
4
Hey @dmgogorza sorry for a late reply.
May i know which modules are you running?
dmgogorza
(Diego Martin Gogorza)
August 7, 2018, 10:58pm
5
Only FHIR module and OAuth module.
prabodhk
(Prabodh Kotasthane)
August 8, 2018, 3:25am
6
Try running these four modules :
1.webservices.rest
2.legacyUI
3.fhir
4.oauth
See if it resolves your problem. Today i would do a quick check for this and come up with a response.
dmgogorza
(Diego Martin Gogorza)
August 8, 2018, 7:12pm
7
The same thing continues to happen.
I ran the test with the following modules:
Rest Web Services OMOD (version 2.22.0.ba95a3)
Legacy UI Module (version 1.4.0, it also happens with 1.5.0-SNAPSHOT)
FHIR Module (version 1.13.1, it also happens with 1.14.0-SNAPSHOT)
Oauth2 Module (version 0.8)
dmgogorza
(Diego Martin Gogorza)
August 10, 2018, 11:52am
8
I was finally able to solve this problem.
I had to restore a database without data, and until now it not happened again.
Thank you very much for your time, probably in the next few days I will be with another question related to CORS.
1 Like
prabodhk
(Prabodh Kotasthane)
August 10, 2018, 12:27pm
9
That’s cool
Sure I would try my best to help you out @dmgogorza .