Title: Broken @sentry/vue jest mock · Issue #6037 · getsentry/sentry-javascript · GitHub
Open Graph Title: Broken @sentry/vue jest mock · Issue #6037 · getsentry/sentry-javascript
X Title: Broken @sentry/vue jest mock · Issue #6037 · 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/6037
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Broken @sentry/vue jest mock","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\nSelf-hosted/on-premise\r\n\r\n### Which package are you using?\r\n\r\n@sentry/vue\r\n\r\n### SDK Version\r\n\r\n7.16\r\n\r\n### Framework Version\r\n\r\n_No response_\r\n\r\n### Link to Sentry event\r\n\r\n_No response_\r\n\r\n### Steps to Reproduce\r\n\r\nSimply use a dynamic import\r\n\r\n```js\r\nimport(/* webpackChunkName: \"sentry\" */'@sentry/vue').then(({init}) => {\r\n init({\r\n Vue,\r\n environment: process.env.SERVE ? 'local' : process.env.NODE_ENV,\r\n dsn: process.env.VUE_APP_SENTRY_DSN,\r\n })\r\n});\r\n```\r\nOr \r\n```js\r\nimport(/* webpackChunkName: \"sentry\" */'@sentry/vue').then(({ setUser }) => {\r\n setUser({ id, email, username: (first_name + ' ' + last_name).trim() });\r\n});\r\n```\r\n\r\n### Expected Result\r\n\r\nSentry to initialize correctly\r\n\r\n### Actual Result\r\n\r\n`TypeError: init is not a function`\r\n\r\n\r\nThis happened between 7.15 (last known working version) and 7.16\r\n\r\nThe `@sentry/core` dynamic import still seems to work, but the `init` one is specific to `@sentry/vue` and cannot be used with a dynamic import anymore\r\n","author":{"url":"https://github.com/Tofandel","@type":"Person","name":"Tofandel"},"datePublished":"2022-10-25T10:53:42Z","url":"https://github.com/getsentry/sentry-javascript/issues/6037"}
| 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:86c4fc10-956c-dbb9-47b5-1fc68b600293 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8ACE:240111:3453DF:496656:6B04243E |
| html-safe-nonce | add0a5592dd3e0e497650e08e3a983d45ee996252281d80e3f260e9bd0a46f77 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QUNFOjI0MDExMTozNDUzREY6NDk2NjU2OjZCMDQyNDNFIiwidmlzaXRvcl9pZCI6Ijg2NTc0MjgxNDA4MzYyNjcwNzAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1cff0cafef5f3bd6e57fbfa76f648f001b20243a21ba42118a09934b8672d36a |
| hovercard-subject-tag | issue:1422268585 |
| 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/6037/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a9d269b277f5bebffa38d22a3f3dea38dc700978bdcaab219ca2693f869b9441/getsentry/sentry-javascript/issues/6037 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a9d269b277f5bebffa38d22a3f3dea38dc700978bdcaab219ca2693f869b9441/getsentry/sentry-javascript/issues/6037 |
| 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 | Tofandel |
| hostname | github.com |
| expected-hostname | github.com |
| None | f8d9f404447ab5df341c8a92cf5fc927730ad1321e64ac57656444d2438097f1 |
| 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 | f7edccce04851591ee529948701779ce6819bc53 |
| 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