Title: Workbox script errors in Site Editor
Last modified: April 1, 2024

---

# Workbox script errors in Site Editor

 *  Resolved [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/)
 * (@ravanh)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/workbox-script-errors-in-site-editor/)
 * Hi, with the PWA plugin active, I get this type of errors in the browser console
   when opening the Site Editor. The editor seems to function correctly, but the
   errors keep occurring.
 *     ```wp-block-code
       Uncaught (in promise) TypeError: Failed to register a ServiceWorker: The URL protocol of the scope (':') is not supported.
           at a.es (Workbox.js:486:55)
           at a.register (Workbox.js:299:41)
       ```
   
 * The site in question is using an adapted Twenty Twenty-Three.
 * Is this a known issue or something related to a plugin or theme conflict?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/workbox-script-errors-in-site-editor/#post-17546446)
 * OK, I’m seeing that too. It’s coming from the iframe that the Site Editor wraps
   around the template:
 *     ```wp-block-code
       <iframe class="edit-site-visual-editor__editor-canvas" aria-label="Editor Canvas" role="button" name="editor-canvas" tabindex="0" src="blob:https://elegant-addax-156c1d.instawp.xyz/7291cd8a-0a26-4dec-89a0-4b0d98ccd472" title="Editor canvas" style="border: 0px; margin-left: auto; margin-right: auto; transition: all 0.3s ease 0s;"></iframe>
       ```
   
 * Inside this iframe, the service worker is attempting to get installed:
 *     ```wp-block-code
       <script type="module">
       		import { Workbox } from "https:\/\/elegant-addax-156c1d.instawp.xyz\/wp-content\/plugins\/pwa\/wp-includes\/js\/workbox-v7.0.0\/workbox-window.prod.js";
   
       		if ( 'serviceWorker' in navigator ) {
       			window.wp = window.wp || {};
       			window.wp.serviceWorkerWindow = new Workbox(
       				"https:\/\/elegant-addax-156c1d.instawp.xyz\/wp-admin\/admin-ajax.php?action=wp_service_worker",
       				{"scope":"\/wp-admin\/"}			);
       			window.wp.serviceWorkerWindow.register();
       		}
       </script>
       ```
   
 * And this is where the error is happening.
 * Two possible solutions here: (1) prevent this script from being injected when
   in the Site Editor, or (2) prevent attempting to register when the current page
   is a blob, such as if `location.protocol === 'blob:'` .
 * In any case, the error doesn’t seem like it is going to be causing any actual
   functionality problem other than the console getting populated with the error
   entry.
 *  Thread Starter [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/)
 * (@ravanh)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/workbox-script-errors-in-site-editor/#post-17547233)
 * Indeed, I have not discovered it to break anything (yet) so not an urgent issue.
   It’s just that we came across them when trying to debug an issue, and have spent
   a while thinking PWA was the cause…
 * Just thought you might like to know and hope it something you can/will address
   at some point. If not too complicated, of course 🙂
 * Anyway, thanks for your plugin and work maintaining it. Let me know if I can 
   help out testing at some point!
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/workbox-script-errors-in-site-editor/#post-17555587)
 * Thanks! I’ve filed this on GitHub for us to track there: [https://github.com/GoogleChromeLabs/pwa-wp/issues/1127](https://github.com/GoogleChromeLabs/pwa-wp/issues/1127)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Workbox script errors in Site Editor’ is closed to new replies.

 * ![](https://ps.w.org/pwa/assets/icon.svg?rev=1908485)
 * [PWA](https://wordpress.org/plugins/pwa/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pwa/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pwa/)
 * [Active Topics](https://wordpress.org/support/plugin/pwa/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pwa/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pwa/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * Last activity: [2 years, 1 month ago](https://wordpress.org/support/topic/workbox-script-errors-in-site-editor/#post-17555587)
 * Status: resolved