Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Error when trying to screenshot mozAddonManager whitelisted URLs #2435

Closed
dannycoates opened this issue Mar 20, 2017 · 5 comments
Closed

Error when trying to screenshot mozAddonManager whitelisted URLs #2435

dannycoates opened this issue Mar 20, 2017 · 5 comments
Assignees
Milestone

Comments

@dannycoates
Copy link
Contributor

Error: No window matching: {"matchesHost": ["<all_urls>"]}
@jaredhirsch
Copy link
Member

Content scripts are disabled on Mozilla sites that are mozAddonManager whitelisted. See https://bugzil.la/1310082 for related discussion.

So, the same thing happens on sites like addons.mozilla.org as well.

I'm not sure of the best way to handle this, so I"ll just update the title for now.

@jaredhirsch jaredhirsch changed the title Error when trying to screenshot testpilot.firefox.com Error when trying to screenshot mozAddonManager whitelisted URLs Mar 20, 2017
@ianb
Copy link
Contributor

ianb commented Mar 20, 2017

Probably we should disable Page Shot on these sites.

In generally we should also handle these errors with an appropriate popup. I.e., catch this error and send exc.popupMessage="UNSHOOTABLE_PAGE"

@jaredhirsch
Copy link
Member

Hmm. We should be able to detect such pages via 'mozAddonManager' in navigator. If it's true, then bail.

@ianb
Copy link
Contributor

ianb commented Mar 20, 2017

I don't believe we can access navigator from the background page.

@jaredhirsch
Copy link
Member

Good point!

I asked in #teamaddons about the nicest way to do this, and kmag suggested we just check against the whitelist. AMO and Test Pilot are the only two sites on that whitelist, so hard-coding the whitelist seems reasonable.

@ghost ghost added this to the Stretch milestone Mar 22, 2017
@ianb ianb self-assigned this Apr 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants