Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Issue 153245 Docs need to clarify when you can use which schemes with match patterns.
Starred by 17 users Reported by kdzwinel@gmail.com, Oct 1 2012 Back to list
Status: Assigned
Owner: mkearney@chromium.org
Cc: binji@chromium.org, manoranj...@chromium.org
Components:
OS: All
Pri: 2
Type: Bug


Sign in to add a comment
Chrome Version       : 22.0.1229.79
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)

What steps will reproduce the problem?
1. Create an extension that tries to inject content script to "chrome-extension://*/*"

What is the expected result?
According to documentation, script should be injected (http://developer.chrome.com/extensions/match_patterns.html). "chrome-extension://*/*" is listed as a valid pattern.

What happens instead?
Error is displayed when trying to enable extension: "Invalid value for 'content_scripts[0].matches[0]': Invalid scheme."

Please provide any additional information below. Attach a screenshot if
possible.

It's also not possible to use "chrome-extension://*/*" in "permissions" attribute of manifest file.

UserAgentString: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.79 Safari/537.4


 
Confirmed for me (24.0.1305.3 (Versão oficial 163672) dev-m).
Cc: manoranj...@chromium.org
Labels: Action-FeedbackNeeded
kdzwinel@, Could you please provide us with any specific Extension that will inject content script to "chrome-extension://*/*" pattern? so that it will be easy for us to reproduce this issue.

Thanks,
Mano


@manoranj No one extension. Extensions can't match it currently, you will get a error like @kdzwinel told.


---------------------------
Extension error
---------------------------
Could not load extension from '[...]/match-issue'. 
Invalid value for 'content_scripts[0].matches[0]': Invalid scheme.
--> Ref. to: "matches": [ "chrome-extension://*/*" ]


I attached an example extension.
match-issue.rar
303 bytes Download
Labels: -Action-FeedbackNeeded Feature-Extensions
Status: Untriaged
I am able to REPRODUCE this issue and is existing from M#21 onwards on Win7. I have tested the other pattern "http://*/*" (which is there in http://developer.chrome.com/extensions/match_patterns.html) and it is working fine with out any issues.

Thanks,
Mano
Labels: -Area-Undefined Area-UI Mstone-22
Comment 6 by aa@chromium.org, Oct 31 2012
Labels: -Type-Bug -OS-Windows -Mstone-22 Type-Documentation OS-All
Owner: mkearney@chromium.org
Status: Assigned
Summary: Docs need to clarify when you can use which schemes with match patterns. (was: NULL)
This is intended behavior; the docs are just wrong. You aren't meant to be able to inject content scripts into other extensions.

Meggin, we should make this more clear. chrome-extension is only allowed in some cases with match patterns.
Comment 7 by aa@chromium.org, Oct 31 2012
Labels: -Area-UI Area-Internals
Project Member Comment 8 by bugdroid1@chromium.org, Mar 10 2013
Labels: -Type-Documentation -Area-Internals -Feature-Extensions Cr-Platform-Extensions Documentation Cr-Internals Type-Bug
Comment 9 by maxo@google.com, Oct 22 2013
It's been a year since this was first raised, and the docs are still achingly misleading.  I just lost a significant amount of time re-engineering some code based on this faulty documentation.  This should be a pretty easy fix, and it's pretty important to content script developers.
Comment 10 by binji@chromium.org, Oct 23 2013
Agreed, I had the same problem. I'm happy to make the doc change if someone can tell me in which cases the "chrome-extension" scheme is valid.
Comment 11 by binji@chromium.org, Oct 23 2013
Cc: binji@chromium.org
Comment 12 by Deleted ...@, Feb 12 2014
I had the same problem as well. I would really like to know when "chrome-extension://*" is valid for content scripts. The note in the docs currently says: 

"Some schemes are not supported in all contexts" 

... which is not very helpful. I just wasted several hours trying to debug something related to this before I deduced that my context is one of those unsupported.

For what it's worth, I can understand not being allowed to access any extension. However, matching your own extension paths seems reasonable (to me), and would save me a lot of headache. I know there are others with the same need.
Comment 13 Deleted
Me, too, I just wasted my time on this.
October 2012... Man. Get things going already or you'll piss of even more extension devs.
I'm still suffering from the same issue, it took me a long time to search around and find this page/find that this is essentially undocumented.

I want to run one of my content scripts on a test html page I've prepared that's inside the extension itself, but there doesn't seem to be a way to allow this.
Labels: Hotlist-Recharge
This issue likely requires triage.  The current issue owner maybe inactive (i.e. hasn't fixed an issue in the last 30 days).  Thanks for helping out!

-Anthony
Sign in to add a comment