I'm working on a chrome extension. Unfortunately I can't see the log of the error.
When I click 'Errors' on this page chrome://extensions/ it goes to a page with an error! The console shows this:
extensions.js:4363 Uncaught TypeError: Failed to construct 'URL': Invalid URL
at ExtensionsErrorPageElement.onSelectedErrorChanged_ (extensions.js:4363:2872)
at Object.runObserverEffect [as fn] (polymer_bundled.min.js:1:37568)
at runEffectsForProperty (polymer_bundled.min.js:1:37087)
at runEffects (polymer_bundled.min.js:1:36604)
at ExtensionsErrorPageElement._propertiesChanged (polymer_bundled.min.js:1:52973)
at ExtensionsErrorPageElement._flushProperties (polymer_bundled.min.js:1:26564)
at ExtensionsErrorPageElement._flushProperties (polymer_bundled.min.js:1:51737)
at ExtensionsErrorPageElement._invalidateProperties (polymer_bundled.min.js:1:51534)
at ExtensionsErrorPageElement._setProperty (polymer_bundled.min.js:1:51459)
at ExtensionsErrorPageElement.Object.defineProperty.set (polymer_bundled.min.js:1:24863)
I don't think it has to do with my extension code, but here it is:
manifest.json
{
"name": "Keydown",
"description": "Keydown met de extensie",
"version": "1.0",
"manifest_version": 3,
"background": {
"service_worker": "background.js"
},
"content_scripts": [
{
"matches": [
"*://*/*"
],
"js": [
"content-script.js"
]
}
],
"commands": {
"Yes": {
"suggested_key": {
"default": "Ctrl+U",
"mac": "Command+U"
},
"description": "Yes."
}
}
}
background.js
console.log("background");
content-script.js
console.log("content script");
chrome.commands.onCommand.addListener((command) => {
console.log(`Command: ${command}`);
});