question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Wasm not worked in edge

See original GitHub issue

Bug report

What is the current behavior? wasm is not usable on edge

If the current behavior is a bug, please provide the steps to reproduce.

  • create a wasm module and import it
    import("my_wasm_module").then(m => m.greet())
    
  • open edge (not chromium kernel) it would complains about TypeError: Response expected
  • open edge (chromium kernel): everything works

What is the expected behavior? the wasm would generate code like this

var req = fetch(__webpack_require__.p + "" + {"b819":"b6527e0fa9c3d95b89bc"}[wasmModuleId] + ".module.wasm");
promise = WebAssembly.instantiateStreaming(req, importObject);

According to docs, the first argument should be “A Response object or a promise that will fulfill with one”, it should be happy with Promise<Response> but actually not on edge.

And I have tried in console

fetch("/my_wasm_module.wasm")
    .then(r => WebAssembly.instantiateStreaming(r, importObject))
    .then(x => console.log(x))

and works.

Other relevant information: webpack version: “4.42.0” Node.js version: v12.16.1 Operating System: Windows 10 18362.720 Additional tools: Edge (bundled with windows, not chromium kernel)

I do know it is bug in Edge, but I think we should have workaround in webpack for a wide used browser if possible.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
henriiikcommented, Apr 6, 2020

We had this issue and finally tracked it down. The promise object was being pollyfilled and that was what was causing the problem.

We are using babel and we were manually importing regenerator-runtime/runtime and core-js/stable in our entrypoint and this was the source of the problem.

We switched to using @babel/plugin-transform-runtime and that was the solution.

0reactions
alexander-akaitcommented, Jul 21, 2020

Closing due to inactivity. Please test with latest version and feel free to reopen if still regressions. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

This browser does not support WebAssembly - Edge
1] Enable WebAssembly in Edge · Open the Microsoft Edge browser. · Press the Enter key. · Type WebAssemby in the Search bar...
Read more >
Edge 97.0.1072.69 : This browser does not support ...
Hello, I can't figure out why in my version of edge (stable 97.0.1072.69), the absolutely cannot access webassembly sites like mudblazor.com ...
Read more >
Microsoft Edge - WebAssembly is not defined #137704
It looks like in your case Edge doesn't support WebAssembly. WebAssembly is a web technology that is vital for vscode.dev/gh.dev and without it ......
Read more >
How to enable WebAssembly in Microsoft Edge
Option 1: Use Firefox or Chrome. Firefox and Chrome always support WebAssembly by default, so using either of these browsers should work fine ......
Read more >
Browser Compatibility of WebAssembly on Microsoft Edge 93
WebAssembly is · Fully Supported on · Microsoft Edge 93. To put it simply, if your website or web page is using WebAssembly,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found