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

Manifest V3: Master branch is now Manifest V3 #6876

Closed
WorldLanguages opened this issue Nov 17, 2023 · 65 comments
Closed

Manifest V3: Master branch is now Manifest V3 #6876

WorldLanguages opened this issue Nov 17, 2023 · 65 comments
Labels
platform: chrome Related to Chrome / ChromeOS platform: firefox Related to Firefox (All those darn bugs only on firefox) priority: 1 Critical. Includes security bugs and release blockers scope: core Related to the core script/extension workings scope: development Related to developing, documentation, DevEx, etc. scope: meta Related to the meta of the development (repository, store, etc) scope: upstream Related to something we depend on (like Scratch, a library, or the browser) type: announcement Official announcements

Comments

@WorldLanguages
Copy link
Member

WorldLanguages commented Nov 17, 2023

See pull request: #7387

The news

Google recently announced that they will begin disabling Manifest V2 extensions in pre-stable versions of Chrome (Dev, Canary, and Beta) as early as June 2024, in Chrome 127 and later. Users impacted by the rollout will see Manifest V2 extensions automatically disabled in their browser and will no longer be able to install Manifest V2 extensions from the Chrome Web Store. "We expect it will take at least a month to observe and stabilize the changes in pre-stable before expanding the rollout to stable channel Chrome, where it will also gradually roll out over time."
They have announced this already one year ago, but most likely this will actually happen this time.

What does this mean for Scratch Addons?

We will upload a Manifest V3 version of the extension to the Chrome Web Store before June 2024.
As an indirect consequence, our minimum browser requirements will be affected as well. We currently support, to some extent, browsers versions as old as Chrome 80, released in 2020. We will increase the minum requirement to, at least, Chrome 92 (mid-2021). Older browsers won't be able to run the extension, as they don't know what a manifest three extension is, so it's not possible to show a "unsupported browser" screen in those cases.

Plans on end-user browser support

This is the plan I had in mind to keep up with Chrome's requirements.

  1. Add the "export settings" and "view settings as file" buttons to the Unsupported Browser page.
    This will allow users running old browser versions to export their settings before the extension goes away.

  2. We will release a typical MV2 update which will increase the minimum browser requirements to match the MV3 requirements.
    We will not change our minimum browser requirements as we upgrade to MV3. We will do it earlier. As I said, we can't show any screens or buttons to Chrome versions that don't support basic MV3 functionality, so we have to block them from using the extension earlier.

Plans on local development and browser support

Our current MV2 extension has a manifest.json file at root which is accepted by both Chrome and Firefox. They both log warnings, but the raw extension folder as uploaded to GitHub is accepted by both.
We plan to change the manifest_version of our manifest file to 3, so all local development will use an MV3 extension, both in Chrome and Firefox.

This means contributors will need modern Firefox versions that support MV3, as well as modern Chromium versions that don't reject Firefox-friendly manifest files. Apparently, it's going to be Chrome 121+ and Firefox 121+ (coincidentally, it's the same version number!)

The Installing - scratchaddons.com page will need tweaking to clarify this discrepancy between min browser for releases and min browser for development. It would also be nice if that page was more intuitive, as the install buttons don't look like buttons, and it's one of the most visited pages on our website.

As a side-effect, this could mean we could take advantage of CSS nesting and other features, and transpile the CSS when sending the releases to the stores, for wider browser support. This is just a comment, though.

Background pages, service workers, and addons

Some of the "core" extension code will need some changes. But userscripts, userstyles, the settings page, and most parts of the extension every-day contributors check, won't be affected.

@WorldLanguages WorldLanguages added priority: 1 Critical. Includes security bugs and release blockers platform: firefox Related to Firefox (All those darn bugs only on firefox) platform: chrome Related to Chrome / ChromeOS scope: meta Related to the meta of the development (repository, store, etc) scope: core Related to the core script/extension workings scope: upstream Related to something we depend on (like Scratch, a library, or the browser) scope: development Related to developing, documentation, DevEx, etc. labels Nov 17, 2023
@WorldLanguages WorldLanguages pinned this issue Nov 17, 2023
@WorldLanguages
Copy link
Member Author

Please send a post if you have any questions. I could have forgotten some answers in the first post of this issue.

@DNin01
Copy link
Member

DNin01 commented Nov 17, 2023

Agreed with releasing an MV2 version of the extension for the purpose of disabling it in browsers that won't support the MV3 version.

I think a good time to show any unsupported browser notifications would be as the user opens the Scratch website. We should only open the page automatically once (ever) or every time the user tries to open the Scratch Addons popup or settings page. We could also open the page automatically once per session, when the user visits Scratch, but the user would need to disable or remove the extension to prevent this page from continuing to open. Opening it every time the user visits Scratch would essentially block them from using Scratch if they didn't know how to disable or remove the extension.

We may also want to clarify that we're no longer supported by their browser and that they should update it.

@WorldLanguages
Copy link
Member Author

Don't forget we already have an Unsupported Browser page

@WorldLanguages
Copy link
Member Author

WorldLanguages commented Nov 18, 2023

Updated 9 March 2024

Some Chrome version facts to consider:

  • Chrome 87 and below don't know what manifest version 3 is, so they can't even load the extension.
  • Chrome 92 and older require the background service worker to be at root (for example, /background/sw.js is not root). The extension continues to work normally, but with no background context available.
  • Only Chrome 92 and above can load background service workers with import syntax of them.
  • MV3 extensions cannot use webRequestBlocking, and its replacement declarativeNetRequest always asks for user permission, which is not nice. A permission called declarativeNetRequestWithHostAccess doesn't ask the user for permission, but it's only available since Chrome ~95 96.

So most likely this is what we'll attempt to support in our store releases:

  • Older than Chrome 88: extension cannot be installed in any way.
  • Older than Chrome 93: can be installed, will display Unsupported Browser page when clicked. No background runtime context available.
  • Chrome 93, 94, 95: some Scratch Messaging features might be broken, or we might add declarativeNetRequest to the optional permissions and ask these users to grant it.
  • Chrome 96+ (Chrome versions from November 2021 and newer) ideally should have full support for core extension features and most addons.

@BroJac5246
Copy link
Contributor

So most likely this is what we'll attempt to support in our store releases:

  • Older than Chrome 88: extension cannot be installed in any way.

👍

  • Older than Chrome 93: can be installed, will display Unsupported Browser page when clicked. No background runtime context available.

👍

  • Chrome 93, 94, 95?: some Scratch Messaging features might be broken, or we might add declarativeNetRequest to the optional permissions and ask these users to grant it.

Those people really need to update their browser for security. Even if they're running Windows 8/8.1 or 7, they can update to I think 109. So we're not really cutting anyone out and we shouldn't give anyone a subpar experience. Plus then that's more work on our end to support probably like 5 users.

  • Chrome 95+ (Chrome versions from ~October 2021 and newer) ideally should have full support for core extension features and most addons.

👍

@DNin01
Copy link
Member

DNin01 commented Nov 18, 2023

  • Chrome 93, 94, 95?: some Scratch Messaging features might be broken, or we might add declarativeNetRequest to the optional permissions and ask these users to grant it.

Those people really need to update their browser for security. Even if they're running Windows 8/8.1 or 7, they can update to I think 109. So we're not really cutting anyone out and we shouldn't give anyone a subpar experience. Plus then that's more work on our end to support probably like 5 users.

Yeah, that's not many versions to drop support for when we're already dropping support for < 93.

@Samq64
Copy link
Member

Samq64 commented Nov 18, 2023

Those people really need to update their browser for security. Even if they're running Windows 8/8.1 or 7, they can update to I think 109. So we're not really cutting anyone out and we shouldn't give anyone a subpar experience. Plus then that's more work on our end to support probably like 5 users.

I think it's mostly older chromebooks that will be left out because they don't get very good support although I think it's gotten better.

@BroJac5246
Copy link
Contributor

Those people really need to update their browser for security. Even if they're running Windows 8/8.1 or 7, they can update to I think 109. So we're not really cutting anyone out and we shouldn't give anyone a subpar experience. Plus then that's more work on our end to support probably like 5 users.

I think it's mostly older chromebooks that will be left out because they don't get very good support although I think it's gotten better.

Google just upped the support to 10 years, so hopefully this won't be a problem in the future. But here, it's a good bit of work for just a few users on three months' worth of the platform, so it's probably not worth it.

@GrahamSH-LLK
Copy link
Member

We should probably add a message on extensions that are currently supported but won't be, right? Like a headsup

@WorldLanguages
Copy link
Member Author

We should probably add a message on extensions that are currently supported but won't be, right? Like a headsup

Users will still be able to export their settings for a reasonable period, so there's no real reason to notify them before that.

@DNin01
Copy link
Member

DNin01 commented Dec 1, 2023

Should we start an mv3 branch for breaking changes? MV3 pull requests could merge into that branch, which could then be merged into master once we're ready.

For admins (click to expand)

Don't forget about the rules (you know, requiring 2 approvals per pull request). Here's a screenshot of how they might be configured now. Maybe split it up into multiple rulesets named appropriately if you wish.

Things have evolved since we added branch protection rules to the master branch - an admin can create what's called a ruleset here. AFAIK, branch rules work in tandem with branch protections, but this would be a good time to make the switch to rules.

@WorldLanguages
Copy link
Member Author

Yeah, I think we'll create an mv3 branch at some point.

@DNin01
Copy link
Member

DNin01 commented Dec 5, 2023

Yeah, I think we'll create an mv3 branch at some point.

Yeah, right. Not right now.

@Hans5958
Copy link
Member

Should we start an mv3 branch for breaking changes? MV3 pull requests could merge into that branch, which could then be merged into master once we're ready.

Reminder that we already have https://github.com/ScratchAddonsMV3/ScratchAddons, just because at that time we can't make forks on the same organization.

@Waakul
Copy link
Contributor

Waakul commented Feb 21, 2024

i recommend we release this update as 2.0

@BroJac5246
Copy link
Contributor

i recommend we release this update as 2.0

That would be great but we don't have any 2.0 features to introduce.

@WorldLanguages
Copy link
Member Author

@Waakul Provide enough details or a step-by-step reproduction for both issues please.

@WorldLanguages
Copy link
Member Author

I created draft PR #7387 and protected the branch. Most additional discussion about the concrete code changes should belong there.

@Waakul
Copy link
Contributor

Waakul commented Apr 30, 2024

@Waakul Provide enough details or a step-by-step reproduction for both issues please.

It just happens so randomly.

@WorldLanguages WorldLanguages changed the title Manifest V3 branch available as of 2024-apr-23 (branch mv3) Master branch is now Manifest V3 May 11, 2024
@WorldLanguages
Copy link
Member Author

The master branch is now a Manifest V3 extension.

@WorldLanguages
Copy link
Member Author

WorldLanguages commented May 11, 2024

Before releasing to 10% of Chrome users:

  • Ensure gen-manifest.mjs action works properly and as expected
  • Remove "prerelease" from version
  • Run gen-manifest.mjs and check its outputs
  • Test upgrade using upgrade tool (see comment above) Tested in Chromium 121
  • Do some general manual testing in minimum Chrome & Firefox versions
  • Do some general manual testing in up-to-date Chrome & Firefox versions

@Hans5958 Hans5958 changed the title Master branch is now Manifest V3 Manifest V3: Master branch is now Manifest V3 May 12, 2024
@WorldLanguages
Copy link
Member Author

Sent v1.38.0 for review in Chrome Web Store. Did not submit to any other stores yet.

Also pending: add v1.38.0 to scratchaddons.com/changelog

@WorldLanguages
Copy link
Member Author

There are two problems, the indicate when not signed in setting of the badge addon just triggers randomly. The stylesheets blink sometimes.

@Waakul Do you still experience any of the two issues? I believe the latter was fixed.

@Waakul
Copy link
Contributor

Waakul commented May 13, 2024

There are two problems, the indicate when not signed in setting of the badge addon just triggers randomly. The stylesheets blink sometimes.

@Waakul Do you still experience any of the two issues? I believe the latter was fixed.

I'll start to use mv3 until it happens again.

@WorldLanguages
Copy link
Member Author

Okay, v1.38.0 is being rolled out to a small portion of Chrome users. I will send any relevant feedback form submissions here.

@WorldLanguages
Copy link
Member Author

WorldLanguages commented May 17, 2024

No relevant feedback / CWS reviews yet. Increased "percentage of users to deploy this version to" to 35%

(Well actually, someone on the Discord server said they felt the settings page takes longer to load, but that's not really a surprise)

@Waakul
Copy link
Contributor

Waakul commented May 17, 2024

There are two problems, the indicate when not signed in setting of the badge addon just triggers randomly. The stylesheets blink sometimes.

@Waakul Do you still experience any of the two issues? I believe the latter was fixed.

I feel it's fixed.

@WorldLanguages
Copy link
Member Author

Feedback form submission:

changes like the opacity slider and the number inputs in color picker are not working

Probably unrelated to Manifest V3.

@WorldLanguages
Copy link
Member Author

At least 10,000 users are running the Manifest V3 version as of yesterday

Increased coverage to 60%
Will update to Firefox and Edge stores in a few days at most

@WorldLanguages
Copy link
Member Author

Some more feedback messages

Ever since I saw the Update UI lately my custom colors on the home page and studio would go to the OG Scratch color then in my color in a couple 1-3 sec.

i am temporarily uninstalling scratch addons because there's a glitch that psses me the #$@ off
there will be times when the site reverts back to the white-purple color scheme rather than the black-orange scheme i made for it. pls fix this, i'll be using stylify to sort this issue until then

Hey, scratch addon team, you are a part of my daily life as I use Scratch daily. I have noticed that your dark-mode addon has became a little slow after the update. It sometimes takes 1-7 seconds to load which I find a little irritating. Can you fix it or tell me if it's a problem in my browser or something?

@DNin01
Copy link
Member

DNin01 commented May 20, 2024

Yeah, I kind of expected that…

I would pause the rollout until we fix this.

@WorldLanguages
Copy link
Member Author

I will not pause the rollout

@WorldLanguages
Copy link
Member Author

We received ~5 feedback messages out of 50,000 users. You're welcome to add a notice to the feedback form where we clarify that we're aware of this issue.

@BroJac5246
Copy link
Contributor

Yeah, I kind of expected that…

I would pause the rollout until we fix this.

We can make those two issues super high-priority but we should also get MV3 out as soon as possible because MV2 will officially/supposedly be disabled in Chrome 127 (which Chrome Dev is currently on) — the deadline to avoid losing the "featured" badge is June as well.

@WorldLanguages
Copy link
Member Author

Okay, one more.

For the manifest V3, sometimes, a bug appears where my scratch page goes normal for a few seconds and then it inputs the addons in

Surprisingly, no one complained about the Scratch Notifier notification ping, nor about unprocessed HTML in notifications.

@WorldLanguages
Copy link
Member Author

I'm uploading the Firefox build of v1.38.0 to the Firefox store.

About half of Chrome Web Store users are on the Manifest V3 build and it keeps increasing.
Haven't uploaded to the Edge store yet.

@WorldLanguages
Copy link
Member Author

WorldLanguages commented May 22, 2024

Firefox feedback:

I'm using Firefox for Android. The new "experimental update" completely stops the extension from working

I'll attempt to debug the extension by using this guide: https://extensionworkshop.com/documentation/develop/developing-extensions-for-firefox-for-android/#debug-your-extension

EDIT: moved to dedicated issue #7461

@WorldLanguages
Copy link
Member Author

Looks like the error in Firefox for Android is Uncaught TypeError: chrome.contextMenus is undefined.

@WorldLanguages
Copy link
Member Author

Okay, I give up. I have been trying to load an unpacked extension into Firefox Nightly for Android using web-ext for the last hour, and I cannot get it to work. So I'm only able to inspect the released version of the extension.
Here is the guide to load any extension into Android through USB and adb: https://extensionworkshop.com/documentation/develop/developing-extensions-for-firefox-for-android/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: chrome Related to Chrome / ChromeOS platform: firefox Related to Firefox (All those darn bugs only on firefox) priority: 1 Critical. Includes security bugs and release blockers scope: core Related to the core script/extension workings scope: development Related to developing, documentation, DevEx, etc. scope: meta Related to the meta of the development (repository, store, etc) scope: upstream Related to something we depend on (like Scratch, a library, or the browser) type: announcement Official announcements
Projects
None yet
Development

No branches or pull requests

8 participants