Select to view content in your preferred language

SecurityError Failed to register a ServiceWorker - SSL certificate error

630
2
01-29-2025 03:58 AM
Labels (1)
ÅsaBlomberg
Occasional Contributor

I try to follow the instructions for creating custom widget 'get-map-coordinates' to ExpBuilder but get this error in Chrome:

Error handling response: TypeError: Cannot read properties of undefined (reading 'MainColor')
at chrome-extension://imdndkajeppdomiimjkcbhkafeeooghd/content_scripts/nif2_balloon.js:20:51Understand this errorAI
init.js:1 Error during service worker registration: SecurityError: Failed to register a ServiceWorker for scope ('https://localhost:3001/') with script ('https://localhost:3001/service-worker.js'): An SSL certificate error occurred when fetching the script.
(anonymous) @ init.js:1Understand this errorAI
init.js:2841 Using Calcite Components 2.13.0 [Date: 2024-10-01, Revision: 42c132913]
10Chrome is moving towards a new experience that allows users to choose to browse without third-party cookies.Understand this warningAI
widget.tsx:29 Uncaught TypeError: Cannot read properties of null (reading 'toFixed')
at widget.tsx:29:36
at n._callback (init.js:2684:98)
at M._handleEvent (init.js:2663:310)
at Object.eventCallback (init.js:2660:381)
at w._continuePropagation (init.js:2650:402)
at w._doNewPropagation (init.js:2649:490)
at w._emitInputEvent (init.js:2649:285)
at w._emitInputEventFromSource (init.js:2648:502)
at w._onEventReceived (init.js:2645:457)
at e._handlePointerPreventDefault (MapView.js:363:336)

saBlomberg_0-1738151772852.png

 

0 Kudos
2 Replies
JeffreyThompson2
MVP Frequent Contributor

So you are getting three errors, but you probably only need to worry about one of them.

Error 1: Is being thrown by one of your Chrome Extensions. It's probably not affecting your application, but you may want to deactivate the extension, just because it's not working properly.

Error 2: Is related to SSL certificates. You can ignore this. It's a security warning that is erroneously thrown when working on localhost. Your browser is looking for a digital certificate that verifies that the website you are using is what you think you are looking at to protect you from what's called a man-in-the-middle attack. But localhost is your own computer, so there is no middle for a man to be in and no one to issue the certificate. The browser gets confused and says you are visiting a dangerous website when you are not.

Error 3: This one you need to solve. Take a look at line 29 in your code. You are calling toFixed() on something that is reading as null. This might just be a typo. 

GIS Developer
City of Arlington, Texas
ÅsaBlomberg
Occasional Contributor

Thank you for pointing me in the right direction! Something was wrong with the map, I replaced it and then it worked!

0 Kudos