Unable to start backend when AZURE_TOKEN is set
See original GitHub issueIf there is
integrations:
azure:
- host: dev.azure.com
token:
$env: AZURE_TOKEN
in my app-config.yaml and if I try to start the backend from packages/backend in this mono-repo, the backend seems to be stuck, and the port 7000 is never engaged.
Stuck backend logs
backstage/packages/backend master ✗ 21m ⚑
▶ AZURE_TOKEN="xyz" yarn start
yarn run v1.22.1
$ backstage-cli backend:dev
Build succeeded
2021-01-21T09:56:45.328Z backstage info Loaded config from app-config.yaml, app-config.local.yaml
2021-01-21T09:56:45.333Z backstage info Created UrlReader predicateMux{readers=azure{host=dev.azure.com,authed=true},bitbucket{host=bitbucket.org,authed=false},github{host=github.com,authed=false},gitlab{host=gitlab.com,authed=false},fetch{}
2021-01-21T09:56:45.455Z catalog info Locations Refresh: Beginning locations refresh type=plugin component=catalog-all-locations-refresh
2021-01-21T09:56:45.473Z catalog info Locations Refresh: Visiting 1 locations type=plugin component=catalog-all-locations-refresh
2021-01-21T09:56:45.473Z catalog info Locations Refresh: Refreshing location bootstrap:bootstrap type=plugin component=catalog-all-locations-refresh
2021-01-21T09:56:46.147Z catalog info Read 63 entities from location bootstrap:bootstrap in 674ms type=plugin
2021-01-21T09:56:46.241Z catalog info Wrote 63 entities from location bootstrap:bootstrap in 94ms type=plugin
2021-01-21T09:56:46.242Z catalog info Locations Refresh: Completed locations refresh in 787ms type=plugin component=catalog-all-locations-refresh
^CStopped watcher
But by either not setting AZURE_TOKEN when doing yarn start, or by removing the integrations.azure from app-config.yaml, the backend is able to start as usual.
Successful backend logs
backstage/packages/backend master ✗ 22m ⚑
▶ yarn start
yarn run v1.22.1
$ backstage-cli backend:dev
Build succeeded
2021-01-21T10:00:08.719Z backstage info Loaded config from app-config.yaml, app-config.local.yaml
2021-01-21T10:00:08.725Z backstage info Created UrlReader predicateMux{readers=azure{host=dev.azure.com,authed=false},bitbucket{host=bitbucket.org,authed=false},github{host=github.com,authed=false},gitlab{host=gitlab.com,authed=false},fetch{}
2021-01-21T10:00:08.857Z catalog info Locations Refresh: Beginning locations refresh type=plugin component=catalog-all-locations-refresh
2021-01-21T10:00:08.862Z scaffolder warn 'Specifying credentials for Azure in the Scaffolder configuration is deprecated. This will cause errors in a future release. Please migrate to using integrations config and specifying tokens under hostnames' type=plugin
2021-01-21T10:00:08.863Z scaffolder warn 'Specifying credentials for GitHub in the Scaffolder configuration is deprecated. This will cause errors in a future release. Please migrate to using integrations config and specifying tokens under hostnames' type=plugin
2021-01-21T10:00:08.863Z scaffolder warn 'Specifying credentials for Gitlab in the Scaffolder configuration is deprecated. This will cause errors in a future release. Please migrate to using integrations config and specifying tokens under hostnames' type=plugin
2021-01-21T10:00:08.867Z catalog info Locations Refresh: Visiting 1 locations type=plugin component=catalog-all-locations-refresh
2021-01-21T10:00:08.867Z catalog info Locations Refresh: Refreshing location bootstrap:bootstrap type=plugin component=catalog-all-locations-refresh
2021-01-21T10:00:08.875Z auth info Configuring provider, google type=plugin
2021-01-21T10:00:08.876Z auth warn Skipping google auth provider, Missing required config value at 'auth.providers.google.development.clientId' type=plugin
2021-01-21T10:00:08.876Z auth info Configuring provider, github type=plugin
2021-01-21T10:00:08.876Z auth warn Skipping github auth provider, Missing required config value at 'auth.providers.github.development.clientId' type=plugin
2021-01-21T10:00:08.876Z auth info Configuring provider, gitlab type=plugin
2021-01-21T10:00:08.876Z auth warn Skipping gitlab auth provider, Missing required config value at 'auth.providers.gitlab.development.clientId' type=plugin
2021-01-21T10:00:08.876Z auth info Configuring provider, saml type=plugin
2021-01-21T10:00:08.877Z auth info Configuring provider, okta type=plugin
2021-01-21T10:00:08.878Z auth warn Skipping okta auth provider, Missing required config value at 'auth.providers.okta.development.clientId' type=plugin
2021-01-21T10:00:08.878Z auth info Configuring provider, oauth2 type=plugin
2021-01-21T10:00:08.878Z auth warn Skipping oauth2 auth provider, Missing required config value at 'auth.providers.oauth2.development.clientId' type=plugin
2021-01-21T10:00:08.878Z auth info Configuring provider, oidc type=plugin
2021-01-21T10:00:08.878Z auth warn Skipping oidc auth provider, Missing required config value at 'auth.providers.oidc.development.clientId' type=plugin
2021-01-21T10:00:08.878Z auth info Configuring provider, auth0 type=plugin
2021-01-21T10:00:08.878Z auth warn Skipping auth0 auth provider, Missing required config value at 'auth.providers.auth0.development.clientId' type=plugin
2021-01-21T10:00:08.878Z auth info Configuring provider, microsoft type=plugin
2021-01-21T10:00:08.879Z auth warn Skipping microsoft auth provider, Missing required config value at 'auth.providers.microsoft.development.clientId' type=plugin
2021-01-21T10:00:08.879Z auth info Configuring provider, onelogin type=plugin
2021-01-21T10:00:08.879Z auth warn Skipping onelogin auth provider, Missing required config value at 'auth.providers.onelogin.development.clientId' type=plugin
2021-01-21T10:00:08.880Z techdocs info Creating Local publisher for TechDocs type=plugin
2021-01-21T10:00:08.881Z kubernetes info Initializing Kubernetes backend type=plugin
2021-01-21T10:00:08.882Z kafka info Initializing Kafka backend type=plugin
2021-01-21T10:00:08.885Z proxy info [HPM] Proxy created: [Function: filter] -> https://circleci.com/api/v1.1 type=plugin
2021-01-21T10:00:08.885Z proxy info [HPM] Proxy rewrite rule created: "^/api/proxy/circleci/api/" ~> "/" type=plugin
2021-01-21T10:00:08.887Z proxy info [HPM] Proxy created: [Function: filter] -> http://localhost:8080 type=plugin
2021-01-21T10:00:08.887Z proxy info [HPM] Proxy rewrite rule created: "^/api/proxy/jenkins/api/" ~> "/" type=plugin
2021-01-21T10:00:08.887Z proxy info [HPM] Proxy created: [Function: filter] -> https://api.travis-ci.com type=plugin
2021-01-21T10:00:08.887Z proxy info [HPM] Proxy rewrite rule created: "^/api/proxy/travisci/api/" ~> "/" type=plugin
2021-01-21T10:00:08.887Z proxy info [HPM] Proxy created: [Function: filter] -> https://api.newrelic.com/v2 type=plugin
2021-01-21T10:00:08.888Z proxy info [HPM] Proxy rewrite rule created: "^/api/proxy/newrelic/apm/api/" ~> "/" type=plugin
2021-01-21T10:00:08.888Z proxy info [HPM] Proxy created: [Function: filter] -> https://api.pagerduty.com type=plugin
2021-01-21T10:00:08.888Z proxy info [HPM] Proxy rewrite rule created: "^/api/proxy/pagerduty/" ~> "/" type=plugin
2021-01-21T10:00:08.888Z proxy info [HPM] Proxy created: [Function: filter] -> https://api.buildkite.com/v2/ type=plugin
2021-01-21T10:00:08.888Z proxy info [HPM] Proxy rewrite rule created: "^/api/proxy/buildkite/api/" ~> "/" type=plugin
2021-01-21T10:00:08.889Z proxy info [HPM] Proxy created: [Function: filter] -> https://sentry.io/api/ type=plugin
2021-01-21T10:00:08.889Z proxy info [HPM] Proxy rewrite rule created: "^/api/proxy/sentry/api/" ~> "/" type=plugin
2021-01-21T10:00:08.940Z app warn Can't serve static app content from /Users/himanshum/workspace/github.com/backstage/backstage/packages/app/dist/static, directory doesn't exist type=plugin
2021-01-21T10:00:08.941Z backstage info Initializing http server
2021-01-21T10:00:08.945Z backstage info Listening on :7000
2021-01-21T10:00:09.836Z catalog info Read 63 entities from location bootstrap:bootstrap in 969ms type=plugin
2021-01-21T10:00:09.929Z catalog info Wrote 63 entities from location bootstrap:bootstrap in 93ms type=plugin
2021-01-21T10:00:09.930Z catalog info Locations Refresh: Completed locations refresh in 1.1s type=plugin component=catalog-all-locations-refresh
My guess is a “setup for Azure” is being stuck in this case. Noticed it today, and it used to work yesterday I think.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Sending Azure token to API back-end keeps returning 401 ...
Type == "http://schemas.microsoft.com/identity/claims/objectidentifier")) { context.Fail($"The claim 'oid' is not present in the token.
Read more >How to change token expiration time in Azure portal - AAD
30 mins to 1 hr. Now when this token expires, I am not able to retrieve data from backend anymore, even though I...
Read more >This is probably not a problem with npm. There is likely ...
23 error Failed at the backend@1.0.0 start script. ... Run command => npm install It will set the node modules and acctivate it...
Read more >The MERN stack tutorial - LogRocket Blog
Learn all about the MERN stack in this step-by-step guide on how to use it by developing a simple CRUD application from scratch....
Read more >How to get create-react-app to work with a Node.js back-end API
The –kill-others-on-fail flag will kill other processes if one exits with a non zero status code. Install nodemon globally and the server ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Good find, thanks for looking into it so well. We’re working on a fix asap to get into the release
Sounds good, thanks! 😃