cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SSO Error When Using run Start

DD_Developer
Visitor

Hi, 

I am currently able to create an app using the following versions. 

Node JS Windows : V20.11.0

dt-app@0.115.5

 

Microsoft Windows [Version 10.0.19045.4291]
(c) Microsoft Corporation. All rights reserved.

C:\Users\XXXXXX>node --version
v20.11.0

C:\Users\XXXXXX>npx dt-app@0.115.5 create

Hello there! Welcome to the Dynatrace App Toolkit.
You can build, develop, and deploy your apps all from here.
Now we'll just need a few details to get you going!

? Enter the name for your app
C:\Users\XXXXXX>cd documents

C:\Users\XXXXXX\Documents>npx dt-app@0.115.5 create

Hello there! Welcome to the Dynatrace App Toolkit.
You can build, develop, and deploy your apps all from here.
Now we'll just need a few details to get you going!

? Enter the name for your app DynApp
? Enter your environment url https://{environmentid}.apps.dynatrace.com
√ Successfully installed all dependencies
Git not found, skipping repository creation

--------------------------------------------------------------------------------
Your setup is complete, you can start hacking! 

 

 

After the app is created, When I try to run the dev server using npm run start, I am encountering the following issue. 

I am connected to my office network using VPN and trying to run the following command.

 

C:\Users\XXXXXX\Documents>cd dyn-app

C:\Users\XXXXXX\Documents\dyn-app>npm run start

> dyn-app@0.0.0 start
> dt-app dev

 DT-APP:  Started local development server
Error: Could not resolve the SSO-URL for 'https://{environmentid}.apps.dynatrace.com'
Http(s) request failed: read ECONNRESET
Terminate batch job (Y/N)? y

C:\Users\XXXXXX\Documents\dyn-app>code .

C:\Users\XXXXXX\Documents\dyn-app>

 

 

Error: Could not resolve the SSO-URL for 'https://{environmentid}.apps.dynatrace.com'
Http(s) request failed: read ECONNRESET

When I look at the following path for log file,

 

C:\Users\XXXXXXXX\Documents\dyn-app\.dt-app\logs

 

 

I see the following : 

 

2024-04-24T17:40:56.144Z DEBUG [TELEMETRY] Reading package.json
2024-04-24T17:40:56.160Z DEBUG [TELEMETRY] Initializing OpenKit
2024-04-24T17:40:59.552Z DEBUG [TELEMETRY] Creating a new HTTP and HTTPS://{environmentid}.apps.dynatrace.com'
2024-04-24T17:41:07.541Z DEBUG [HTTP(S)] Execute GET request without allowing redirection to 'https://{environmentid}.apps.dynatrace.com/platform/oauth2/authorization/dynatrace-sso'
2024-04-24T17:41:07.542Z DEBUG [TELEMETRY] Tracing request https://{environmentid}.apps.dynatrace.com/platform/oauth2/authorization/dynatrace-sso
2024-04-24T17:41:07.748Z DEBUG [AUTH] Could not resolve the SSO-URL for 'https://{environmentid}.apps.dynatrace.com'
2024-04-24T17:41:07.748Z DEBUG [AUTH] Error: Http(s) request failed: read ECONNRESET
2024-04-24T17:41:07.750Z ERROR Error: Could not resolve the SSO-URL for 'https://{environmentid}.apps.dynatrace.com'
Http(s) request failed: read ECONNRESET
2024-04-24T17:41:07.750Z DEBUG [TELEMETRY] Reporting crash
2024-04-24T17:41:07.750Z DEBUG [TELEMETRY] Closing OpenKit connection

 

 

Can you please let me know what am i missing? 

If Any proxy settings are required, Please let me know where do I need to execute. 

UPDATE : The app ran successfully when VPN was disabled. Can you please let me know where can i find instructions for setting up Proxy in case of VPN.

Thanks in advance.

6 REPLIES 6

SarahFaustmann
Dynatrace Helper
Dynatrace Helper

Hi @DD_Developer,

Have you looked at the proxy server section of our connectivity issues troubleshooting guide? You need a proxy server (for HTTP and HTTPS connections) configured on your machine, as well as set it up according to your company settings.

Kind regards,

Sarah

@SarahFaustmann , 

Thanks for the documentation about proxy settings. I did notice that we have a proxy server by using the following command 

echo %http_proxy%

 

How do I configure this at the machine level? Do I need to execute the following commands ?

export HTTP_PROXY=<your proxy>
export HTTPS_PROXY=<your proxy>

 

Hi @DD_Developer, the command for configuring proxies in Windows is a bit different. This should work:

set HTTP_PROXY=http://proxy_userid:proxy_password@proxy_ip:proxy_port
set HTTPS_PROXY=http://proxy_userid:proxy_password@proxy_ip:proxy_port

 Let us know if we can help in any other way.

Hi educampver,

Thank you for the good videos about AppFunctions, they were informative and encourged me to use AppFunction in my projects, I seems to be having the same constant issue, I was able to deploy before but it did stop working and I am now stuck not sure what happens - is not working for me anymore (see SSO error below)

 

PS C:\Users\U\DEV\Dynatrace\cm-api> npx dt-app dev
════════

Starting development server...

Port 3000 is already in use. Using port 3001 instead.

Warning ──────────────────────────────────────────────────────────────────────────────────

Failed to retrieve user details. App functions will use placeholder data.

──────────────────────────────────────────────────────────────────────────────────────────

Error: SSO-URL for 'https://{environmentid}.apps.dynatrace.com' could not be processed.
fetch failed
If you need further assistance visit the connectivity troubleshooting guide here: dt-url.net/c4jp0s12" target="_blank">https://dt-url.net/c4jp0s12

 

In the deploy part I get a couple message that my extension is not authorised - so I accept the notfifications twice but this does not help and the above error always occurs

Also in my Visual Code, I see a brown that DT is not Authirised how can this be resolved

I appreciate any feedback to resolve my deployment issues

I seem to have a work around and it only works if I do it outside visual studio, not sure what needs to be done to start the development server or the deploy inside Visual Studio, if anyone knows, I will be interested.

But here is my contribution to the community for now; I can deploy to my instance:

set NODE_TLS_REJECT_UNAUTHORIZED=0

C:\Users\U\DEV\Dynatrace\cm-api>npx dt-app dev
════════

Starting development server...

(node:20176) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
(Use `node --trace-warnings ...` to show where the warning was created)
Authenticated as MY_USER

C:\Users\1026014>set NODE_TLS_REJECT_UNAUTHORIZED=0

 

C:\Users\U\DEV\Dynatrace>cd cm-api

C:\Users\U\DEV\Dynatrace\cm-api>npx dt-app deploy
════════

Deploying app...

(node:21984) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
(Use `node --trace-warnings ...` to show where the warning was created)
√ Creating bundles...
√ Built the app
√ Compressed app artifact

Hope this helps. 
√ App is deployed

Done.

════════

Hi @DD_Developer

Did @educampver's comment help you? If so, would you be so kind as to accept this as solved? Thank you! 🙂

Best,
Sarah

Featured Posts