Blazor.BrowserExtension icon indicating copy to clipboard operation
Blazor.BrowserExtension copied to clipboard

Manifest version 2 project are no longer supported on Google Chrome store

Open miniatarule opened this issue 3 years ago • 10 comments

HI!

Manifest version 2 projects are no longer supported on Google Chrome store. I just tried to submit a Blazor extension with manifest version 2 and I couldn't. Now Google required that all extensions manifest version 3 only.

Are you planning to update the manifest to version 3?

miniatarule avatar Feb 01 '22 03:02 miniatarule

Hi! I am aware of the deprecation of manifest V2 in chrome store. I do plan to add support for manifest V3 as soon as I can. There were a couple of issues earlier preventing from loading wasm in an extension, I will look into it again soon to see if we can start migrating to manifest V3.

mingyaulee avatar Feb 01 '22 05:02 mingyaulee

I will use this issue to track the progress of migrating to manifest v3.

Blockers:

  1. Wasm cannot be loaded in manifest v3
    • Potential workaround 1: compile to single JS file with DotNetJs - requires 'unsafe-eval' which is not allowed in manifest v3
  2. Dynamic import is not allowed in service workers
    • Potential workaround 1: use static import - results in longer load but initialization will be stuck at 1st blocker.

mingyaulee avatar Feb 10 '22 03:02 mingyaulee

Update: Bug Wasm cannot be loaded in manifest v3 is fixed and will likely be released in Chrome version 102.

mingyaulee avatar Apr 14 '22 06:04 mingyaulee

Tested with Chrome Dev channel, manifest v3 can be loaded but Blazor cannot be initialized due to the requirement of 'unsafe-eval' CSP in dotnet runtime, which is resolved and targeted to be released in .Net 7. Source: Make mono CSP Compliant

mingyaulee avatar Apr 21 '22 03:04 mingyaulee

Update:

Blockers:

  1. ~~Wasm cannot be loaded in manifest v3~~
    • Fixed in Chrome 102, tested in Chrome Dev channel
  2. Dynamic import is not allowed in service workers
    • Workaround: use static import
    • Impact: results in slightly longer load time
  3. DotNet runtime requires unsafe eval in CSP which is not allowed in MV3
    • No workaround
  4. Blazor requires unsafe eval in CSP which is not allowed in MV3
    • No workaround

mingyaulee avatar Apr 22 '22 02:04 mingyaulee

是否可以理解 当 ,net7 正式版发布的时候, 上述问题就全都被解决了吗可以支持MV3了?

gitlsl avatar May 02 '22 06:05 gitlsl

@gitlsl .Net 7和Blazor还没有解决CSP的问题。一旦解决了还需要再测试能否用MV3来启动Blazor。

mingyaulee avatar May 04 '22 11:05 mingyaulee

@mingyaulee 似乎已经解决了

gitlsl avatar Jul 02 '22 15:07 gitlsl

Has anyone been able to get this running using manifest v3?

davidchavezgrant avatar Jul 07 '22 01:07 davidchavezgrant

The issue in dotnet/runtime#68374 is still open. Dotnet runtime still requires unsafe-eval CSP directive which is not allowed in MV3.

mingyaulee avatar Jul 27 '22 02:07 mingyaulee

Good news! Manifest V3 is now supported, with .Net 7 RC1 released.

Please read on this in the project README, migration guide is provided.

Any problem should be reported as new issue. This issue will be closed now.

Note: The dotnet.js runtime in .Net 7 is still not CSP compliant. We are now using a custom build of dotnet.js runtime which is built from the source code with modifications to make it CSP compliant, this will be used until .Net 8 is released.

mingyaulee avatar Sep 16 '22 17:09 mingyaulee