Title: TypeError: partialRoute.split is not a function when using array as path argument · Issue #5489 · getsentry/sentry-javascript · GitHub
Open Graph Title: TypeError: partialRoute.split is not a function when using array as path argument · Issue #5489 · getsentry/sentry-javascript
X Title: TypeError: partialRoute.split is not a function when using array as path argument · Issue #5489 · getsentry/sentry-javascript
Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using the latest SDK release https://github.com/...
Open Graph Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
X Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/5489
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"TypeError: partialRoute.split is not a function when using array as path argument","articleBody":"### Is there an existing issue for this?\r\n\r\n- [X] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues\r\n- [X] I have reviewed the documentation https://docs.sentry.io/\r\n- [X] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases\r\n\r\n### How do you use Sentry?\r\n\r\nSentry Saas (sentry.io)\r\n\r\n### Which package are you using?\r\n\r\n@sentry/tracing\r\n\r\n### SDK Version\r\n\r\n7.8.0\r\n\r\n### Framework Version\r\n\r\nexpress 4.18.1, node 18.7.0\r\n\r\n### Link to Sentry event\r\n\r\nhttps://sentry.io/organizations/eatwith/issues/3461507981/\r\n\r\n### Steps to Reproduce\r\n\r\n1. use sentry tracing express integration\r\n2. have a route declared with an array as path parameter `route.get(['path', 'other_path', /regex_path/], (req, res, next) => {...`\r\n3. try to access the route\r\n\r\nAs discussed in #5481 with @Lms24, in express [arrays are also valids](https://expressjs.com/en/4x/api.html#path-examples) path parameters.\r\n#5483 only fix the issue when using RegExp as path parameter.\r\n\r\n### Expected Result\r\n\r\nThe route handler should execute its actual logic\r\n\r\n### Actual Result\r\n\r\nSentry tracing express integration does crash\r\n\r\n```\r\nTypeError: partialRoute.split is not a function\r\n File \"/app/node_modules/@sentry/tracing/cjs/integrations/node/express.js\", line 220, col 8, in Function.process_params\r\n .split('/')\r\n File \"/app/node_modules/express/lib/router/index.js\", line 280, col 10, in next\r\n self.process_params(layer, paramcalled, req, res, function (err) {\r\n File \"/app/node_modules/express/lib/router/index.js\", line 175, col 3, in Function.handle\r\n next();\r\n File \"/app/node_modules/express/lib/router/index.js\", line 47, col 12, in router\r\n router.handle(req, res, next);\r\n File \"/app/node_modules/express/lib/router/layer.js\", line 95, col 5, in Layer.handle [as handle_request]\r\n fn(req, res, next);\r\n File \"/app/node_modules/express/lib/router/index.js\", line 328, col 13, in trim_prefix\r\n layer.handle_request(req, res, next);\r\n File \"/app/node_modules/express/lib/router/index.js\", line 286, col 9, in \u003canonymous>\r\n trim_prefix(layer, layerError, layerPath, path)\r\n File \"/app/node_modules/express/lib/router/index.js\", line 346, col 12, in Function.process_params\r\n return done();\r\n File \"/app/node_modules/@sentry/tracing/cjs/integrations/node/express.js\", line 245, col 34, in Function.process_params\r\n return originalProcessParams.call(this, layer, called, req, res, done);\r\n File \"/app/node_modules/express/lib/router/index.js\", line 280, col 10, in next\r\n self.process_params(layer, paramcalled, req, res, function (err) {\r\n File \"/app/node_modules/express/lib/router/index.js\", line 646, col 15, in \u003canonymous>\r\n return fn.apply(this, arguments);\r\n File \"/app/node_modules/express/lib/router/index.js\", line 265, col 14, in next\r\n return done(layerError);\r\n File \"/app/node_modules/express/lib/router/index.js\", line 175, col 3, in Function.handle\r\n next();\r\n File \"/app/node_modules/express/lib/router/index.js\", line 47, col 12, in router\r\n router.handle(req, res, next);\r\n File \"/app/node_modules/express/lib/router/layer.js\", line 95, col 5, in Layer.handle [as handle_request]\r\n fn(req, res, next);\r\n File \"/app/node_modules/express/lib/router/index.js\", line 328, col 13, in trim_prefix\r\n layer.handle_request(req, res, next);\r\n File \"/app/node_modules/express/lib/router/index.js\", line 286, col 9, in \u003canonymous>\r\n trim_prefix(layer, layerError, layerPath, path)\r\n File \"/app/node_modules/express/lib/router/index.js\", line 346, col 12, in Function.process_params\r\n return done();\r\n File \"/app/node_modules/@sentry/tracing/cjs/integrations/node/express.js\", line 245, col 34, in Function.process_params\r\n return originalProcessParams.call(this, layer, called, req, res, done);\r\n File \"/app/node_modules/express/lib/router/index.js\", line 280, col 10, in next\r\n self.process_params(layer, paramcalled, req, res, function (err) {\r\n File \"/app/node_modules/express/lib/router/index.js\", line 646, col 15, in \u003canonymous>\r\n return fn.apply(this, arguments);\r\n File \"/app/node_modules/express/lib/router/index.js\", line 265, col 14, in next\r\n return done(layerError);\r\n File \"/app/node_modules/express/lib/router/index.js\", line 175, col 3, in Function.handle\r\n next();\r\n File \"/app/node_modules/express/lib/router/index.js\", line 47, col 12, in router\r\n router.handle(req, res, next);\r\n File \"/app/node_modules/express/lib/router/layer.js\", line 95, col 5, in Layer.handle [as handle_request]\r\n fn(req, res, next);\r\n File \"/app/node_modules/express/lib/router/index.js\", line 328, col 13, in trim_prefix\r\n layer.handle_request(req, res, next);\r\n File \"/app/node_modules/express/lib/router/index.js\", line 286, col 9, in \u003canonymous>\r\n trim_prefix(layer, layerError, layerPath, path)\r\n File \"/app/node_modules/express/lib/router/index.js\", line 346, col 12, in Function.process_params\r\n return done();\r\n ```","author":{"url":"https://github.com/albanv","@type":"Person","name":"albanv"},"datePublished":"2022-07-28T16:41:30Z","url":"https://github.com/getsentry/sentry-javascript/issues/5489"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7433473d-b6ca-980f-e65d-6664635492fb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BC44:E4EF6:782699:A3DB29:6B0446E6 |
| html-safe-nonce | ab4027fc71a96bf3aea933171b3b69816c9b4e4a8a01293f0ace6aa4ab749847 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzQ0OkU0RUY2Ojc4MjY5OTpBM0RCMjk6NkIwNDQ2RTYiLCJ2aXNpdG9yX2lkIjoiNDQzODIzODk4ODY1NDEwMjI0NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f6710578c50ba59026afc0212976a5fe1671c2964e34e478eff694441eb05d69 |
| hovercard-subject-tag | issue:1321208385 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/5489/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6366f1c1a4db97650a4240d51edcd892649e649cbdffa7e5c33953bc1c506a5d/getsentry/sentry-javascript/issues/5489 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6366f1c1a4db97650a4240d51edcd892649e649cbdffa7e5c33953bc1c506a5d/getsentry/sentry-javascript/issues/5489 |
| og:image:alt | Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | albanv |
| hostname | github.com |
| expected-hostname | github.com |
| None | d4495c3631faba668036f176d1f5946901c5172efd73a6edb984029e7d4f8e46 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9ac4337fb7c6a5846cdfdb1a04f154d3c33ebc77 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width