3

XMLHttpRequest cannot load http://localhost:4567/save. Origin chrome-extension://cbemaelkkmebiohhjgmlclegalijdbbh is not allowed by Access-Control-Allow-Origin.

Even thought I'm getting this error the extension seems to be calling the URL. The message passing from contentscript.js to background.html took me a few minutes to wire up, but seems ok. I'm confused.

Here is my manifest.

{ "name": "FirstExt", "version": "1.0", "description": "My First Extension", "browser_action": { "default_icon": "icon.png", "popup": "popup.html" }, "content_scripts": [ { "matches": ["http://*"], "js": ["jquery.min.js", "contentscript.js"] } ], "background_page": "background.html", "permissions": [ "http://*", "http://localhost:4567/*" ] } 
1
  • Note: I'm not really using the popup.html for anything yet. Its empty. Commented May 17, 2011 at 18:08

2 Answers 2

11

Try changing http://* to http://*/ (and removing the localhost entry).

If you're trying to access a https page, you will need that too.

Sign up to request clarification or add additional context in comments.

Comments

8

Replace "http://*" with "<all_urls>".

1 Comment

Do you need to remove this before uploading the extension?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.