Open erezsh opened 1 year ago
This is the message from crxjs
: https://github.com/crxjs/chrome-extension-tools/issues/449
Follow the link to find out why this happens and what it affects. In short, this error only occurs during development and due to the fact that you turn off the development dev Vite
server.
And so try just start the dev server:
npm run dev
Or you can build production version of extension (npm run build
) and reload extension (in chrome://extensions
).
This happens while the server is running.
The worker starts immediately after displaying that message, and reloading the page gets rid of the message. But I think the reload should be automatic?
I don't quite understand what the problem is, could you send me the steps to reproduce and the expected behavior please? And also please tell me this problem is reproduced in a clean fork chrome-extension-svelte-typescript-boilerplate
?
And once again I repeat that this error occurs only during development. In production, this error will not occur. It seems to me that the case with disabling the service worker is quite rare (because, for example, chrome works in the backround mode even when the browser is closed and the service worker continues to work), so simply reopening the extension to solve this problem in development mode is enough. In general, after reopening, the extension will already know about restarting the server worker.
Yes, this happens with a clean fork.
Steps are simple:
I understand this only happens in dev mode.
Whether it's enough or not is, I suppose, subjective. But I think that if the boilerplate knows to show this error page, it shouldn't be that hard to just wait for the worker to be ready and reload? It would definitely be a nicer dev experience.
Oh, thanks, i get what you mean. I agree, sounds like a nice dev experience. But unfortunately, I can’t influence this logic in this boilerplate. Because this is the package logic from https://github.com/crxjs/chrome-extension-tools.
I think you can bring this idea to this issue: https://github.com/crxjs/chrome-extension-tools/issues/449.
Interacting with the boilerplate extension after letting the service worker to become inactive, we are greeting with the aforementioned message, which doesn't go away until we close and open the page again -
I think the desired behavior would be to hide this message once the worker is done loading.