-
Notifications
You must be signed in to change notification settings - Fork 22
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 to Chrome Manifest v3 #241
Comments
We have a kind of a pickle with manifest v3.
So, this needed to be changed:
But, by removing 'unsafe-eval' from CSP, this means our code can't have any of this:
While our code seems ok, some of the node modules we use do have this.
This means Chrome refuses to registrate the service worker (the new background script). During our investigation, we also found that Taxi has the same problem, and that's to the fact it uses grpc-web which in turn uses protcolbuffers JS code generation: shumbo/grpc-web-error-details#3 So, at the time, we are stucked. |
Ideally we can migrate grpc-web to plain JSON over HTTP endpoint for Taxi API. Working on this server side as we speak cc/ @altafan |
Great. I was worried on loosing the information we already gathered so I write it down here. |
The proto defintion is here https://github.com/vulpemventures/taxi-protobuf/blob/master/taxi.proto#L8-L24 the two RPCs becomes
The Swagger JSON as well |
We can now implement the REST interface and drop protobuf dependency. We are going to deploy a testnet instance later today @altafan |
The Taxi daemon on testnet is up&running. It's ready to serve topups paid with tUSDT and can be reached at |
This Issue will be on hold, until we figure out a way to fix the following problems: XMLHttpRequestWith Manifest v3 it is mandatory to use service workers instead of the background script. Workers no longer provide XMLHttpRequest, but instead support the more modern fetch(). Since axios uses XMLHttpRequest, it no longer works. So, all axios calls must be changed to fetch, including all dependencies, and at least ldk is using axios. Further investigation is needed to find out if any other dependencies are using axios. in https://developer.chrome.com/docs/extensions/mv3/migrating_to_service_workers/ WebAssemblyIt seems that Chrome requires script-src: 'unsafe-eval' CSP directive to be active for WebAssembly compilation. But one of the conditions of Manifest v3 is the absence of this directive. So, we cannot have any modules on our dependencies using WebAssembly, but it seems liquid uses it. ConclusionSince we still have a full year where we can still use Manifest v2 (and make upgrades) we’re leaving this Issue on hold. LinksManifest v3 timeline: Discussion about wasm not working in extensions Manifest v3: Lack of XMLHttpRequest |
https://developer.chrome.com/blog/mv2-transition/
The text was updated successfully, but these errors were encountered: