vite-pwa / vite-plugin-pwa

Zero-config PWA for Vite
https://vite-pwa-org.netlify.app/
MIT License
3.23k stars 211 forks source link

Problems with application-panel in newer Chromiums? #720

Closed aadnenesmakt closed 6 months ago

aadnenesmakt commented 6 months ago

Hi!

I just recently updated my chromium from 124.0.6367.158 to the newest (May release). The application panel does not work anymore, as opening this will force shutdown of the browser. However, this has been tested on "all chromium" (Arc, Google Chrome, Edge etc) in both production, preview (vite preview) and local dev. (As Vite uses different build systems between build and dev).

Has anyone else experienced this? :)

However, opening the application-panel on a newer version of chromium will force shutdown of the browser Skjermbilde 2024-05-28 kl  10 16 10 Skjermbilde 2024-05-28 kl  10 23 56

Opening on an older browser is non-problematic (See picture below):

Skjermbilde 2024-05-28 kl  10 17 43

The appended config for the PWA-plugin is below, while the vite-config is completely below

const pwaOptions: Partial<VitePWAOptions> = { devOptions: { enabled: true, }, registerType: 'autoUpdate', injectRegister: null, workbox: { cleanupOutdatedCaches: true, }, manifest: { short_name: 'application name', name: 'Application name', icons: [ { src: 'favicon.ico', sizes: '32x32 16x16 ', type: 'image/x-icon', purpose: 'any', }, { src: 'apple-touch-icon.png', type: 'image/png', sizes: '144x144 ', purpose: 'maskable', }, { src: 'android-chrome-192x192.png', sizes: '192x192', type: 'image/png', purpose: 'any', }, { src: 'apple-touch-icon.png', type: 'image/png', purpose: 'maskable', }, { src: 'android-chrome-512x512.png', sizes: '512x512', type: 'image/png', purpose: 'any', }, ], start_url: '.', display: 'standalone', theme_color: '#FFCB14', }, };

const viteConfig = defineViteConfig({ // depending on your application, base can also be "/" plugins: [ svgr(), react(), viteTsconfigPaths(), eslint(), VitePWA(pwaOptions), legacy(), ], server: { open: true, port: 3000, }, build: { rollupOptions: { output: { entryFileNames:[name].${version}.js, chunkFileNames:[name].${version}.js, assetFileNames:[name].[ext], }, }, }, preview: { port: 1234, // Kept different from dev server port by design, in order to avoid PWA conflicts }, });

aadnenesmakt commented 6 months ago

Seems to be related to Yarn 1, therefore closing it :P

d-kurchenko commented 5 months ago

The same problem. My environment setup: node v20.10.0 npm 10.2.3 chrome 125.0.6422.141

Chrome logs on shutdown: image