Chrome is looking to permanently drop MV2 extension

Chrome is looking to permanently drop MV2 extension

Chrome 正计划永久放弃 MV2 扩展支持

For a while now the transition away from Manifest V2 (MV2) to MV3 has been on-going and it looks like it is entering its final phase of deprecation, at least, in the case of Google Chrome. 长期以来,从 Manifest V2 (MV2) 向 MV3 的过渡一直在进行中,目前看来,至少在 Google Chrome 浏览器方面,这一进程已进入了弃用的最后阶段。

A recent discussion thread in the w3c WebExtensions Community Group GitHub repo has highlighted how the latest and upcoming versions of the most popular browser are expected to be its final releases with support for MV2 extensions. Chromium contributor Andrey Bershanskiy shared details about recent Chromium changes and according to comments from Google engineer Devlin Cronin, Chrome has now started removing the flags that previously controlled MV2 availability. W3C WebExtensions 社区组 GitHub 仓库中最近的一篇讨论帖指出,这款最受欢迎的浏览器在最新及即将发布的版本中,预计将是最后支持 MV2 扩展的版本。Chromium 贡献者 Andrey Bershanskiy 分享了有关 Chromium 近期变更的细节,根据 Google 工程师 Devlin Cronin 的评论,Chrome 现已开始移除此前用于控制 MV2 可用性的标志(flags)。

kExtensionManifestV2Disabled, the Chromium feature flag that allowed controlled disabling of MV2 add-ons, is now completely removed, which means you will likely no longer find uBlock Origin in your browser extensions list. He wrote: “The kExtensionManifestV2Disabled feature has been default-enabled for over a year. Remove the feature and the effectively-dead code. … Any tests that relied on being in the “warning” phase (i.e., with the kExtensionManifestV2Disabled) for their sole behavior testing are removed, since this stage is no longer reachable.” 此前允许受控禁用 MV2 插件的 Chromium 功能标志 kExtensionManifestV2Disabled 现已被彻底移除,这意味着你很可能无法再在浏览器扩展列表中找到 uBlock Origin。他写道:“kExtensionManifestV2Disabled 功能已默认开启超过一年。移除该功能及实际上已失效的代码……任何仅依赖于处于‘警告’阶段(即带有 kExtensionManifestV2Disabled)进行行为测试的测试用例都已被移除,因为该阶段已无法触达。”

Cronin further explained why MV2 extensions are no longer allowed in supported Chrome versions as maintaining the associated functionality indefinitely is no longer possible. He cited growing technical difficulties and implementation complexities as well as security concerns. He wrote: “MV2 extensions are no longer allowed in any supported version of Chrome, and we are removing support for them and the associated functionality. We won’t be able to provide / maintain this functionality indefinitely due to the complexity and tech debt, as well as the security risks it entails (we’ve actually found a number of bugs that are specific to MV2 lately). Of course, other browsers can continue supporting these if they so desire. Unfortunately, we won’t be putting code behind a compilation flag … We won’t be removing all the MV2 code wholesale right away, so many of these things will continue working for awhile (but they will go away eventually, and some may go away sooner than others).” Cronin 进一步解释了为何受支持的 Chrome 版本不再允许使用 MV2 扩展,因为无限期维护相关功能已不再可能。他提到了日益增长的技术难度、实现复杂性以及安全隐患。他写道:“任何受支持的 Chrome 版本都不再允许使用 MV2 扩展,我们正在移除对它们及相关功能的支持。由于复杂性、技术债务以及由此带来的安全风险(我们最近确实发现了许多 MV2 特有的漏洞),我们无法无限期地提供/维护此功能。当然,其他浏览器如果愿意,可以继续支持它们。遗憾的是,我们不会将代码保留在编译标志之后……我们不会立即全面移除所有 MV2 代码,因此许多功能在一段时间内仍能正常工作(但它们最终会消失,有些可能会比其他功能消失得更快)。”

What this essentially means is that the tricks and bypasses that were used to keep MV2 extensions like uBlock Origin and others alive will not work any more on Chrome, or at least not for very long. For example the Windows Registry mod that could extend MV2 availability will cease to function after Chromium version 151. 这本质上意味着,过去用来维持 uBlock Origin 等 MV2 扩展运行的技巧和绕过方法,在 Chrome 上将不再奏效,或者至少无法维持太久。例如,能够延长 MV2 可用性的 Windows 注册表修改方法,在 Chromium 151 版本之后将失效。

Here is a rundown of the changes coming in the final such releases of Chromium releases: 以下是 Chromium 最终版本中即将发生的变更汇总:

  • Chromium 150 lost ExtensionManifestV2Disabled option
  • Chromium 150 移除了 ExtensionManifestV2Disabled 选项
  • Chromium 151 will loose ExtensionManifestV2Unsupported option
  • Chromium 151 将移除 ExtensionManifestV2Unsupported 选项
  • Chromium 151 will loose ExtensionManifestV2Availability option
  • Chromium 151 将移除 ExtensionManifestV2Availability 选项
  • Chromium 151 will likely loose AllowLegacyMV2Extensions option
  • Chromium 151 很可能移除 AllowLegacyMV2Extensions 选项

Other Chromium-based browsers like Opera and Microsoft Edge could soon follow suit too. Although it is not specified, Edge began disabling uBlock Origin back in February, and Opera could also stop the functioning of MV2 add-ons, even though it had committed to support MV2 for longer in October 2024. 其他基于 Chromium 的浏览器(如 Opera 和 Microsoft Edge)也可能很快效仿。虽然没有明确说明,但 Edge 早在二月份就开始禁用 uBlock Origin,而 Opera 也可能停止 MV2 插件的功能,尽管它曾在 2024 年 10 月承诺会更长时间地支持 MV2。

uBlock Origin developer Raymond Hill (gorhill) apparently stated the following: “For Opera I did submit 1.70.0 rather late, but this was weeks ago. A while ago I received an email from Opera that they plan to abandon MV2-based extension so maybe they are no longer allocating resources for reviewing such extensions.” uBlock Origin 的开发者 Raymond Hill (gorhill) 显然表示:“对于 Opera,我提交 1.70.0 版本确实比较晚,但那也是几周前的事了。前段时间我收到 Opera 的一封邮件,称他们计划放弃基于 MV2 的扩展,所以他们可能不再分配资源来审核此类扩展了。”

The email which developers like Gorhill mentions was received from Opera last year. Here is what it seemingly said: 像 Gorhill 这样的开发者提到的邮件是去年从 Opera 收到的。邮件内容大致如下:

“Dear Developers, This message is to inform you of important upcoming changes regarding Opera extension support. Chromium, which powers Opera, is completely removing support for Manifest Version 2. If your extension currently uses Manifest Version 2, it is crucial that you update it to Manifest Version 3 as soon as possible to ensure continued compatibility. We strongly advise taking action to update your extensions to Manifest Version 3 to avoid any disruption of service and to ensure a smooth transition. — Sincerely, Opera Extensions Team” “亲爱的开发者,此消息旨在通知您有关 Opera 扩展支持的重要变更。为 Opera 提供支持的 Chromium 正在彻底移除对 Manifest Version 2 的支持。如果您的扩展目前使用 Manifest Version 2,请务必尽快将其更新至 Manifest Version 3,以确保持续的兼容性。我们强烈建议您采取行动将扩展更新至 Manifest Version 3,以避免服务中断并确保平稳过渡。—— 诚挚的,Opera 扩展团队”

Hence for now the only Chromium browser that seems to be on-board fully with MV2 support is Brave, and perhaps Vivaldi as well. Meanwhile if you want to ditch Chromium browsers entirely then Mozilla Firefox is an excellent alternative as MV3 and MV2 are both supported. Of course the easiest solution is to switch to uBlock Origin Lite if you want to remain on Chrome, as it is MV3-based, but from our experience, uBO Lite does not seem to be as good as the original non-Lite version. 因此,目前唯一似乎完全支持 MV2 的 Chromium 浏览器是 Brave,或许还有 Vivaldi。同时,如果您想彻底放弃 Chromium 浏览器,Mozilla Firefox 是一个极佳的替代方案,因为它同时支持 MV3 和 MV2。当然,如果您想继续使用 Chrome,最简单的解决方案是切换到 uBlock Origin Lite,因为它是基于 MV3 的,但根据我们的经验,uBO Lite 似乎不如原始的非 Lite 版本好用。