0

I have a Chrome Extension (page action). The extension is loaded in developer mode (not from the store).

The extension is used in two sites, both of which URLs are in the manifest.

When I go to one of the sites, the page icon is enabled and when I click it, it runs fine.

When I go to the other site, the extension icon is also enabled but when I click on the extension, instead of running the action, the extension menu appears (as if I had right-clicked the icon instead of clicked it).

When I hover the page action icon, in both sites I get the text "Has access to this site".

Which are possible causes for this behavior?

Pep
  • 1,957
  • 2
  • 24
  • 40
  • One of the reasons it may happen is an error in your code. Check your [background page console](https://stackoverflow.com/a/10258029). – wOxxOm Jan 18 '19 at 19:00
  • Thanks for the suggestion. I just checked and there is no error logged in the console. – Pep Jan 18 '19 at 19:08
  • Well, that was a guess based on what I saw myself. Show us an [MCVE](/help/mcve) please. – wOxxOm Jan 18 '19 at 19:12

1 Answers1

1

Something definitely changed with the manifest.json handling of the most recent Chrome update. (In my case, "Version 72.0.3626.96 (Official Build) (64-bit)" on Windows.) My extension stopped working in a way similar to what you describe.

The solution to my problem was to remove the specific url permissions I had specified in the "permissions" section, and replace them with <all_urls>. I tried tightening them back up again, but the only other thing that worked for me was https://*/*.

I tested this on several machines that had the previous version of Chrome and they had the same behavior... successful operation before the Chrome update, no response after. The icon displayed properly and showed "Has access to this site", but my background page refused to run.

Good luck! Hopefully this helps!