Skip to content
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
Closed

Migrate FF add-on to WebExtensions #523

ameshkov opened this issue Jan 23, 2017 · 18 comments
Assignees
Labels
Milestone

Comments

@ameshkov
Copy link
Member

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
Copy link

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
Copy link
Member Author

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
Copy link

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
Copy link
Member Author

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

@ameshkov
Copy link
Member Author

ameshkov commented Mar 16, 2017

The second thing to handle is settings migration

@BooBerry
Copy link

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
Copy link
Member Author

Yeah, they did a good job indeed:)

@ameshkov ameshkov modified the milestones: 2.6, 3.0 Mar 22, 2017
@ameshkov
Copy link
Member Author

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

@BooBerry
Copy link

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
Copy link
Member Author

I wonder why can't I reproduce it.

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

@BooBerry
Copy link

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
Copy link
Member Author

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
Copy link

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
Copy link
Member Author

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

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

@BooBerry
Copy link

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
Copy link
Member Author

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

@ameshkov
Copy link
Member Author

ameshkov commented Apr 10, 2017

@BooBerry filed a separate issue:
#641

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

@BooBerry
Copy link

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. :)

adguard pushed a commit that referenced this issue Oct 4, 2019
…1497 to master

* commit '2bf4e0d7bbada2f33052195cacc21bbefbca3376':
  feature/1497 update locales
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants