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.

CompileError using webpack: Missing mediainfo.wasm

See original GitHub issue

Hey there!

It seems like there is a bug. Here is what I’m getting when playing around with the library using create react app template:

Uncaught (in promise) RuntimeError: abort(CompileError: WebAssembly.instantiate(): expected magic word 00 61 73 6d, found 3c 21 44 4f @+0). Build with -s ASSERTIONS=1 for more info.
    at abort (http://localhost:3000/static/js/1.chunk.js:3145:17)
    at http://localhost:3000/static/js/1.chunk.js:3239:15

That’s how the lib is being imported:

import MediaInfo from 'mediainfo.js'

Any suggestions? Thanks!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
buzzcommented, Jun 8, 2020

The WASM loader tries to load mediainfo.wasm. It determines the URL relative to mediainfo.js. When using a CDN this just works because mediainfo.wasm is published in the dist folder.

When you’re using a custom bundler build flow you need to make sure to copy mediainfo.wasm to your output directory. Check the source code of https://mediainfo.js.org/ on how this is achieved using webpack and copy-webpack-plugin.

Docs on using a JS bundler could be improved, I guess.

0reactions
dcfrancacommented, Apr 30, 2021

I made it work loading from the CDN! thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

I want to use mediainfo.js in React.js without 'eject' command
I solved it using "WebWorker". // config-override.js const path = require("path"); const { resolve } = require('path'); const CopyPlugin ...
Read more >
node-mediainfo - npm Package Health Analysis - Snyk
The npm package node-mediainfo was scanned for known vulnerabilities and missing license, and no issues were found. Thus the package was deemed as...
Read more >
Testing - Release Notes - Liferay Issues
Documentation. [LPS-124867] - The Localizable field is missing in new Data Engine Editor ... [LPS-69125] - Documents and Media Info Panel use correct...
Read more >
mozilla-release: pushlog - Mercurial
IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release ... is added to test indexes and cursors with wasm; r=asuth a=jcristau.
Read more >
ChangeLog.openSUSE-Leap-15.4-x86_64-aarch64-ppc64le ...
+ csync -- Add fix-missing-const.patch: Fix a compile error on Leap 15.1 ... mc.ext: support fb2 e-books (#4167) + - ext.d: use mediainfo...
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