Title: Next.js plugin doesn't work with next-pwa plugin #213 · Issue #3538 · getsentry/sentry-javascript · GitHub
Open Graph Title: Next.js plugin doesn't work with next-pwa plugin #213 · Issue #3538 · getsentry/sentry-javascript
X Title: Next.js plugin doesn't work with next-pwa plugin #213 · Issue #3538 · getsentry/sentry-javascript
Description: Summary I tried to use the sentry integration with the next-pwa plugin but the service-worker is not register in this configuration. Versions next-pwa: 3.1.0 next:10.2.0 @sentry/nextjs: ^6.3.6 How To Reproduce Steps to reproduce the beha...
Open Graph Description: Summary I tried to use the sentry integration with the next-pwa plugin but the service-worker is not register in this configuration. Versions next-pwa: 3.1.0 next:10.2.0 @sentry/nextjs: ^6.3.6 How ...
X Description: Summary I tried to use the sentry integration with the next-pwa plugin but the service-worker is not register in this configuration. Versions next-pwa: 3.1.0 next:10.2.0 @sentry/nextjs: ^6.3.6 How ...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/3538
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Next.js plugin doesn't work with next-pwa plugin #213","articleBody":"# Summary\r\n\r\nI tried to use the sentry integration with the next-pwa plugin but the service-worker is not register in this configuration.\r\n \r\n# Versions\r\n\r\n- `next-pwa`: 3.1.0\r\n- `next`:10.2.0\r\n- `@sentry/nextjs`: ^6.3.6\r\n\r\n# How To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\n\r\n1. Clone [this repo](https://github.com/abordeau/nextjs-pwa-sentry-test)\r\n2. Install the app with `yarn install` and run it with `yarn dev`\r\n3. Open the navigator on http://localhost:3000/\r\n4. Check if a service worker is registered in the chrome dev tools\r\n\r\n# Expected Behaviors\r\n\r\nThe `sw.js` file and the `workbox.js` are created in the public folder but they are not registered by the browser. It only occured when using withSentryConfig.\r\n\r\nThis is the next.config.js file I used :\r\n\r\n```\r\nconst withPWA = require('next-pwa')\r\nconst runtimeCaching = require('next-pwa/cache')\r\nconst { withSentryConfig } = require('@sentry/nextjs')\r\n\r\nconst moduleExports = withPWA({\r\n pwa: {\r\n dest: 'public',\r\n runtimeCaching,\r\n },\r\n})\r\n\r\nconst SentryWebpackPluginOptions = {\r\n // Additional config options for the Sentry Webpack plugin. Keep in mind that\r\n // the following options are set automatically, and overriding them is not\r\n // recommended:\r\n // release, url, org, project, authToken, configFile, stripPrefix,\r\n // urlPrefix, include, ignore\r\n // For all available options, see:\r\n // https://github.com/getsentry/sentry-webpack-plugin#options.\r\n}\r\n\r\n// With this config, the service worker is not registered by the browser\r\nmodule.exports = withSentryConfig(moduleExports, SentryWebpackPluginOptions)\r\n\r\n// This config works\r\n// module.exports = moduleExports\r\n\r\n```\r\n","author":{"url":"https://github.com/abordeau","@type":"Person","name":"abordeau"},"datePublished":"2021-05-12T17:31:54Z","url":"https://github.com/getsentry/sentry-javascript/issues/3538"}
| 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:66dc2335-49d8-84d0-3c87-730353a7bf03 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8738:1F60EA:6E5C2F:9B377F:6B044C1E |
| html-safe-nonce | 3241c59aa5813a86fc03dd4792465f1ca12db705d39486b20b0dc5fa3323988b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NzM4OjFGNjBFQTo2RTVDMkY6OUIzNzdGOjZCMDQ0QzFFIiwidmlzaXRvcl9pZCI6IjQxMzAzMjE1OTkxMDkwMjQ3OTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 29138f26e525cf2d0dc666d726bd27ddc6d02dd9bca3f66610c2db4f24a97c78 |
| hovercard-subject-tag | issue:890324989 |
| 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/3538/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7d55d418ae8efdb20d087f74def66444355e868f83c6c46ba22be9918057a7e9/getsentry/sentry-javascript/issues/3538 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7d55d418ae8efdb20d087f74def66444355e868f83c6c46ba22be9918057a7e9/getsentry/sentry-javascript/issues/3538 |
| og:image:alt | Summary I tried to use the sentry integration with the next-pwa plugin but the service-worker is not register in this configuration. Versions next-pwa: 3.1.0 next:10.2.0 @sentry/nextjs: ^6.3.6 How ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | abordeau |
| hostname | github.com |
| expected-hostname | github.com |
| None | 002aa6b95ffa730b0aec436a5c383f536ad677284e60056037fb120afe37b730 |
| 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 | 059f24c781e3a0d7df3f27a97da0e93fab06ae39 |
| 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