New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate FF add-on to WebExtensions #523

Closed
ameshkov opened this Issue Jan 23, 2017 · 18 comments

Comments

Projects
None yet
3 participants
@ameshkov
Member

ameshkov commented Jan 23, 2017

Here we'll collect everything regarding add-on migration including all the incompatibilities found.

Migrating stored data:
https://blog.mozilla.org/addons/2017/01/20/migrating-to-webextensions-port-your-stored-data/

@ameshkov ameshkov added this to the 3.0 milestone Jan 23, 2017

@BooBerry

This comment has been minimized.

Show comment
Hide comment
@BooBerry

BooBerry Mar 16, 2017

It might be easier than you think.

As an experiment I installed the Firefox extension Chrome Store Foxified which can take Chrome extensions from the Web Store and upload them to AMO and actually sign them if you have an account (which I do), which you can install into Firefox as a WebExtension extension. I didn't think it'd work, but damn, it took 2.5.11 from the Web Store and made it into a working WebExtension for Firefox (using Firefox 52).

And it actually works. Settings open up and respond well rather well (except a lag/delay when importing a user filter, which is the same with the normal Firefox version), and it's actually blocking ads on webpages (plus the Adguard button on the toolbar works along with the blocked ads count). Even the filtering log works!

Of course on AMO's validation results it gives 16 warnings, but no errors and the WebExtension for Firefox actually works from what I can tell.

You might be able to port the Chrome extension to Firefox that way. And it might be pretty straightforward.

BooBerry commented Mar 16, 2017

It might be easier than you think.

As an experiment I installed the Firefox extension Chrome Store Foxified which can take Chrome extensions from the Web Store and upload them to AMO and actually sign them if you have an account (which I do), which you can install into Firefox as a WebExtension extension. I didn't think it'd work, but damn, it took 2.5.11 from the Web Store and made it into a working WebExtension for Firefox (using Firefox 52).

And it actually works. Settings open up and respond well rather well (except a lag/delay when importing a user filter, which is the same with the normal Firefox version), and it's actually blocking ads on webpages (plus the Adguard button on the toolbar works along with the blocked ads count). Even the filtering log works!

Of course on AMO's validation results it gives 16 warnings, but no errors and the WebExtension for Firefox actually works from what I can tell.

You might be able to port the Chrome extension to Firefox that way. And it might be pretty straightforward.

@ameshkov

This comment has been minimized.

Show comment
Hide comment
@ameshkov

ameshkov Mar 16, 2017

Member

It is easy indeed, I've tried it with v2.5 build earlier as well. I am not sure about some known Chromium issues like WebSocket blocking, though.

Member

ameshkov commented Mar 16, 2017

It is easy indeed, I've tried it with v2.5 build earlier as well. I am not sure about some known Chromium issues like WebSocket blocking, though.

@BooBerry

This comment has been minimized.

Show comment
Hide comment
@BooBerry

BooBerry Mar 16, 2017

ws://adguardwebsocket.check/ad.adriver.ru
WebSocket
.adriver.$~object-subrequest
ad.adriver.ru

http://i.imgur.com/prhYrZR.png

Yep, it's doing WebSocket too, it looks like.

BooBerry commented Mar 16, 2017

ws://adguardwebsocket.check/ad.adriver.ru
WebSocket
.adriver.$~object-subrequest
ad.adriver.ru

http://i.imgur.com/prhYrZR.png

Yep, it's doing WebSocket too, it looks like.

@ameshkov

This comment has been minimized.

Show comment
Hide comment
@ameshkov

ameshkov Mar 16, 2017

Member

In that build it uses special Chromium hack to handle WS, we should make FF-specific build to check it.

Member

ameshkov commented Mar 16, 2017

In that build it uses special Chromium hack to handle WS, we should make FF-specific build to check it.

@ameshkov

This comment has been minimized.

Show comment
Hide comment
@ameshkov

ameshkov Mar 16, 2017

Member

The second thing to handle is settings migration

Member

ameshkov commented Mar 16, 2017

The second thing to handle is settings migration

@BooBerry

This comment has been minimized.

Show comment
Hide comment
@BooBerry

BooBerry Mar 16, 2017

I added a screenshot above, it seems to be working rather well.

I'm surprised, I thought WebExtensions support in Firefox wasn't good enough yet. I guess I is? =P

Nonetheless, I'm going to use this on my Linux partitions!

BooBerry commented Mar 16, 2017

I added a screenshot above, it seems to be working rather well.

I'm surprised, I thought WebExtensions support in Firefox wasn't good enough yet. I guess I is? =P

Nonetheless, I'm going to use this on my Linux partitions!

@ameshkov

This comment has been minimized.

Show comment
Hide comment
@ameshkov

ameshkov Mar 16, 2017

Member

Yeah, they did a good job indeed:)

Member

ameshkov commented Mar 16, 2017

Yeah, they did a good job indeed:)

@ameshkov ameshkov modified the milestones: 2.6, 3.0 Mar 22, 2017

@ameshkov ameshkov added the Firefox label Mar 22, 2017

@ameshkov

This comment has been minimized.

Show comment
Hide comment
@ameshkov

ameshkov Mar 22, 2017

Member

We've decided to migrate FF add-on to WebExtensions starting from version 2.6

Member

ameshkov commented Mar 22, 2017

We've decided to migrate FF add-on to WebExtensions starting from version 2.6

atropnikov added a commit that referenced this issue Mar 23, 2017

atropnikov added a commit that referenced this issue Mar 27, 2017

atropnikov added a commit that referenced this issue Mar 30, 2017

@BooBerry

This comment has been minimized.

Show comment
Hide comment
@BooBerry

BooBerry Apr 8, 2017

That's great news. But the issue where there's a momentary browser lockup of a few seconds when first opening the settings, clearing/importing the user filter, etc. is still there, even with a converted WebExtension.

BooBerry commented Apr 8, 2017

That's great news. But the issue where there's a momentary browser lockup of a few seconds when first opening the settings, clearing/importing the user filter, etc. is still there, even with a converted WebExtension.

@ameshkov

This comment has been minimized.

Show comment
Hide comment
@ameshkov

ameshkov Apr 10, 2017

Member

I wonder why can't I reproduce it.

Please try the newer build:
firefox-amo-beta-2.6.0.xpi.zip

Member

ameshkov commented Apr 10, 2017

I wonder why can't I reproduce it.

Please try the newer build:
firefox-amo-beta-2.6.0.xpi.zip

@BooBerry

This comment has been minimized.

Show comment
Hide comment
@BooBerry

BooBerry Apr 10, 2017

Can't install it because it isn't signed (lawl!).

It happens in multiple OSes in Firefox-only. These are the following settings I have enabled (since there's no export yet) which reproduces it 100% of the time. I only have the Indicate the number of blocked ads on the Adguard extension icon setting enabled, along with Phishing and malware protection and Add Adguard item to browser's context menu enabled. All other settings are disabled. For filters I have the English filter, Spyware filter, Annoyances filter and Malware Domains enabled. User filter doesn't matter, BUT if you import a user filter (with 300+ rules) it will freeze/lockup Firefox for a few seconds while importing.

BooBerry commented Apr 10, 2017

Can't install it because it isn't signed (lawl!).

It happens in multiple OSes in Firefox-only. These are the following settings I have enabled (since there's no export yet) which reproduces it 100% of the time. I only have the Indicate the number of blocked ads on the Adguard extension icon setting enabled, along with Phishing and malware protection and Add Adguard item to browser's context menu enabled. All other settings are disabled. For filters I have the English filter, Spyware filter, Annoyances filter and Malware Domains enabled. User filter doesn't matter, BUT if you import a user filter (with 300+ rules) it will freeze/lockup Firefox for a few seconds while importing.

@ameshkov

This comment has been minimized.

Show comment
Hide comment
@ameshkov

ameshkov Apr 10, 2017

Member

Can't install it because it isn't signed (lawl!).

Add-ons -> click on "settings" icon there -> Debug add-ons -> Load temporary add-on

Member

ameshkov commented Apr 10, 2017

Can't install it because it isn't signed (lawl!).

Add-ons -> click on "settings" icon there -> Debug add-ons -> Load temporary add-on

@BooBerry

This comment has been minimized.

Show comment
Hide comment
@BooBerry

BooBerry Apr 10, 2017

That's handy.

Still reproducible though. It seems to lockup/freeze while loading the filter lists and/or user filter, along with importing a large user filter.

BooBerry commented Apr 10, 2017

That's handy.

Still reproducible though. It seems to lockup/freeze while loading the filter lists and/or user filter, along with importing a large user filter.

@ameshkov

This comment has been minimized.

Show comment
Hide comment
@ameshkov

ameshkov Apr 10, 2017

Member

@BooBerry let's sort the first issue (with settings).

Does it freeze every time when you open the settings page?

Member

ameshkov commented Apr 10, 2017

@BooBerry let's sort the first issue (with settings).

Does it freeze every time when you open the settings page?

@BooBerry

This comment has been minimized.

Show comment
Hide comment
@BooBerry

BooBerry Apr 10, 2017

In 2.5.11 it does. But in this newer build it only does if I add the 4 filters above without updating them.

If I add the filters above, enable the settings I have enabled above and import a large user filter then close the settings then reopen it, there's indeed a lockup while it's loading the 4 filter lists. If I update the 4 filters then repeat, it seems to open instantly.

Here's the clincher, I remove the user filter without updating the 4 filter lists and repeat the steps above and guess what? It opens instantly without any type of freeze or lag.

It's related to the user filter loading, more than likely.

BooBerry commented Apr 10, 2017

In 2.5.11 it does. But in this newer build it only does if I add the 4 filters above without updating them.

If I add the filters above, enable the settings I have enabled above and import a large user filter then close the settings then reopen it, there's indeed a lockup while it's loading the 4 filter lists. If I update the 4 filters then repeat, it seems to open instantly.

Here's the clincher, I remove the user filter without updating the 4 filter lists and repeat the steps above and guess what? It opens instantly without any type of freeze or lag.

It's related to the user filter loading, more than likely.

@ameshkov

This comment has been minimized.

Show comment
Hide comment
@ameshkov

ameshkov Apr 10, 2017

Member

@BooBerry yep, you're right, user filters takes quite some time to load

Member

ameshkov commented Apr 10, 2017

@BooBerry yep, you're right, user filters takes quite some time to load

@ameshkov

This comment has been minimized.

Show comment
Hide comment
@ameshkov

ameshkov Apr 10, 2017

Member

@BooBerry filed a separate issue:
#641

Moreover, the very same issue is here with the Chrome extension.

Member

ameshkov commented Apr 10, 2017

@BooBerry filed a separate issue:
#641

Moreover, the very same issue is here with the Chrome extension.

@BooBerry

This comment has been minimized.

Show comment
Hide comment
@BooBerry

BooBerry Apr 10, 2017

It's funny, I've never experienced it with Chrome at all. I'll retest it here in a bit.

Might want to test Edge too, just because. :)

BooBerry commented Apr 10, 2017

It's funny, I've never experienced it with Chrome at all. I'll retest it here in a bit.

Might want to test Edge too, just because. :)

@atropnikov atropnikov closed this Apr 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment