# Error while creating custom app

**URL:** <https://community.dynatrace.com/t/error-while-creating-custom-app/48765>\
**Category:** Developer Q&A Forum\
**Tags:** custom-app\
**Created:** [November 6, 2024, 3:11pm UTC](https://community.dynatrace.com/t/error-while-creating-custom-app/48765 "2024-11-06T15:11:41Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tanveermd](https://avatars.discourse-cdn.com/v4/letter/t/90db22/32.png) [@Tanveermd](https://community.dynatrace.com/u/Tanveermd)\
**Post date:** [November 6, 2024, 3:11pm UTC](https://community.dynatrace.com/t/error-while-creating-custom-app/48765/1 "2024-11-06T15:11:41Z")

</div>

hello,

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](https://dt-url.net/c4jp0s12)  
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

---

<div class="post-metadata">

**Author:** ![Tanveermd](https://avatars.discourse-cdn.com/v4/letter/t/90db22/32.png) [@Tanveermd](https://community.dynatrace.com/u/Tanveermd)\
**Post date:** [November 11, 2024, 12:13pm UTC](https://community.dynatrace.com/t/error-while-creating-custom-app/48765/2 "2024-11-11T12:13:37Z")

</div>

any suggestions on this error please

---

<div class="post-metadata">

**Author:** ![haris](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/haris/32/38293_2.png) [@haris](https://community.dynatrace.com/u/haris)\
**Post date:** [November 11, 2024, 12:34pm UTC](https://community.dynatrace.com/t/error-while-creating-custom-app/48765/3 "2024-11-11T12:34:39Z")

</div>

Hi username1,

Let’s start with this:

1. Can you confirm that you meet all the requirements here&nbsp;[App toolkit | Dynatrace Developer](https://developer.dynatrace.com/reference/app-toolkit/#requirements)?

2. Can you also please share your app.config.json?

3. Please send us the output of (please adjust the URL accordingly):

It seems likely that it’s an issue with certificates that are not from Dynatrace. You can try setting an environment variable&nbsp;`NODE_EXTRA_CA_CERTS=C:/path/to/cert.pem`&nbsp;where&nbsp;`cert.pem`&nbsp;is a file that contains the public certificates that you are injecting (or the certificate for the CA that created those certificates).

See: [Command-line API | Node.js v26.12.1 Documentation](https://nodejs.org/api/cli.html)

---

<div class="post-metadata">

**Author:** ![Tanveermd](https://avatars.discourse-cdn.com/v4/letter/t/90db22/32.png) [@Tanveermd](https://community.dynatrace.com/u/Tanveermd)\
**Post date:** [November 11, 2024, 4:30pm UTC](https://community.dynatrace.com/t/error-while-creating-custom-app/48765/4 "2024-11-11T16:30:30Z")

</div>

Hi Haris,

Thanks for your response, here is the output of the curl cmd

 ![username1_0-1731342508863.png](https://global.discourse-cdn.com/dynatrace/original/3X/a/8/a860ee8140645f8eecdfad8b2001de0150c8ddbc.png)

here is the app.config.json

 ![username1_1-1731342594497.png](https://global.discourse-cdn.com/dynatrace/original/2X/8/86ca314ba99e8a4866240919e298d9ee6f22d695.png)

---

<div class="post-metadata">

**Author:** ![Tanveermd](https://avatars.discourse-cdn.com/v4/letter/t/90db22/32.png) [@Tanveermd](https://community.dynatrace.com/u/Tanveermd)\
**Post date:** [November 11, 2024, 11:00pm UTC](https://community.dynatrace.com/t/error-while-creating-custom-app/48765/5 "2024-11-11T23:00:58Z")

</div>

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](https://dt-url.net/c4jp0s12)  
Error: Terminal interrupt signal

---

<div class="post-metadata">

**Author:** ![Tanveermd](https://avatars.discourse-cdn.com/v4/letter/t/90db22/32.png) [@Tanveermd](https://community.dynatrace.com/u/Tanveermd)\
**Post date:** [November 11, 2024, 11:05pm UTC](https://community.dynatrace.com/t/error-while-creating-custom-app/48765/6 "2024-11-11T23:05:17Z")

</div>

here is the screenshot of error

 ![username1_0-1731366304458.png](https://global.discourse-cdn.com/dynatrace/original/3X/9/2/92a04e893051cadf3325e876fe0b82666ed66af9.png)

---

<div class="post-metadata">

**Author:** ![haris](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/haris/32/38293_2.png) [@haris](https://community.dynatrace.com/u/haris)\
**Post date:** [November 12, 2024, 9:18am UTC](https://community.dynatrace.com/t/error-while-creating-custom-app/48765/7 "2024-11-12T09:18:16Z")

</div>

Hi, can you please confirm you can make connections to the SSO ([sso.dynatrace.com](http://sso.dynatrace.com)) and your own server from the machine? You can find examples here:&nbsp;[Troubleshoot connectivity | Dynatrace Developer](https://developer.dynatrace.com/develop/troubleshoot/troubleshoot-connectivity/#connectivity-of-your-machine)

If that works, please make sure Node.js also has connectivity:&nbsp;[Troubleshoot connectivity | Dynatrace Developer](https://developer.dynatrace.com/develop/troubleshoot/troubleshoot-connectivity/#connectivity-of-nodejs)

---

<div class="post-metadata">

**Author:** ![Tanveermd](https://avatars.discourse-cdn.com/v4/letter/t/90db22/32.png) [@Tanveermd](https://community.dynatrace.com/u/Tanveermd)\
**Post date:** [November 12, 2024, 10:02am UTC](https://community.dynatrace.com/t/error-while-creating-custom-app/48765/8 "2024-11-12T10:02:12Z")

</div>

Hi Haris, Firstly, many thanks for your persistent responses, much appreciated

I am successfully able to connect [sso.dynatrace.com](http://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

C:\DTApps\>npm ping  
npm notice PING https://{environmentid}.apps.dynatrace.com/  
HTTP/1.1 401 Unauthorized  
date: Tue, 12 Nov 2024 09:52:06 GMT  
vary: Origin,Access-Control-Request-Method,Access-Control-Request-Headers  
pragma: no-cache  
expires: 0  
Connection: Keep-Alive  
content-type: application/json  
cache-control: no-cache, no-store, max-age=0, must-revalidate  
content-length: 115  
referrer-policy: strict-origin-when-cross-origin  
x-xss-protection: 0  
x-content-type-options: nosniff  
dynatrace-response-source: API Gateway  
strict-transport-security: max-age=31536000 ; includeSubDomains

C:\DTApps\>curl -I https://{environmentid}.apps.dynatrace.com/platform/oauth2/authorization/dynatrace-sso  
HTTP/1.1 302 Found  
date: Tue, 12 Nov 2024 09:52:29 GMT  
vary: Origin,Access-Control-Request-Method,Access-Control-Request-Headers  
pragma: no-cache  
expires: 0  
location: https://{environmentid}.apps.dynatrace.com/platform/login/oauth2/code/dynatrace-sso&nonce=xxxxxxxxxx&code\_challenge=xxxxxxxx&code\_challenge\_method=S256  
Connection: Keep-Alive  
set-cookie: SESSION-prod3=xxxxxxxxxxxxxxxxxx; Path=/; [Domain=apps.dynatrace.com](http://Domain=apps.dynatrace.com); Secure; HTTPOnly; SameSite=Lax  
cache-control: no-cache, no-store, max-age=0, must-revalidate  
referrer-policy: strict-origin-when-cross-origin  
x-xss-protection: 0  
x-content-type-options: nosniff  
dynatrace-response-source: API Gateway  
strict-transport-security: max-age=31536000 ; includeSubDomains

C:\DTApps\>node -e “fetch(‘[https://sso.dynatrace.com](https://sso.dynatrace.com)’).then(console.log)”  
node:internal/deps/undici/undici:13392  
Error.captureStackTrace(err);  
^

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’  
}  
}

Node.js v22.11.0

---

<div class="post-metadata">

**Author:** ![haris](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/haris/32/38293_2.png) [@haris](https://community.dynatrace.com/u/haris)\
**Post date:** [November 12, 2024, 10:43am UTC](https://community.dynatrace.com/t/error-while-creating-custom-app/48765/9 "2024-11-12T10:43:42Z")

</div>

Hi,

thanks for the update. This shows an issue with connection, which should be covered here:&nbsp;[Troubleshoot connectivity | Dynatrace Developer](https://developer.dynatrace.com/develop/troubleshoot/troubleshoot-connectivity/#connectivity-issues)

Do you have any firewall or proxy in place? Also, can you run:

```markup
openssl s_client -showcerts -connect sso.dynatrace.com:443

```

It seems something is getting in the way and sends your self signed certificate back when you’re accessing via Node.

Have you tried exporting the certificate like:

```markup
export org CA cert resolved node connectivity issues
#CA CERT
export NODE_EXTRA_CA_CERTS=/Users/xxxxx/.ssh/org-proxy-chain.pem

```

---

<div class="post-metadata">

**Author:** ![Tanveermd](https://avatars.discourse-cdn.com/v4/letter/t/90db22/32.png) [@Tanveermd](https://community.dynatrace.com/u/Tanveermd)\
**Post date:** [November 13, 2024, 6:46am UTC](https://community.dynatrace.com/t/error-while-creating-custom-app/48765/10 "2024-11-13T06:46:09Z")

</div>

Hi Haris,

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

 ![username1_0-1731480268953.png](https://global.discourse-cdn.com/dynatrace/original/3X/7/f/7f3c7b772e552a9af353a122b2530b918842deda.png)

---

<div class="post-metadata">

**Author:** ![haris](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/haris/32/38293_2.png) [@haris](https://community.dynatrace.com/u/haris)\
**Post date:** [November 13, 2024, 1:30pm UTC](https://community.dynatrace.com/t/error-while-creating-custom-app/48765/11 "2024-11-13T13:30:17Z")

</div>

Hi there,

I’m glad to hear that you’ve solved the certificate issue.

To deploy an app, you need the following permission:

```markup
app-engine:apps:install

```

Can you confirm that your policy includes this permission in your user group? If not, please add it and retry.

---

<div class="post-metadata">

**Author:** ![Tanveermd](https://avatars.discourse-cdn.com/v4/letter/t/90db22/32.png) [@Tanveermd](https://community.dynatrace.com/u/Tanveermd)\
**Post date:** [November 13, 2024, 3:17pm UTC](https://community.dynatrace.com/t/error-while-creating-custom-app/48765/12 "2024-11-13T15:17:19Z")

</div>

Many thanks for your persistent support Haris, much appreciated

---

<div class="post-metadata">

**Author:** ![haris](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/haris/32/38293_2.png) [@haris](https://community.dynatrace.com/u/haris)\
**Post date:** [November 13, 2024, 6:18pm UTC](https://community.dynatrace.com/t/error-while-creating-custom-app/48765/13 "2024-11-13T18:18:05Z")

</div>

Happy that I could help you 🙂

Feel free to contact us anytime in case you have more questions.

Kind regards, Haris

---

<div class="post-metadata">

**Author:** ![calfano](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/calfano/32/35558_2.png) [@calfano](https://community.dynatrace.com/u/calfano)\
**Post date:** [November 13, 2024, 7:53pm UTC](https://community.dynatrace.com/t/error-while-creating-custom-app/48765/14 "2024-11-13T19:53:16Z")

</div>

[@haris](https://community.dynatrace.com/user/57428)&nbsp;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&nbsp; **runtime**? I haven’t found a good way to do so:

![calfano_0-1731527590001.png](https://global.discourse-cdn.com/dynatrace/original/2X/3/3e725ec9d295772452ff33c0d89261e82cb7e6f4.png)

---

<div class="post-metadata">

**Author:** ![haris](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/haris/32/38293_2.png) [@haris](https://community.dynatrace.com/u/haris)\
**Post date:** [November 21, 2024, 2:19pm UTC](https://community.dynatrace.com/t/error-while-creating-custom-app/48765/15 "2024-11-21T14:19:46Z")

</div>

Hi calfano,

since that should be Node runtime, the above should still apply. Does this work for you?

```auto
$ export NODE_EXTRA_CA_CERTS=[your CA certificate file path]

```

Or&nbsp;  
The&nbsp;[`cafile`&nbsp;configuration property](https://docs.npmjs.com/misc/config#cafile)&nbsp;that&nbsp;works similarly:&nbsp;`npm config set cafile [your CA certificate file path]`

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:

```javascript
node --use-openssl-ca

```

or if using env variable:

```javascript
<span class="hljs-variable constant_">NODE_OPTIONS</span>=--use-openssl-ca

```

and if using a self-signed CA cert,&nbsp;you would copy the CA file into the image under&nbsp;`/usr/local/share/ca-certificates/`&nbsp;and run&nbsp;`update-ca-certificates`.&nbsp;I hope that helps. Let me know if it doesn’t.

---

<div class="post-metadata">

**Author:** ![calfano](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/calfano/32/35558_2.png) [@calfano](https://community.dynatrace.com/u/calfano)\
**Post date:** [December 5, 2024, 6:23pm UTC](https://community.dynatrace.com/t/error-while-creating-custom-app/48765/16 "2024-12-05T18:23:56Z")

</div>

No luck still using both methods 😞

Does this need to be set at the system level? I have these env variables at the user level since I don’t have admin privileges on my workstation

---

<div class="post-metadata">

**Author:** ![haris](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/haris/32/38293_2.png) [@haris](https://community.dynatrace.com/u/haris)\
**Post date:** [December 17, 2024, 8:43am UTC](https://community.dynatrace.com/t/error-while-creating-custom-app/48765/17 "2024-12-17T08:43:21Z")

</div>

Hi Calfano,

can you try with system-level variables?

---

<div class="post-metadata">

**Author:** ![calfano](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/calfano/32/35558_2.png) [@calfano](https://community.dynatrace.com/u/calfano)\
**Post date:** [December 19, 2024, 8:36pm UTC](https://community.dynatrace.com/t/error-while-creating-custom-app/48765/18 "2024-12-19T20:36:38Z")

</div>

Unfortunately, I’m not able to, my workstation is restricted such that I can’t set system-level variables 😞

---

<div class="post-metadata">

**Author:** ![haris](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/haris/32/38293_2.png) [@haris](https://community.dynatrace.com/u/haris)\
**Post date:** [December 23, 2024, 2:08pm UTC](https://community.dynatrace.com/t/error-while-creating-custom-app/48765/19 "2024-12-23T14:08:31Z")

</div>

I’m sorry to hear that. Since it doesn’t seem possible to do it with user-level variables, I’ll let you know if anything changes.

---

<div class="post-metadata">

**Author:** ![archem](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/archem/32/1597_2.png) [@archem](https://community.dynatrace.com/u/archem)\
**Post date:** [January 10, 2025, 11:46am UTC](https://community.dynatrace.com/t/error-while-creating-custom-app/48765/20 "2025-01-10T11:46:21Z")

</div>

Hello&nbsp;[@calfano](https://community.dynatrace.com/user/58627)

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.

Hope this helps!

[Next page](https://community.dynatrace.com/t/error-while-creating-custom-app/48765.md?page=2)
