Not able to get to the store url to avoid the "The extensions gallery cannot be scripted." error
Reported by
metalar...@gmail.com,
Apr 8 2016
|
|
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36 Steps to reproduce the problem: 1. Try to run a chrome.tabs.executeScript on the store gallery What is the expected behavior? Not throwing an error, or at least have a way to catch that specific error. What went wrong? It throws the error "The extensions gallery cannot be scripted.", without a way to avoid it. WebStore page: Did this work before? N/A Chrome version: 49.0.2623.110 Channel: n/a OS Version: OS X 10.11.4 Flash Version: Shockwave Flash 21.0 r0 I could add a filter to avoid injecting a script inside the gallery page, but there is no other way than to hard-code a fixed url. Extensions should have a way to get to the url inside the chromium code to avoid problems with changing urls. |
|
►
Sign in to add a comment |
|
Comment 1 by lazyboy@chromium.org
, Apr 13 2016You want to look at chrome.runtime.lastError inside executeScript's callback. If you read that in callback then it won't do the console.error, e.g. chrome.tabs.executeScript({code:...}, function(results) { if (chrome.runtime.lastError) { // In your case, chrome.runtime.lastError.message would be "The extensions gallery cannot be scripted... });