Ipfs-companion: Support for Microsoft Edge?

Created on 7 Jan 2018  ·  14Comments  ·  Source: ipfs/ipfs-companion

kinenhancement statublocked statublockemissing-api statublockeupstream-bug

Most helpful comment

@lidel, seems to be running as expected :smile:

Screenshot 2019-04-12 at 23 15 33

All 14 comments

Good question :) There is an open task in #276 for smoke-testing it under MS Edge, but nobody picked it up yet (most of our community seems to be using Firefox/Chrome).

@rogersachan do you have MS Edge and some spare time on your hands? If so, try loading ipfs_companion-2.1.0.zip (see this instruction) and let us know if there were any errors (AFAIK Edge does not support notifications API yet, so you may need to inspect Browser Console).

It would be an important data point telling us where MS Edge stands.

image
I get an error before I can even load this extension. There are no other errors or messages in the console.

image
Updating background with this in order to fix the issue gives me another error.
image

Deleting both 'browser_style' fields allowed me to import the extension. I'll start testing it as soon as I can.

Attempting any of the links in #312 just sends me to the search engine.

The background page is now giving me this error:

Unable to initialize addon due to error Error: Invocation of form storage.local.get(object) doesn't match definition storage.local.get(optional string or array or object keys, function callback).

This is a _very_ good feedback that cleared a lot! 👍 🔍
Thank you @rogersachan!

Different handling of manifest keys is inconvenient, but can be managed.
But the last error is a show-stopper.

It seems that Edge provides browser.* APIs as callback-only. On top of that presence of browser object prevents webextension-polyfil from being correctly applied. This is very unfortunate, they should either expose callback-only APIs under chrome.* namespace, or add promise support to browser.*.

There is an interesting discussion at https://github.com/mozilla/webextension-polyfill/issues/3.
The upstream ticket at Microsoft about adding promise support was just reopened.

I am marking it as "blocked" until it is resolved upstream, either by Microsoft or Mozilla.

tl;dr

At the moment, neither a working polyfill, nor any other cross browser solution exists.
https://github.com/mozilla/webextension-polyfill/issues/3#issuecomment-335331528

We hear the request for this support. Have reactivated this request, and added to our backlog.
Microsoft Edge Team

@lidel: @rogersachan: Good catches here.

Perhaps I'm missing some context in mozilla/webextension-polyfill#3, but couldn't browser.storage be special-cased and handled in the webextension-polyfill (à la this browser.storage.onRuntime patch)?

Or is it more complicated than that?

@cvan I am afraid fixing browser.storage alone is not enough: another error caused by the lack of promise support will pop up elsewhere.

I did not look at internals of webextension-polyfill, but my intuition is that that polyfills for entire browser.* would have to be sprinkled with code responsible for Edge-case (accidental pun) detection.

Unless it can be solved in one swoop globally, not sure if it is worth the effort, especially now that upstream ticket got reopened.

Update: https://github.com/mozilla/webextension-polyfill/issues/3#issuecomment-393530149 provides a hope of making polyfill work ("guarded on the existence of the Edge-specific msBrowser API")

I did not look at internals of webextension-polyfill, but my intuition is that that polyfills for entire browser.* would have to be sprinkled with code responsible for Edge-case (accidental pun) detection.

I just had to comment that I laughed out loud at this. I will look into this (and the relevant Edge ticket).

Just dropping a quick note that Edge is going to be likely supported once it has been switched to Chromium backend. Let's keep this issue open until that happens.

Refs.

The new Microsoft Edge which is built on chromium (https://www.microsoftedgeinsider.com/en-us/) now supports chrome extensions from the chrome web store, this issue is no longer needed.

@rogersachan thank you for letting us know!
@hacdias are you able to confirm extension loads as expected?

@lidel, seems to be running as expected :smile:

Screenshot 2019-04-12 at 23 15 33

Was this page helpful?
0 / 5 - 0 ratings