I am getting multiple errors while creating a custom app
Pl. help
C:\DTApps>node -e "fetch(‘https://{environmentid}.apps.dynatrace.com’ could not be processed.
self-signed certificate in certificate chain
If you need further assistance visit the connectivity troubleshooting guide here: Troubleshoot connectivity | Dynatrace Developer
Error: Terminal interrupt signal
Error: Terminal interrupt signal
Error: Terminal interrupt signal
Error: Terminal interrupt signal
Error: Terminal interrupt signal
Terminate batch job (Y/N)? y
It seems likely that it’s an issue with certificates that are not from Dynatrace. You can try setting an environment variable NODE_EXTRA_CA_CERTS=C:/path/to/cert.pem where cert.pem is a file that contains the public certificates that you are injecting (or the certificate for the CA that created those certificates).
I am able to start the local development server but unable to authenticate, I have set the environment variables as recommended above but still no luck
Error: SSO-URL for ‘https://{environmentid}.apps.dynatrace.com’ could not be processed.
self-signed certificate in certificate chain
If you need further assistance visit the connectivity troubleshooting guide here: Troubleshoot connectivity | Dynatrace Developer
Error: Terminal interrupt signal
Hi Haris, Firstly, many thanks for your persistent responses, much appreciated
I am successfully able to connect sso.dynatrace.com and my own DT instance as well, the outputs are same as shown in the troubleshooting document
But I am unable to connect using Node.js, ending up with “Error: self-signed certificate in certificate chain” - here is the complete output of the cmds mentioned in the troubleshooting document please
TypeError: fetch failed
at node:internal/deps/undici/undici:13392:13
at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {
[cause]: Error: self-signed certificate in certificate chain
at TLSSocket.onConnectSecure (node:_tls_wrap:1679:34)
at TLSSocket.emit (node:events:518:28)
at TLSSocket._finishInit (node:_tls_wrap:1078:8)
at ssl.onhandshakedone (node:_tls_wrap:864:12) {
code: ‘SELF_SIGNED_CERT_IN_CHAIN’
}
}
After having a Dynatrace provided certificate (.pem) and updating the npm config, I was successfully able to run/build the app, but I am unable to deploy it due to lack of permissions, do you know what permissions a user should have to deploy an app - thought, I would also be able to deploy it as I was able to run/build! but that’s not the case
@haris I’m facing self signed cert errors when making an api call with the DT JS runtime. Do you know how to supply CA certs to the runtime? I haven’t found a good way to do so:
The main difference is that first one adds a cert, where the cafile replaces the certificates. So to add a CA to the chain, you use the first. It’s also possible to specify command line to use a system CA store or CA cert like so:
and if using a self-signed CA cert, you would copy the CA file into the image under /usr/local/share/ca-certificates/ and run update-ca-certificates. I hope that helps. Let me know if it doesn’t.
I’ve got this same issue as my laptop is behind a company proxy and has custom certificates.
One thing that you could do is downloading the certificate from the tenant you’re trying to run it from, and adding it to your machine globally.
To download the certificate you can open the Dev Tools in Chrome → Security → View Certificate → Details → Export
You can save it as a Base64 certificate and ensure that the file ends with a .crt extension, then on Windows it’s as easy as to double click it, and install it.
An alternative but not recommended method is to set the Enviroment Variable “NODE_TLS_REJECT_UNAUTHORIZED” to the value “0”, but take into account that this option is a security risk and your systems people will not be happy about it.