Things I want to do
How to fix the error that occurs when trying to add a custom extension to Chrome or Edge, preventing the extension from being added.
Invalid value for content_scripts[0].matches[0]: Missing scheme separator.The manifesto could not be loaded.

Detail
When attempting to register an extension with the following manifest file, the error ‘Invalid value for content_scripts’ occurs.[0].matches[0]I received the error message: ‘Missing scheme separator.’
{
"name": "Sample",
"version": "1",
"manifest_version": 3,
"content_scripts": [
{
"matches": [ "blog.marunokan.com/*" ],
"js": ["sample.js"]
}
]
}reason
The cause is as stated in the message: the following line.
"matches": [ "blog.marunokan.com/*" ],The reason is that the specified URL does not have ‘https://’ or ‘http://’ at the beginning.
countermeasure
As stated in the cause, the following line
"matches": [ "blog.marunokan.com/*" ],Please make the following corrections.
"matches": [ "https://blog.marunokan.com/*" ],Result
I was able to successfully register it in my browser.
If you register it in Chrome, the following message will be displayed in the lower left corner of the screen.



コメント