René's URL Explorer Experiment


Title: Maximum call stack size exceeded on nested Routes in react-router-dom v6 · Issue #14877 · getsentry/sentry-javascript · GitHub

Open Graph Title: Maximum call stack size exceeded on nested Routes in react-router-dom v6 · Issue #14877 · getsentry/sentry-javascript

X Title: Maximum call stack size exceeded on nested Routes in react-router-dom v6 · Issue #14877 · getsentry/sentry-javascript

Description: Environment self-hosted (https://develop.sentry.dev/self-hosted/) Steps to Reproduce "react": "18.3.1" "react-dom": "18.3.1" "react-router-dom": "^6.26.1" "@sentry/react": "8.47.0" After upgrading to @sentry/react version 8.47.0 to have ...

Open Graph Description: Environment self-hosted (https://develop.sentry.dev/self-hosted/) Steps to Reproduce "react": "18.3.1" "react-dom": "18.3.1" "react-router-dom": "^6.26.1" "@sentry/react": "8.47.0" After upgrading ...

X Description: Environment self-hosted (https://develop.sentry.dev/self-hosted/) Steps to Reproduce "react": "18.3.1" "react-dom": "18.3.1" "react-router-dom": &q...

Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/14877

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Maximum call stack size exceeded on nested Routes in react-router-dom v6","articleBody":"### Environment\n\nself-hosted (https://develop.sentry.dev/self-hosted/)\n\n### Steps to Reproduce\n\n```\n\"react\": \"18.3.1\"\n\"react-dom\": \"18.3.1\"\n\"react-router-dom\": \"^6.26.1\"\n\"@sentry/react\": \"8.47.0\"\n```\n\nAfter upgrading to `@sentry/react` version `8.47.0` to have [React Router Descendant Routes support](https://github.com/getsentry/sentry-javascript/pull/14304/files), we encountered a problem with `Uncaught RangeError: Maximum call stack size exceeded` being thrown on some Routes.\n\n```\nUncaught RangeError: Maximum call stack size exceeded\n    at eval (reactrouterv6-compat-utils.js:314:17)\n    at Array.forEach (\u003canonymous>)\n    at getChildRoutesRecursively (reactrouterv6-compat-utils.js:313:20)\n    at eval (reactrouterv6-compat-utils.js:314:25)\n    at Array.forEach (\u003canonymous>)\n    at getChildRoutesRecursively (reactrouterv6-compat-utils.js:313:20)\n    at eval (reactrouterv6-compat-utils.js:495:31)\n    at Array.forEach (\u003canonymous>)\n    at eval (reactrouterv6-compat-utils.js:494:18)\n    at commitHookEffectListMount (react-dom.development.js:23184:26)\n    at commitPassiveMountOnFiber (react-dom.development.js:24960:13)\n    at commitPassiveMountEffects_complete (react-dom.development.js:24925:9)\n    at commitPassiveMountEffects_begin (react-dom.development.js:24912:7)\n    at commitPassiveMountEffects (react-dom.development.js:24900:3)\n    at flushPassiveEffectsImpl (react-dom.development.js:27073:3)\n    at flushPassiveEffects (react-dom.development.js:27018:14)\n    at performSyncWorkOnRoot (react-dom.development.js:26110:3)\n    at flushSyncCallbacks (react-dom.development.js:12042:22)\n    at commitRootImpl (react-dom.development.js:26993:3)\n    at commitRoot (react-dom.development.js:26716:5)\n    at finishConcurrentRender (react-dom.development.js:26015:9)\n    at performConcurrentWorkOnRoot (react-dom.development.js:25843:7)\n    at workLoop (scheduler.development.js:266:34)\n    at flushWork (scheduler.development.js:239:14)\n    at MessagePort.performWorkUntilDeadline (scheduler.development.js:533:21)Caused by: React ErrorBoundary RangeError: Maximum call stack size exceeded\n    at SentryRoutes (webpack-internal:///../node_modules/@sentry/react/build/esm/reactrouterv6-compat-utils.js:484:66)\n    at BotsRouter (webpack-internal:///./panel/views/bots/BotsRouter.tsx:44:115)\n    at RenderedRoute (webpack-internal:///../node_modules/react-router/dist/index.js:578:5)\n    at Routes (webpack-internal:///../node_modules/react-router/dist/index.js:1279:5)\n    at SentryRoutes (webpack-internal:///../node_modules/@sentry/react/build/esm/reactrouterv6-compat-utils.js:484:66)\n    at App (webpack-internal:///./panel/views/app/App.tsx:137:82)\n    at ErrorBoundary (webpack-internal:///../node_modules/@sentry/react/build/esm/errorboundary.js:38:5)\n    at RootErrorBoundary (webpack-internal:///./panel/views/RootErrorBoundary.tsx:28:19)\n    at Root (webpack-internal:///./panel/views/Root.tsx:90:86)\n    at RenderedRoute (webpack-internal:///../node_modules/react-router/dist/index.js:578:5)\n    at RenderErrorBoundary (webpack-internal:///../node_modules/react-router/dist/index.js:525:5)\n    at DataRoutes (webpack-internal:///../node_modules/react-router-dom/dist/index.js:692:5)\n    at Router (webpack-internal:///../node_modules/react-router/dist/index.js:1213:15)\n    at RouterProvider (webpack-internal:///../node_modules/react-router-dom/dist/index.js:476:5)\n```\n\n```\nThe above error occurred in the \u003cSentryRoutes> component:\n\n    at SentryRoutes (webpack-internal:///../node_modules/@sentry/react/build/esm/reactrouterv6-compat-utils.js:484:66)\n    at BotsRouter (webpack-internal:///./panel/views/bots/BotsRouter.tsx:44:115)\n    at RenderedRoute (webpack-internal:///../node_modules/react-router/dist/index.js:578:5)\n    at Routes (webpack-internal:///../node_modules/react-router/dist/index.js:1279:5)\n    at SentryRoutes (webpack-internal:///../node_modules/@sentry/react/build/esm/reactrouterv6-compat-utils.js:484:66)\n    at App (webpack-internal:///./panel/views/app/App.tsx:137:82)\n    at ErrorBoundary (webpack-internal:///../node_modules/@sentry/react/build/esm/errorboundary.js:38:5)\n    at RootErrorBoundary (webpack-internal:///./panel/views/RootErrorBoundary.tsx:28:19)\n    at Root (webpack-internal:///./panel/views/Root.tsx:90:86)\n    at RenderedRoute (webpack-internal:///../node_modules/react-router/dist/index.js:578:5)\n    at RenderErrorBoundary (webpack-internal:///../node_modules/react-router/dist/index.js:525:5)\n    at DataRoutes (webpack-internal:///../node_modules/react-router-dom/dist/index.js:692:5)\n    at Router (webpack-internal:///../node_modules/react-router/dist/index.js:1213:15)\n    at RouterProvider (webpack-internal:///../node_modules/react-router-dom/dist/index.js:476:5)\n\nReact will try to recreate this component tree from scratch using the error boundary you provided, ErrorBoundary.\n```\n\nWe use the pattern described [here](https://www.robinwieruch.de/react-router-private-routes/ ) (`\u003cOutlet />`) and `\u003cNavigate />` to do redirects on deprecated routes:\n\n```\n\u003cSentryRoutes>\n  \u003cRoute>\n    // Nested Route:\n    \u003cSentryRoutes>\n      \u003cRoute element={\u003cPrivateRoute />}>\n        \u003cRoute path=\"create/:draftId\" element={\u003cCreator />} />\n        \u003cRoute path=\"old-create/:draftId\" element={\u003cNavigate to=\"... />} />\n        \u003cRoute path=\"*\" element={\u003cNavigate to={...} />\n```\n\n```\nfunction PrivateRoute() {\n    if (!hasAccess) {\n        return \u003cNavigate to=\"/\" />;\n    }\n    if (isLoading) {\n        return \u003cLoader />;\n    }\n    return \u003cOutlet />;\n};\n```\n\nIt looks like, for some reason `getChildRoutesRecursively` recursion makes the stack size exceed.\n\n### Expected Result\n\nShould be working.\n\n### Actual Result\n\nThrows an `Uncaught RangeError: Maximum call stack size exceeded`.\n\n### Product Area\n\nUnknown\n\n### Link\n\n_No response_\n\n### DSN\n\n_No response_\n\n### Version\n\n_No response_","author":{"url":"https://github.com/Bartozzz","@type":"Person","name":"Bartozzz"},"datePublished":"2024-12-19T13:57:49Z","url":"https://github.com/getsentry/sentry-javascript/issues/14877"}

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:abc2b962-8bcf-5924-d67a-114cd9b637ca
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE16A:2F9258:1F9EB71:294F154:6B040CAB
html-safe-nonce68a5ae9889b312de543db94a6922f991c8bf60b5fc2b050bf208440912e6bcdc
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMTZBOjJGOTI1ODoxRjlFQjcxOjI5NEYxNTQ6NkIwNDBDQUIiLCJ2aXNpdG9yX2lkIjoiODAyNzY1NTQyNDA3MTQzNzQ4MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac98aab117fac0932baad36366d03899a30410abf777dde5a96a0ecf0587218fe7
hovercard-subject-tagissue:2763841542
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/getsentry/sentry-javascript/14877/issue_layout
twitter:imagehttps://opengraph.githubassets.com/5c3c21fc6699a9c29ab39e5fbae60b7793f8c5d77c935eb83366e12ffa649e43/getsentry/sentry-javascript/issues/14877
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/5c3c21fc6699a9c29ab39e5fbae60b7793f8c5d77c935eb83366e12ffa649e43/getsentry/sentry-javascript/issues/14877
og:image:altEnvironment self-hosted (https://develop.sentry.dev/self-hosted/) Steps to Reproduce "react": "18.3.1" "react-dom": "18.3.1" "react-router-dom": "^6.26.1" "@sentry/react": "8.47.0" After upgrading ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameBartozzz
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
go-importgithub.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git
octolytics-dimension-user_id1396951
octolytics-dimension-user_logingetsentry
octolytics-dimension-repository_id3328572
octolytics-dimension-repository_nwogetsentry/sentry-javascript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id3328572
octolytics-dimension-repository_network_root_nwogetsentry/sentry-javascript
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
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/getsentry/sentry-javascript/issues/14877#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F14877
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%2Fgetsentry%2Fsentry-javascript%2Fissues%2F14877
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=getsentry%2Fsentry-javascript
Reloadhttps://github.com/getsentry/sentry-javascript/issues/14877
Reloadhttps://github.com/getsentry/sentry-javascript/issues/14877
Reloadhttps://github.com/getsentry/sentry-javascript/issues/14877
getsentryhttps://github.com/getsentry
sentry-javascripthttps://github.com/getsentry/sentry-javascript
Codehttps://github.com/getsentry/sentry-javascript
Issues342 (342)https://github.com/getsentry/sentry-javascript/issues
Pull requests59 (59)https://github.com/getsentry/sentry-javascript/pulls
Discussionshttps://github.com/getsentry/sentry-javascript/discussions
Actionshttps://github.com/getsentry/sentry-javascript/actions
Security and quality7 (7)https://github.com/getsentry/sentry-javascript/security
Insightshttps://github.com/getsentry/sentry-javascript/insights
https://github.com/getsentry/sentry-javascript
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/14877
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/14877
#14878https://github.com/getsentry/sentry-javascript/pull/14878
Maximum call stack size exceeded on nested Routes in react-router-dom v6https://github.com/getsentry/sentry-javascript/issues/14877#top
#14878https://github.com/getsentry/sentry-javascript/pull/14878
https://github.com/Bartozzz
Bartozzzhttps://github.com/Bartozzz
on Dec 19, 2024https://github.com/getsentry/sentry-javascript/issues/14877#issue-2763841542
https://develop.sentry.dev/self-hosted/https://develop.sentry.dev/self-hosted/
React Router Descendant Routes supporthttps://github.com/getsentry/sentry-javascript/pull/14304/files
herehttps://www.robinwieruch.de/react-router-private-routes/
https://github.com/apps/getsantry
getsantryhttps://github.com/apps/getsantry
on Dec 19, 2024https://github.com/getsentry/sentry-javascript/issues/14877#issuecomment-2566045279
routinghttps://open.sentry.io/triage/#2-route
https://github.com/Bartozzz
Bartozzzhttps://github.com/Bartozzz
on Dec 19, 2024https://github.com/getsentry/sentry-javascript/issues/14877#issuecomment-2566045280
[react-router-6] Nested Routers produce wrong parametrized URL #5997https://github.com/getsentry/sentry-javascript/issues/5997
fix(react): Add React Router Descendant Routes support. #14304https://github.com/getsentry/sentry-javascript/pull/14304
InterstellarStellahttps://github.com/InterstellarStella
getsentry/sentryhttps://github.com/getsentry/sentry
on Dec 20, 2024https://github.com/getsentry/sentry-javascript/issues/14877#event-15787746905
getsantryhttps://github.com/apps/getsantry
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
on Dec 20, 2024https://github.com/getsentry/sentry-javascript/issues/14877#event-15787746907
https://github.com/aldy505
aldy505https://github.com/aldy505
on Dec 20, 2024https://github.com/getsentry/sentry-javascript/issues/14877#issuecomment-2566045283
@lforsthttps://github.com/lforst
@AbhiPrasadhttps://github.com/AbhiPrasad
getsantryhttps://github.com/apps/getsantry
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
on Dec 20, 2024https://github.com/getsentry/sentry-javascript/issues/14877#event-15787746916
https://github.com/onurtemizkan
onurtemizkanhttps://github.com/onurtemizkan
on Dec 23, 2024https://github.com/getsentry/sentry-javascript/issues/14877#issuecomment-2566045285
@Bartozzzhttps://github.com/Bartozzz
getsantryhttps://github.com/apps/getsantry
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
on Dec 23, 2024https://github.com/getsentry/sentry-javascript/issues/14877#event-15787746924
getsantryhttps://github.com/apps/getsantry
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
on Dec 31, 2024https://github.com/getsentry/sentry-javascript/issues/14877#event-15787746931
bc-sentryhttps://github.com/bc-sentry
getsentry/self-hostedhttps://github.com/getsentry/self-hosted
on Dec 31, 2024https://github.com/getsentry/sentry-javascript/issues/14877#event-15787746968
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Dec 31, 2024https://github.com/getsentry/sentry-javascript/issues/14877
s1gr1dhttps://github.com/s1gr1d
Waiting for: Communityhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Community%22
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
on Jan 2, 2025https://github.com/getsentry/sentry-javascript/issues/14877#event-15796540282
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Jan 2, 2025https://github.com/getsentry/sentry-javascript/issues/14877
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Jan 2, 2025https://github.com/getsentry/sentry-javascript/issues/14877
chargomehttps://github.com/chargome
completedhttps://github.com/getsentry/sentry-javascript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#14878https://github.com/getsentry/sentry-javascript/pull/14878
on Jan 2, 2025https://github.com/getsentry/sentry-javascript/issues/14877#event-15798060269
getsantryhttps://github.com/apps/getsantry
Waiting for: Communityhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Community%22
on Jan 2, 2025https://github.com/getsentry/sentry-javascript/issues/14877#event-15798060458
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Jan 7, 2025https://github.com/getsentry/sentry-javascript/issues/14877#issuecomment-2575152747
GitHub Actionshttps://help.github.com/en/actions
#14878https://github.com/getsentry/sentry-javascript/pull/14878
8.48.0 releasehttps://github.com/getsentry/sentry-javascript/releases/tag/8.48.0
Sign up for freehttps://github.com/signup?return_to=https://github.com/getsentry/sentry-javascript/issues/14877
Sign in to commenthttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/14877
Self-hosted Sentryhttps://github.com/orgs/getsentry/projects/109
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
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

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.