-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Switch to mv3 (Firefox) and make any necessary further changes (Chromium) #350
Comments
We already moved to MV3 in Chrome (protection mode only). So, there is nothing more to be done there. But the question is to which extent is MV3 still relevant for our Firefox version. Ideally, if we still have protection mode in Firefox, then the protection mode extension (for Chrome and Firefox) should have the same code. @sophieeng and @OliverWang13 will look into this. @Jocelyn0830 and @katehausladen, if you could look into how the MV3 changes affect the analysis mode crawler (Firefox only). @Jocelyn0830 opens an issue in the crawler repo to discuss MV3 over there. Here is the last from Firefox. |
In preparation of the new release, @OliverWang13 and i have been looking to the Firefox MV3 status. Because analysis mode has been removed from the OptMeowt extension, we are left with two protection modes: one for Chrome and one for Firefox. The main difference between the two protection modes is which Manifest version they're built for. The Chrome version has been changed to MV3, which involves new service workers and different APIs. Because we are unsure if Firefox MV3 will have the same changes that Chrome had when migrating between versions, we don't want to make Firefox and Chrome the same. We prefer leaving Firefox in MV2 until a list of changes for FF MV3 comes out and we can compare FF MV3 and Chrome MV3. We will reevaluate from there. In the future, it would be nice to have one protection file that works for Chrome and Firefox, but we don't know if that's a possibility. |
@sophieeng will update on the current Firefox MV3 status. |
Firefox has not had any timeline changes to the switch from MV2 to MV3. Currently, both versions are supported on Firefox but developers cannot create an extension that supports both, so they must be able to distribute both types. Firefox began supporting MV3 on November 21, 2022 and has stated they will look for an appropriate timeline to depreciate MV2 near the end of 2023. While we keep monitoring the situation, it would be especially good to check then. Also, I do not see it mentioned but Google has put their own MV3 timeline under review. This means that switching to MV3 has been postponed. In accordance with earlier posts in this issue, we will continue to wait for more clarity on what Firefox's MV3 will require before we make changes to our extension. |
@sophieeng, can you check and report on the status of MV3? The questions are (for both Firefox and Chrome):
|
Chromium: Firefox: |
Thanks, @sophieeng!
It would be great if you could take the lead and prepare a plan (with the help of @OliverWang13, as necessary) on the concrete changes that we need to make. Especially, we need to find out:
@katehausladen, is the crawler also affected by the change to MV3? |
Plan going forward: I'll start comparing the Firefox and Chrome MV3 documentation and make note of where the two browsers may need different code. In general we want to have as similar codebases between the two as we can. I'll look for the Firefox MV2 depreciation timeline at the beginning of 2024 / the Spring semester. |
There are a number of details that go with the switch to MV3. For the time being, I am not opening separate issues. Please add as things come to mind:
|
@OliverWang13 and I have met and solved the problem resulting in bugs with the Website Response and extension icon. These bugs occurred because of the argument We also stumbled upon another slight structural issue surrounding our 3rd party domain storage that should have been fixed for Chrome MV3 but must have slipped through the cracks which we will look into more this week. |
Here is a checklist @OliverWang13 and I put together to go through after implementing MV3 changes:
We are still working through errors with 3rd Party Domain and Website Response dropdown functionality as we mentioned in this weeks meeting. |
For @OliverWang13:
|
@OliverWang13 and I have implemented a new storage system using IndexDB to store 3rd Party Domain data to work around the deprecation of persistent background pages in MV3. This has proven to be a good approach as the 3rd party data is no longer wiped when the background page is terminated, allowing the 3rd Party Domains dropdown to function properly in the popup. We began attempting to use the same approach to tackle problems with the Website Response button dropdown, storing wellknown data fetched in the contentScripts.js using IndexDB. However we have run into problems accessing this data in other background scripts like protection.js, so we are planning on moving forward by instead just fetching and storing this wellknown data within protection.js. |
@OliverWang13 and I have separately implemented changes to tackle issues with the Website Response button dropdown as well as changing the color of the extension icon when a site accepts the GPC signal. Although both functions are working correctly, they are a bit buggy at times only working on some websites once the site is reloaded. This issue seems to be occurring because the wellknown data is stored in the database only after the webpage is reloaded, which was a similar bug we ran into with 3rd party domains. We will continue working through this bug as the week goes on. |
Good progress, @Mattm27! It would be good if you can demo today. |
@OliverWang13 and I have fixed a bug that was occurring with 3rd party domains, in which some 3rd party domains on one site would accumulate within the 3rd party domains drop-down of a separate site although they were not present on the current site. We resolved this issue by storing 3rd party domains based on the tab ID they are associated with using At this point, some refactoring is left to do before we are set for a new release but the migration to MV3 in terms of main functionality now seems to be complete. |
Excellent! Well done! |
Refactoring has been finished, we are now ready to create a new release. |
Excellent! Great work, @Mattm27 and @OliverWang13! @Mattm27, if all tests are passing and the UI tests are good, feel free to create a release in the repo. Also, it would be good if you can create a new release on the Firefox Add On Store. You should have all rights to do so. They might approve it right away but there may also be some back-and-forth. For Chrome, can you provide me a distribution version so that I can create a release on the Chrome Web Store? Before creating the releases be sure to update the version number, permissions, ..., anything else necessary in the manifest files. |
Were you able to make these updates, @Mattm27? |
I have not, but will read through and update today. |
The green ring issue (#460) popped up again (for Firefox). |
Updated distribution manifest (Issue #350)
Both the Firefox Add-on Store and the Chrome Web Store now have v5.0.1 with mv3. @Mattm27, if there is nothing more to do from your end, feel free to close this issue! Great work! |
Especially, if you can confirm, that this is done. |
Yes this is complete. I will close the issue! |
As Firefox is switching to manifest version 3 (mv3) in a couple of months, we should keep an eye on if functionality is breaking, what we need to change, etc. I tend to think that the impact will be a bit more limited than Chrome's switch to mv3 as it is my understanding that Firefox intends to keep some of the deprecated APIs around. However, at the beginning of next year, when Chrome is making the switch, we should address this.
Currently, the timeline of Firefox's switch to mv3 and which APIs will be deprecated is unclear but will become more clear over the next couple of months. Here are some official resources:
Please everyone keep this on the radar. We do not want to wake up one day and everything is broken (and we can't even update anymore on the Firefox Store).
The text was updated successfully, but these errors were encountered: