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.

Build: Cannot Fetch WASM

See original GitHub issue

Describe the bug Using electron-serve to serve a wasm file located in a “pkg” subdirectory in project root is fine. However, when running the build executable after using electron:build, the following error is thrown: bootstrap:197 Fetch API cannot load app://./0af963a93f623d39583f.module.wasm. URL scheme "app" is not supported.

To Reproduce Presumably, import a wasm file into a Vue component and use the plugin to build it.

Expected behavior Expected to run correctly like with the electron:serve command

Environment (please complete the following information):

  • OS and version: MacOS Catalina
  • node version: v12.6.0
  • npm version: 6.13.4
  • yarn version (if used): 1.21.1
  • vue-cli-plugin-electron-builder version : 1.4.4
  • electron version: 6.1.7

Additional context Using Rust and wasm-pack to generate wasm files and the js glue files that gets imported by the Vue code.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
vincenikocommented, Dec 29, 2019

Awesome, that fixed the issue! Is there a reason why this isn’t the default functionality?

1reaction
nklaymancommented, Dec 29, 2019

@vinceniko try @crossle’s suggestion, the code snippet to be modified is found in src/background.js.

Read more comments on GitHub >

github_iconTop Results From Across the Web

failed to load wasm application - Stack Overflow
'The server responded with a non-Javascript MIME type of appliaction/WASM'. This error makes no sense to me.
Read more >
Loading and running WebAssembly code - MDN Web Docs
This article provides a reference for the different mechanisms that can be used to fetch WebAssembly bytecode, as well as how to ...
Read more >
Loading WebAssembly modules efficiently - web.dev
When working with WebAssembly, you often want to download a module, compile it, ... const response = await fetch('fibonacci.wasm');
Read more >
Fetch API — Emscripten 3.1.26-git (dev) documentation
What is “No WebAssembly support found. Build with -sWASM=0 to target JavaScript instead” or “no native wasm support detected”? Why do I get...
Read more >
WASM Tutorial - Marco Selvatici
Fetch the latest registry of available tools. ./emsdk update # Download and ... Once Emscripten is installed, we are ready to create our...
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