Cimbali / markdown-viewer

Markdown (.md) file viewer WebExtension for your browser.
Other
165 stars 28 forks source link

Not working on Debian / Firefox ESR #31

Closed agfline closed 6 years ago

agfline commented 6 years ago

Hi

Version 1.3.0 isn't working when installed from FF > Add-ons Manager. Only the 1.0.1 version seems to work.

Here is the console output when debugging :

Use of getAttributeNode() is deprecated. Use getAttribute() instead. amo-abc18b52203edb48632b.js:1:827006
Content Security Policy: The page’s settings blocked the loading of a resource at self (“style-src https://addons-amo.cdn.mozilla.net 'sha256-DiZjxuHvKi7pvUQCxCVyk1kAFJEUWe+jf6HWMI5agj4='”). reviews:1
Content Security Policy: The page’s settings blocked the loading of a resource at self (“style-src https://addons-amo.cdn.mozilla.net 'sha256-DiZjxuHvKi7pvUQCxCVyk1kAFJEUWe+jf6HWMI5agj4='”).  reviews
browser.permissions is undefined background.js:70
Sending message that cannot be cloned. Are you trying to send an XPCOM object?  addonManager.js:229:10
Use of getAttributeNode() is deprecated. Use getAttribute() instead. amo-abc18b52203edb48632b.js:1:827006
Content Security Policy: Directive ‘frame-src’ has been deprecated. Please use directive ‘child-src’ instead.  (unknown)
browser.permissions is undefined  background.js:70
TypeError: browser.permissions is undefined[Learn More]  options.js:38:1
browser.permissions is undefined background.js:70
XrayWrapper denied access to property Symbol.toPrimitive (reason: object is not safely Xrayable). See https://developer.mozilla.org/en-US/docs/Xray_vision for more information. Note that only the first denied property access from a given global object will be reported.  script.js:2354:4

Debian: 9.4 Firefox: ESR 52.7.2

KeithLRobertson commented 6 years ago

Good report! I'm glad you included the FF version!!

I'm afraid as long as you're on v52 you're stuck with 1.0.1. As mentioned during #8, something changed in FF 56+ where the manifest permissions weren't enough to allow web extensions to inject scripts into a page. The extension needs to request permissions from the user, which means using the browser.permissions API. I added this in 1.3.0. Your v52 browser doesn't have those, "browser.permissions is undefined." That API was introduced in FF 55.