block_service_workers icon indicating copy to clipboard operation
block_service_workers copied to clipboard

Website vscode.dev not working with this extension

Open flashcode opened this issue 3 years ago • 3 comments

Hi,

When the extension is installed and enabled, the site https://vscode.dev is not working, with this error:

image

In the Javascript console:

(index):1 DOMException: Failed to execute 'postMessage' on 'Window': TrustedScriptURL object could not be cloned.
    at ServiceWorkerContainer.__bsw_override__ [as register] (<anonymous>:1:480)
    at https://vscode.dev/:1:6021
    at Generator.next (<anonymous>)
    at r (https://vscode.dev/:1:3008)

If I disable manually the extension, the site loads fine.

Is there some configuration to disable the extension only for this site, or some option to make the site work with the extension, or is it a bug in the extension itself?

Thanks for your help.

flashcode avatar Oct 07 '22 06:10 flashcode

Sorry for the late reply. I was able to reproduce. I'd need some time to investigate, but can't promise when

clod81 avatar Dec 05 '22 04:12 clod81

In the meantime, you can click on the extension (open the dialog), right click on it and choose Inspect

Then, click on the console tab and paste the following

domain = "vscode.dev";
path = "/sw.js";
chrome.storage.sync.get(domain, function(data){
    if(data[domain] === null || typeof data[domain] !== 'object'){
      data[domain] = {};
    }
    data[domain][path] = true;
    chrome.storage.sync.set(data);
})

clod81 avatar Dec 05 '22 04:12 clod81

Hi @clod81,

I can confirm that with your code pasted in the console, it works fine.

flashcode avatar Dec 05 '22 20:12 flashcode