Title: Sentry.startTransaction fails in Node 18.12.1 + TS · Issue #8091 · getsentry/sentry-javascript · GitHub
Open Graph Title: Sentry.startTransaction fails in Node 18.12.1 + TS · Issue #8091 · getsentry/sentry-javascript
X Title: Sentry.startTransaction fails in Node 18.12.1 + TS · Issue #8091 · 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/8091
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Sentry.startTransaction fails in Node 18.12.1 + TS","articleBody":"### Is there an existing issue for this?\n\n- [X] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues\n- [X] I have reviewed the documentation https://docs.sentry.io/\n- [X] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases\n\n### How do you use Sentry?\n\nSentry Saas (sentry.io)\n\n### Which SDK are you using?\n\n@sentry/node\n\n### SDK Version\n\n7.51.2\n\n### Framework Version\n\n_No response_\n\n### Link to Sentry event\n\n_No response_\n\n### SDK Setup\n\n```ts\r\nSentry.init({\r\n\tdsn: __MY_DSN__,\r\n\ttracesSampleRate: 1.0,\r\n});\r\n```\n\n### Steps to Reproduce\n\n1. Create a project using TS 5.0.4\r\n2. Use a tsconfig.json like this\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"outDir\": \"lib\",\r\n \"allowJs\": true,\r\n \"alwaysStrict\": true,\r\n \"declaration\": true,\r\n \"experimentalDecorators\": true,\r\n \"sourceMap\": true,\r\n \"inlineSources\": true,\r\n \"sourceRoot\": \"/\",\r\n \"lib\": [\"es2022\"],\r\n \"module\": \"CommonJS\",\r\n \"noEmitOnError\": false,\r\n \"noFallthroughCasesInSwitch\": true,\r\n \"noImplicitAny\": true,\r\n \"noImplicitReturns\": true,\r\n \"noImplicitThis\": true,\r\n \"noUnusedLocals\": false,\r\n \"noUnusedParameters\": false,\r\n \"resolveJsonModule\": true,\r\n \"strict\": true,\r\n \"strictNullChecks\": true,\r\n \"strictPropertyInitialization\": true,\r\n \"stripInternal\": true,\r\n \"skipDefaultLibCheck\": true,\r\n \"target\": \"ES2020\",\r\n \"incremental\": true,\r\n \"esModuleInterop\": true,\r\n \"skipLibCheck\": true,\r\n \"moduleResolution\": \"nodenext\"\r\n },\r\n \"include\": [\"src/**/*.ts\", \"test/**/*.ts\"],\r\n \"exclude\": [\"node_modules/\", \"**/*.d.ts\"]\r\n}\r\n```\r\n3. Create a trace in e.g. src/index.ts\r\n```ts\r\nimport * as Sentry from \"@sentry/node\";\r\nSentry.init({\r\n\tdsn: __MY_DSN__,\r\n\ttracesSampleRate: 1.0,\r\n});\r\nconst transaction = Sentry.startTransaction({ name: \"demo\" });\r\ntransaction.finish()\r\n```\r\n4. Run `tsc`\r\n5. Execute `node lib/src/index.js`\n\n### Expected Result\n\nTraces being tracked\n\n### Actual Result\n\nError is thrown on startTransactiion:\r\n\r\n\r\n```\r\nTypeError: Cannot read properties of undefined (reading '0')\r\n at /my-project/node_modules/@sentry/core/node_modules/@sentry/utils/cjs/misc.js:21:87\r\n at /my-project/node_modules/@sentry/core/node_modules/@sentry/utils/cjs/misc.js:27:15\r\n at [Symbol.replace] (\u003canonymous>)\r\n at String.replace (\u003canonymous>)\r\n at Object.uuid4 (/my-project/node_modules/@sentry/core/node_modules/@sentry/utils/cjs/misc.js:25:46)\r\n at Span.__init2 (/my-project/node_modules/@sentry/core/cjs/tracing/span.js:40:36)\r\n at new Span (/my-project/node_modules/@sentry/core/cjs/tracing/span.js:107:53)\r\n at Transaction.startChild (/my-project/node_modules/@sentry/core/cjs/tracing/span.js:156:23)\r\n```\r\n\r\nIt appears to be related to this line: https://github.com/getsentry/sentry-javascript/blob/develop/packages/utils/src/misc.ts#L33 \r\nMy guess is that `Uint8Array` is not globally defined","author":{"url":"https://github.com/DanielMSchmidt","@type":"Person","name":"DanielMSchmidt"},"datePublished":"2023-05-10T08:32:04Z","url":"https://github.com/getsentry/sentry-javascript/issues/8091"}
| 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:6e4132ae-7cd6-3095-017a-454d5ed7e8a0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D392:2BB639:677A3:92E55:6B03FFA5 |
| html-safe-nonce | fa37179bf9c0af4102fb2f7d745a5a0869bcd5d8fcf4b8ee0a14de352789faa7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMzkyOjJCQjYzOTo2NzdBMzo5MkU1NTo2QjAzRkZBNSIsInZpc2l0b3JfaWQiOiI0MTc0Mjk2MjQwMjQ0MzkxODQ1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 3b8804f15bbec0817c2b997e83ed0f295133b75087d8173579b7abf70e48e5fa |
| hovercard-subject-tag | issue:1703386322 |
| 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/8091/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8e53edf9d5a28d824fe2193ab545af9eba7aa907046da7d8b3b56cc11c9386bb/getsentry/sentry-javascript/issues/8091 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8e53edf9d5a28d824fe2193ab545af9eba7aa907046da7d8b3b56cc11c9386bb/getsentry/sentry-javascript/issues/8091 |
| 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 | DanielMSchmidt |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| 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 | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| 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