Failed to register a ServiceWorker: ServiceWorker cannot be started

后端 未结 1 1880
名媛妹妹
名媛妹妹 2021-02-20 08:12

Everything was working fine with my Service Worker project, but suddenly I am seeing the following error:

Uncaught (in promise) DOMException: Failed to register          


        
1条回答
  •  无人及你
    2021-02-20 08:53

    So it turns out this just indicates there is a JS error in the Service Worker code itself, so the registration couldn't complete.

    Load chrome://serviceworker-internals/ and check 'Open DevTools window and pause JavaScript execution on Service Worker startup for debugging.'

    The inspector will then pop up when you refresh the page, allowing you to see the error in the Service Worker.

    0 讨论(0)
提交回复
热议问题