René's URL Explorer Experiment


Title: router: `The ActivatedRoute has an invalid structure` warning improvements · Issue #49116 · angular/angular · GitHub

Open Graph Title: router: `The ActivatedRoute has an invalid structure` warning improvements · Issue #49116 · angular/angular

X Title: router: `The ActivatedRoute has an invalid structure` warning improvements · Issue #49116 · angular/angular

Description: Which @angular/* package(s) are the source of the bug? router Is this a regression? No Description #47988 introduced a warning in dev when the ActivatedRoute has an invalid structure This ends up generating quite a lot of noise when upda...

Open Graph Description: Which @angular/* package(s) are the source of the bug? router Is this a regression? No Description #47988 introduced a warning in dev when the ActivatedRoute has an invalid structure This ends up g...

X Description: Which @angular/* package(s) are the source of the bug? router Is this a regression? No Description #47988 introduced a warning in dev when the ActivatedRoute has an invalid structure This ends up g...

Opengraph URL: https://github.com/angular/angular/issues/49116

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"router: `The ActivatedRoute has an invalid structure` warning improvements","articleBody":"### Which @angular/* package(s) are the source of the bug?\n\nrouter\n\n### Is this a regression?\n\nNo\n\n### Description\n\n#47988 introduced a warning in dev when the ActivatedRoute has an invalid structure\r\n\r\nThis ends up generating quite a lot of noise when updating existing tests as the warning is outputted several times per test.\r\n\r\nFor example, consider this small repro https://stackblitz.com/edit/node-1bky4j?file=repro/src/app/home/home.component.spec.ts (run `ng test`)\r\n\r\nThe template has just a `routerLink`, and the test provides a \"fake\" ActivatedRoute (usually with params, but the point is that it's partial and thus incomplete).\r\n\r\nThis ends up generating:\r\n\r\n```\r\n✔ Browser application bundle generation complete.\r\nWARN: 'The ActivatedRoute has an invalid structure. This is likely due to an incomplete mock in tests.'\r\nFirefox 109.0 (Mac OS 10.15): Executed 2 of 5 SUCCESS (0 secs / 0.03 secs)\r\nWARN: 'The ActivatedRoute has an invalid structure. This is likely due to an incomplete mock in \r\nWARN: 'The ActivatedRoute has an invalid structure. This is likely due to an incomplete mock in tests.'\r\nFirefox 109.0 (Mac OS 10.15): Executed 2 of 5 SUCCESS (0 secs / 0.03 secs)\r\nWARN: 'The ActivatedRoute has an invalid structure. This is likely due to an incomplete mock in \r\nWARN: 'The ActivatedRoute has an invalid structure. This is likely due to an incomplete mock in tests.'\r\nFirefox 109.0 (Mac OS 10.15): Executed 3 of 5 SUCCESS (0 secs / 0.045 secs)\r\nWARN: 'The ActivatedRoute has an invalid structure. This is likely due to an incomplete mock in \r\nWARN: 'The ActivatedRoute has an invalid structure. This is likely due to an incomplete mock in tests.'\r\nFirefox 109.0 (Mac OS 10.15): Executed 3 of 5 SUCCESS (0 secs / 0.045 secs)\r\nWARN: 'The ActivatedRoute has an invalid structure. This is likely due to an incomplete mock in \r\nWARN: 'The ActivatedRoute has an invalid structure. This is likely due to an incomplete mock in tests.'\r\nFirefox 109.0 (Mac OS 10.15): Executed 4 of 5 SUCCESS (0 secs / 0.05 secs)\r\nWARN: 'The ActivatedRoute has an invalid structure. This is likely due to an incomplete mock in \r\nWARN: 'The ActivatedRoute has an invalid structure. This is likely due to an incomplete mock in tests.'\r\nFirefox 109.0 (Mac OS 10.15): Executed 4 of 5 SUCCESS (0 secs / 0.05 secs)\r\nWARN: 'The ActivatedRoute has an invalid structure. This is likely due to an incomplete mock in \r\nFirefox 109.0 (Mac OS 10.15): Executed 5 of 5 SUCCESS (0.086 secs / 0.054 secs)\r\n```\r\n\r\nA few questions:\r\n- is the warning really necessary in that case? It's hard to understand (from the warning alone, and even after looking at #47988) in what way this is an issue\r\n- if the warning is necessary and something needs to be fixed for an upcoming change, maybe the warning could include a bit more information on how to do so? I suppose that most developers that are going to run into it will ask the same question. I'll gladly submit a PR to improve it if I get some guidance on what would need to be changed\r\n- if the warning is necessary, could it be displayed less often? because it is outputted dozens of times on some applications where I tested the RC\n\n### Please provide a link to a minimal reproduction of the bug\n\nhttps://stackblitz.com/edit/node-1bky4j?file=repro/src/app\n\n### Please provide the exception or error you saw\n\n_No response_\n\n### Please provide the environment you discovered this bug in (run `ng version`)\n\n```true\nAngular CLI: 15.2.0-rc.0\r\nNode: 16.17.0\r\nPackage Manager: yarn 1.22.17\r\nOS: darwin arm64\r\n\r\nAngular: 15.2.0-rc.0\r\n... animations, cli, common, compiler, compiler-cli, core, forms\r\n... localize, platform-browser, platform-browser-dynamic, router\r\n\r\nPackage                         Version\r\n---------------------------------------------------------\r\n@angular-devkit/architect       0.1502.0-rc.0\r\n@angular-devkit/build-angular   15.2.0-rc.0\r\n@angular-devkit/core            15.2.0-rc.0\r\n@angular-devkit/schematics      15.2.0-rc.0\r\n@angular/cdk                    15.1.4\r\n@schematics/angular             15.2.0-rc.0\r\nrxjs                            7.8.0\r\ntypescript                      4.8.4\n```\n\n\n### Anything else?\n\n_No response_","author":{"url":"https://github.com/cexbrayat","@type":"Person","name":"cexbrayat"},"datePublished":"2023-02-16T17:21:48Z","url":"https://github.com/angular/angular/issues/49116"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:1975d5e4-a591-dcfc-a04a-0de849fb66b4
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCEBC:DB09F:B92B37:ED79AE:6B00FCE3
html-safe-nonce95b52675f8573ae3e7af324dde1ee8330565a210bdf184023424ed27ee4b2a07
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRUJDOkRCMDlGOkI5MkIzNzpFRDc5QUU6NkIwMEZDRTMiLCJ2aXNpdG9yX2lkIjoiMTE1MTc4NjE0NDY4MjI3ODExNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacce6ab52024f0459faa3df65ca9d9b0cde5d28d5bdfbdc1be5d61e7a9d10c5db6
hovercard-subject-tagissue:1588083283
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/49116/issue_layout
twitter:imagehttps://opengraph.githubassets.com/c753d01b9bfc5fbac59a18d130b6a552c335cb953132d1804c98f24db9b2df49/angular/angular/issues/49116
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/c753d01b9bfc5fbac59a18d130b6a552c335cb953132d1804c98f24db9b2df49/angular/angular/issues/49116
og:image:altWhich @angular/* package(s) are the source of the bug? router Is this a regression? No Description #47988 introduced a warning in dev when the ActivatedRoute has an invalid structure This ends up g...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamecexbrayat
hostnamegithub.com
expected-hostnamegithub.com
Nonee208d86428ec00a57ade75058166297440e8128a01e5287c31a53dc042bbf187
turbo-cache-controlno-preview
go-importgithub.com/angular/angular git https://github.com/angular/angular.git
octolytics-dimension-user_id139426
octolytics-dimension-user_loginangular
octolytics-dimension-repository_id24195339
octolytics-dimension-repository_nwoangular/angular
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id24195339
octolytics-dimension-repository_network_root_nwoangular/angular
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7dafd017fb7809a839c443dba08622af38e63c09
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/angular/angular/issues/49116#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fissues%2F49116
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fissues%2F49116
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=angular%2Fangular
Reloadhttps://github.com/angular/angular/issues/49116
Reloadhttps://github.com/angular/angular/issues/49116
Reloadhttps://github.com/angular/angular/issues/49116
angularhttps://github.com/angular
angularhttps://github.com/angular/angular
Codehttps://github.com/angular/angular
Issues835 (835)https://github.com/angular/angular/issues
Pull requests141 (141)https://github.com/angular/angular/pulls
Discussionshttps://github.com/angular/angular/discussions
Actionshttps://github.com/angular/angular/actions
Projectshttps://github.com/angular/angular/projects
Security and quality40 (40)https://github.com/angular/angular/security
Insightshttps://github.com/angular/angular/insights
https://github.com/angular/angular
New issuehttps://github.com/login?return_to=https://github.com/angular/angular/issues/49116
New issuehttps://github.com/login?return_to=https://github.com/angular/angular/issues/49116
router: The ActivatedRoute has an invalid structure warning improvementshttps://github.com/angular/angular/issues/49116#top
https://github.com/cexbrayat
cexbrayathttps://github.com/cexbrayat
on Feb 16, 2023https://github.com/angular/angular/issues/49116#issue-1588083283
#47988https://github.com/angular/angular/pull/47988
https://stackblitz.com/edit/node-1bky4j?file=repro/src/app/home/home.component.spec.tshttps://stackblitz.com/edit/node-1bky4j?file=repro/src/app/home/home.component.spec.ts
refactor(router): Add opt-in provider for upcoming router change  #47988https://github.com/angular/angular/pull/47988
https://stackblitz.com/edit/node-1bky4j?file=repro/src/apphttps://stackblitz.com/edit/node-1bky4j?file=repro/src/app
https://github.com/atscott
atscotthttps://github.com/atscott
on Feb 16, 2023https://github.com/angular/angular/issues/49116#issuecomment-1433747617
this onehttps://github.com/angular/angular/pull/48688
atscotthttps://github.com/atscott
on Feb 16, 2023https://github.com/angular/angular/issues/49116#event-8541456340
refactor(router): Remove warning for an invalid ActivatedRoutehttps://github.com/atscott/angular/commit/ed2c34bf83315bab403ba32cd119e1bc28bfb5c0
https://docs.github.com/articles/closing-issues-via-commit-messages
ed2c34bhttps://github.com/atscott/angular/commit/ed2c34bf83315bab403ba32cd119e1bc28bfb5c0
alxhubhttps://github.com/alxhub
on Feb 16, 2023https://github.com/angular/angular/issues/49116#event-8542232397
refactor(router): Remove warning for an invalid ActivatedRoute (#49117)https://github.com/angular/angular/commit/e63fb8031a53acaff8c6ca7def626ca503b5dcf7
#49117https://github.com/angular/angular/pull/49117
https://docs.github.com/articles/closing-issues-via-commit-messages
e63fb80https://github.com/angular/angular/commit/e63fb8031a53acaff8c6ca7def626ca503b5dcf7
alxhubhttps://github.com/alxhub
completedhttps://github.com/angular/angular/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
bf7de25https://github.com/angular/angular/commit/bf7de25e8a9efd427192c7869c1d820382e473e4
on Feb 16, 2023https://github.com/angular/angular/issues/49116#event-8542232580
https://github.com/apps/angular-automatic-lock-bot
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Mar 19, 2023https://github.com/angular/angular/issues/49116#issuecomment-1475305452
automatic conversation locking policyhttps://github.com/angular/angular/blob/8f24bc9443b3872fe095d9f7f77b308a361a13b4/docs/GITHUB_PROCESS.md#conversation-locking
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Mar 19, 2023https://github.com/angular/angular/issues/49116#event-8788125373
Sign up for freehttps://github.com/signup?return_to=https://github.com/angular/angular/issues/49116
Sign in to commenthttps://github.com/login?return_to=https://github.com/angular/angular/issues/49116
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.