Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

157
Views
PWA: Service worker issues

Hi I have been trying to learn PWA and is having a problem with service workers, basically when I try to audit through lighthouse I get the following error:

Service Worker not registered: Failed to register a ServiceWorker for scope ('http://127.0.0.1:5500/') with script ('http://127.0.0.1:5500/sw.js')

Though when I start the app it says it has been activated and is running under the Application tab in devtools. The information I log to the console also show it as registered.

Edit: I'm logging the following information to the console if it helps.

ServiceWorkerRegistration
active: ServiceWorker {scriptURL: 'http://127.0.0.1:5500/sw.js', 
state: 'activated', onstatechange: null, onerror: null}
backgroundFetch: BackgroundFetchManager {}
cookies: CookieStoreManager {}
installing: null
navigationPreload: NavigationPreloadManager {}
onupdatefound: null
paymentManager: PaymentManager {instruments: PaymentInstruments, 
 userHint: ''}
periodicSync: PeriodicSyncManager {}
pushManager: PushManager {}
scope: "http://127.0.0.1:5500/"
sync: SyncManager {}
updateViaCache: "imports"
waiting: null
[[Prototype]]: ServiceWorkerRegistration

Also the I register the service worker in a file name app.js like this:

if('serviceWorker' in navigator) {
     navigator.serviceWorker.register('/sw.js')
        .then((reg) => console.log('Service Worker registered.', reg))
        .catch((err) => console.log('Service Worker not registered.', err));
}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!