Skip to content
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

Offline mode interferences #1417

Closed
davidoskky opened this issue Feb 21, 2023 · 2 comments
Closed

Offline mode interferences #1417

davidoskky opened this issue Feb 21, 2023 · 2 comments
Labels

Comments

@davidoskky
Copy link
Contributor

Hello, I have Selfoss 2.19 installed on a remote server which I use from time to time, I don't remember ever activating offline mode but it could be.
On my computer, I sometimes use a jupyter notebook; in the notebook console I repeatedly get this message over time:

404 GET /selfoss-sw-offline.js (127.0.0.1) 2.250000ms referer=None

The jupyter notebook is running on port 8888 and if I connect to localhost:8888 when the service is not running, I get the page

selfoss is still loading, please wait.

If I connect to other ports this does not happen.
I have not installed selfoss locally, nor do I have any other local webserver.

@jtojnar
Copy link
Member

jtojnar commented Feb 21, 2023

That is really weird – we are just doing a standard ServiceWorker registration:

navigator.serviceWorker.register(new URL('../selfoss-sw-offline.js', import.meta.url), { type: 'module' })

and since 2.19, we are only registering it if user explicitly enables offline mode:

if (selfoss.db.enableOffline.value) {
selfoss.setupServiceWorker();
}

Maybe it is something from older version of selfoss that got stuck around?

Try manually unregistering it in about:serviceworkers (in Firefox) or chrome://serviceworker-internals/ (in Chromium).

@davidoskky
Copy link
Contributor Author

Nevermind, I had a ServiceWorker registered on localhost:8888 for selfoss.
I'm not really sure how it got there, but enabling offline mode now appears to correctly set the ServiceWorker to the domain where I have selfoss.

@jtojnar jtojnar closed this as completed Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants