Title: crypto.getRandomValues returns undefined in Chromium 23 · Issue #9250 · getsentry/sentry-javascript · GitHub
Open Graph Title: crypto.getRandomValues returns undefined in Chromium 23 · Issue #9250 · getsentry/sentry-javascript
X Title: crypto.getRandomValues returns undefined in Chromium 23 · Issue #9250 · 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/9250
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"crypto.getRandomValues returns undefined in Chromium 23","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/browser\n\n### SDK Version\n\n7.73.0\n\n### Framework Version\n\n_No response_\n\n### Link to Sentry event\n\n_No response_\n\n### SDK Setup\n\n_No response_\n\n### Steps to Reproduce\n\nCall `Sentry.captureException`\n\n### Expected Result\n\nException to be reported to Sentry\n\n### Actual Result\n\n`crypto.getRandomValues` returns `undefined`, hence \r\n\r\nhttps://github.com/getsentry/sentry-javascript/blob/6c1f2f168e0b80c86cd9dc3fb64791aaba724c90/packages/utils/src/misc.ts#L34\r\n\r\nthrows an error:\r\n\r\n```\r\nTypeError: Cannot read properties of undefined (reading '0')\r\n```\r\n\r\nThis is something I already tracked in other closed issues like:\r\n\r\n- https://github.com/getsentry/sentry-javascript/issues/5622\r\n- https://github.com/getsentry/sentry-javascript/issues/8091\r\n\r\nI'm aware in those cases it looked like it was due to a polyfill implementation issues. Besides, the sentry package that was provided in the issue was `@sentry/node`.\r\n\r\nHowever in this case, I noticed this issue by using `@sentry/browser` in an old Chromium version: 23.0.1235.0 (151422).\r\n\r\nIn fact, just executing `crypto.getRandomValues(new Uint8Array(1))` in Chrome DevTools console, it returns `undefined`.\r\n\r\n\r\n\r\nThe typed array is updated anyways, the only problem is this particular implementation of `getRandomValues` doesn't return the typed array:\r\n\r\n\r\n\r\nI think it might be possible that other old browser engines and versions are affected by this issue but, unfortunately, I have not been able to check it yet.","author":{"url":"https://github.com/jghinestrosa","@type":"Person","name":"jghinestrosa"},"datePublished":"2023-10-14T12:40:47Z","url":"https://github.com/getsentry/sentry-javascript/issues/9250"}
| 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:1256ea13-7a98-b048-3527-68ee8ca7b533 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9896:2B524C:39A0D:4E644:6B03FAF3 |
| html-safe-nonce | afa1ae16d19e9985981fc8e85937c938b4adb161b852bbc572388e58e2f57094 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5ODk2OjJCNTI0QzozOUEwRDo0RTY0NDo2QjAzRkFGMyIsInZpc2l0b3JfaWQiOiIzMDgxMDY4MDY4MDE4MDYwMDE5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | b755ab1881612199250592e1407b47e36204f35828647460e3341feff1c20c99 |
| hovercard-subject-tag | issue:1943246359 |
| 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/9250/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e7a378ba5002f5ed4ad0d3a5e7f7588c359b69603773ca252b0f37f2b8c26d4f/getsentry/sentry-javascript/issues/9250 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e7a378ba5002f5ed4ad0d3a5e7f7588c359b69603773ca252b0f37f2b8c26d4f/getsentry/sentry-javascript/issues/9250 |
| 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 | jghinestrosa |
| 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