Cannot read properties of undefined (reading 'allowedTenants')
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- azure, typescript
- Domain
- authentication, frontend
Research direction
Start in signinSocialViewModelBinder.ts, where the issue identifies the allowedTenants access, and reproduce the failure with npm run publish using the self-hosted portal instructions. Trace the Sign in page rendering path and verify the publishing command completes without the TypeError and populates dist/website with the portal content.
Written by the indexing model from the issue text.
Description
[!IMPORTANT]
PLEASE DO NOT CREATE ISSUES RELATED TO MANAGED DEVELOPER PORTAL IN THIS REPOSITORY. Issues related to "Managed developer portal" will be closed automatically. Managed developer portal issues should be created directly in Azure Support + Troubleshooting in Azure portal. Contact Azure support (or) submit a post on Stack Overflow. Feature requests can be raised on the Azure Feedback Forum.
Every self-hosted developer bug report should have precise description and reproduction steps; console traces (or) source code references are appreciated.
Bug description
Issue with publishing the selfhsoted website
Reproduction steps
- Simply follow the document https://learn.microsoft.com/en-us/azure/api-management/developer-portal-self-host
- Run npm run publish to publish the website locally
- See error below
Error: Unable to complete publishing. Error: Unable to complete pages publishing. Error: Unable to publish page "Sign in": Error: Unable to render page "Sign in - Microsoft Azure API Management - developer portal": Error: Unable to render page: TypeError: Cannot read properties of undefined (reading 'allowedTenants') - Content not published correctly under dist/website folder.
Expected behavior
Run npm run should be able to Publish the portal locally and the content is published to the dist/website folder.
Is self-hosted portal?
Yes
[!WARNING]
"Managed developer portal issues" will be closed automatically. See above for more details.
Release tag or commit SHA (if using self-hosted version)
Release 2.34
API Management service name
apim-one-shailesh
Environment
- Operating system: [e.g., iOS]
- Browser: [e.g., Google Chrome, Safari]
- Version: [e.g., 22]
Additional context
Issue seems with allowedTenants variable under signinSocialViewModelBinder.ts file
Fix add the null check here > const tenants = aadIdentityProvider?.allowedTenants || [];
- Dominant language
- TypeScript
- Stars
- 545
- Forks
- 359
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Azure/api-management-developer-portal
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Azure/api-management-developer-portal#2899 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
All issues in Azure/api-management-developer-portal
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100