Error when adding extension: “Invalid value for content_scripts “[0].matches[0]: Missing scheme separator.”(Edge,Chrome)

この記事は約3分で読めます。
スポンサーリンク

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.

コメント

タイトルとURLをコピーしました