I am trying to set up monitoring for our hybrid mobile application built on Cordova. Configured the app in dynatrace portal, downloaded the config file, installed dynatrace cordova plugin and trying to build the app.
I see the following error in my logs
Could not download the JSAgent! - Could not download agent options403
Can anyone shed some light? Am I missing any other configuration step?
Plugin version: "dynatrace-cordova-plugin": "^7.2.4-1004"
Hi @Matthias H. , I have downloaded the dynatrace.config file from SaaS portal -> Applications -> Our Mobile App ->Mobile app settings -> Instrumentation page.
This config file has a token, which I presume should by default need to have the appropriate access. Do you know if there are any specific instructions in configuring the JSAgent?
Okay. Looked it up. It seems like there was a bug which was fixed already but will come with 169. It seems that the token is create but without the needed permissions. The Workaround is to create a token yourself under the settings of the environment. As already said, this will be fix with an update.
Great! now is working... However, I have the next problem:
#ERROR [2019-05-08 22:40:08]: File not available: /Users/c02rk1lcg8wp/Documents/easyTravel-Ionic-master/plugins/dynatrace-cordova-plugin/scripts/../../../platforms/android/build/outputs/apk
File not available: /Users/c02rk1lcg8wp/Documents/easyTravel-Ionic-master/plugins/dynatrace-cordova-plugin/scripts/../../../platforms/android/build/outputs/apk
This error looks like it happens during the Android build. The path to the APK is wrong. I saw you are using the easyTravel Example? Did you check out the current project? Because this other path only happens when you use old plain Cordova projects. So something mixed up here a bit. That's why he is search in ..android/build.. and not in ..android/app/build..
Hello @Matthias H. Yes, I am using easyTravel example. I download this plugin cordova plugin add firstname.lastname@example.org --save
I try install the last plugin cordova plugin add dynatrace-cordova-plugin --save.
However, the build fall because the dtAgent.js don´t is located in the path. With the plugin 7.0.6-1002 the dtAgent.js is located in the path, but the problem is the path of APK, how you say.
What can I do?
Ohh. The 7.0.6-1002 is just an example how you could possibly download older versions. But in fact you should always get the newest if possible. So failing build because of JSAgent is the error we should look at (with the newest version) - How does your output look like?