I am trying to test the inline installation feature of the Chrome Webstore as per this document (https://developers.google.com/chrome/web-store/docs/inline_installation). I am developing this locally to test and cannot easily and often push my changes live.
How do I test inline installation locally since inline installation depends on your site being verified in Webmaster Tools?
Code
if (!chrome.app.isInstalled) {
chrome.webstore.install(undefined, undefined, function(err) {
console.log(err);
});
}
This returns:
Installs can only be initiated by the Chrome Web Store item's verified site
Obviously localhost is not a verified site.
Any help is appreciated.
Go to chrome://extensions/ and check the box for Developer mode in the top right. Click on the “Load unpacked” button, and go to the location of the content of this CRX file. And click on the OK button to install that Chrome extension.
From Google's Using Inline Installation guide: "Note that if you verify ownership for a domain (for example, http://example.com) you can initiate inline installation from any subdomain or page".
So, if you do own a domain, you can verify it and then simulate that your local machine is a subdomain of your verified domain.
For instance, if you verify with Google the domain example.com, you can include the following in your hosts file:
127.0.0.1 local.example.com
Then you can access your local server via http://local.example.com (some configuration on your local webserver may be needed). If you associate your item in the Chrome Webstore with example.com, you'll be able to start an inline installation from your local page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With