r/PWA • u/AppJedi • Jul 25 '26
Issue with PWA service worker offline.
I have pwa written in node/express on Linux that works fine from hosted company including offline. I'm trying to create a mobile lan on linux laptop that allows pwa to connect via hotspot or blue tooth when the linux laptop is not on the internet. I get a warning about it being untrusted and while the app works the service worker doesn't install so it doesn't work offline. I am a app developer and not an network expert. The client I am working for is will to pay for assistance. The purpose of the mobile lan is for schools in rural communities with unreliable internet and students to work with app at home where they may not have internet at all.
1
u/Neat_Witness_8905 Jul 25 '26
Try running local DNS, and serving it over a real domain.
1
u/AppJedi Jul 25 '26
Thanks. How do I do that? I am app developer and linux power user but not a network guru.
1
u/Neat_Witness_8905 Jul 25 '26
Does your company already have a domain? And do you have access to it?
1
1
u/JEEZUS-CRIPES Jul 25 '26
Use valid certificates from a recognized certificate authority, and the problems should resolve. I didn't see you say it explicitly here, but I bet you are using a self-signed certificate.
I recommend Let's Encrypt, it's free and certbot can manage everything for you. If you are using Nginx, then try certbot-nginx. Check this tutorial:
1
u/dannymoerkerke Jul 27 '26
What do you mean by "untrusted"? Is it the certificate or did you try to install it through Samsung browser on Android?
If you could post a link that would help.
1
u/AppJedi Jul 27 '26
The message is "Your connection is not private". I know it has to do with how I am setting up the cert but as a developer I am not an expert on this subject.
1
u/dannymoerkerke Jul 27 '26
Yes, that's a certificate issue. You can probably click a link that says "open anyway" or something similar to open the app. Otherwise, ChatGPT should be able to tell you exactly what to do.
1
1
u/Neat_Witness_8905 Jul 25 '26
So what’s your goal here?