-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Service worker registration failed. Status code: 3 #96
Comments
@kpripper happened to me on latest version of Chrome, previously no issue. This even affect the production extension that I already published, I wonder if this is because of new Chrome update |
Update your vite.config.ts and add server object like this way import { defineConfig } from 'vite';
import { crx } from '@crxjs/vite-plugin';
import react from '@vitejs/plugin-react';
// @ts-ignore
import manifest from './src/manifest';
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
return {
build: {
emptyOutDir: true,
outDir: 'build',
minify: true,
rollupOptions: {
output: {
chunkFileNames: 'assets/chunk-[hash].js',
},
},
chunkSizeWarningLimit: 2000,
},
server: {
port: 5173,
strictPort: true,
hmr: {
port: 5173,
},
},
plugins: [crx({ manifest }), react()],
};
}); |
Thank you, this works. But why isn't this included out of the box? Is it impossible? |
I'm getting websocket error. I was getting similar error after adding this setting issue got result but now I'm getting websocket error. Configuration file
|
@arif-b-khan Have you found a way to solve this problem? I have it right after the initialization of the project. |
@arif-b-khan as I understand it, Vite has updated something and if someone has such errors, here is the solution. WebSocket connection to 'ws://localhost:5173/' failed: Error during WebSocket handshake: Unexpected response code: 400 crxjs/chrome-extension-tools#971 (comment) my fix commit |
I just installed the code and haven’t changed anything yet, just ran it.
When I click on the extension icon, I see:
On the extension management page in the errors section, I see the following message:
Service worker registration failed. Status code: 3
In the code, "service-worker-loader.js" is highlighted in yellow.
The text was updated successfully, but these errors were encountered: