Testing Chrome Extension APIs Locally

This is a pretty general question with a couple examples. I'm fairly new to writing chrome extensions and I seem to keep running into cases that are impossible to test without deploying to the webstore (which takes ~60m each time). This is an impossible workflow. Am I missing something?

Case 1 inline installation

Trying to set up inline installation from my site to a chrome extension. When I run the site locally i get the following.

Error downloading extension: Inline installs can only be initiated for Chrome Web Store items that have one or more verified sites.

But I cannot seem to add localhost website property in chrome's developer dashboard. What is the recommended way to do this in a dev environment. I tried using local.mywebsite.com and adding a local alias for localhost, but now chrome cannot find the verification file you are required to serve...

Case 2 Chrome Extension OAuth

Attempting to use chrome.identity.launchWebAuthFlow to setup user credentials in my extension for my website, but of course the callback url provided https://<ext-id>.chromium.org/provider-cb does not redirect to my local deploy of the extension.

Is there no way to test these things??

1 answer

  • answered 2017-06-17 18:50 abielita

    Regarding your error "Inline installs can only be initiated for Chrome Web Store items that have one or more verified sites.", you may follow the instructions given in this page.

    You need to:

    1. Go to the Webmaster Tools.
    2. Add the site to your sites.
    3. Obtain and embed a verification code into your site.
    4. Complete verification in Webmaster Tools.
    5. Go to your Developer Dashboard (must be under the same Google account) and edit your Web Store item.
    6. Select your site in "Verify that this is an official item for a website you own:"

    Here are some references which might help in testing extensions: