I'm having issues getting the JSAgent to download to my Cordova application. The following error was observed:
#ERROR [2019-06-12 16:55:29]: Could not download the JSAgent! - Could not download agent file: 403
#INFO [2019-06-12 16:55:29]: Searching for HTML files ..
From what I can see from the Cordova Plugin's documentation, the plugin will try to download the js init code from:
However, when I checked the REST-API of my Dynatrace AppMon Server, the path to the initcode is the following:
I am guessing that the plugin is trying to download the JS agent from an invalid path, which caused the issue. If this is the case, what should I do to get the plugin to work properly again?
According to this documentation:
it looks like path is the same as expected. The question is if any of those uri's are working properly when you execute them manually?
The Cordova plugin uses /api/v1 in the URL. So this usually works, at least this is the first time I see this problem. 403 as error usually means forbidden, so are you sure that user and password is correct? If you try to use the URL with /api/v5 and put it in your browser, does it work and download the JSAgent file?
The path with v1 api worked when I accessed via the browser.
Thanks for the help people, I've somehow managed to get the cordova to work by using the localhost address instead of my laptop's public address. (My AppMon instance is hosted within my own laptop).