Skip to content
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

_bg.wasm Unexpected section: 0x86 #1251

Closed
kpp opened this issue Feb 13, 2019 · 4 comments
Closed

_bg.wasm Unexpected section: 0x86 #1251

kpp opened this issue Feb 13, 2019 · 4 comments

Comments

@kpp
Copy link

kpp commented Feb 13, 2019

How to reproduce:

cd ~/wasm-bindgen/examples/webaudio
npm install
npm build

Output:

ERROR in ./pkg/webaudio_bg.wasm
Module parse failed: Unexpected section: 0x86
You may need an appropriate loader to handle this file type.
Error: Unexpected section: 0x86
    at new CompileError (~/wasm-bindgen/examples/webaudio/node_modules/@webassemblyjs/helper-api-error/lib/index.js:40:109)
    at parseSection (~/wasm-bindgen/examples/webaudio/node_modules/@webassemblyjs/wasm-parser/lib/decoder.js:1542:11)
    at Object.decode (~/wasm-bindgen/examples/webaudio/node_modules/@webassemblyjs/wasm-parser/lib/decoder.js:1559:25)

Because of (I believe so):

$ head -n2 pkg/webaudio.js
/* tslint:disable */
import * as wasm from './webaudio_bg';

How do I fix it?

Linked issue: #1114

@kpp
Copy link
Author

kpp commented Feb 14, 2019

Well. Looks like I failed twice reporting the issue. Duplicate of #1249

@kpp kpp closed this as completed Feb 14, 2019
@BigBigos
Copy link

Are you sure this is a duplicate of another bug?

I had a similar issue, regarding WASM module parse failure. It turned out it was the old version of wasm-parser npm package. Updating webpack to 4.29.4 (which has a newer wasm-parser version as a dependency) fixed this issue.

It seems the webpack version in examples/webaudio has already been bumped in 5e7187a.

@kpp
Copy link
Author

kpp commented Feb 16, 2019

How to update it?

@BigBigos
Copy link

Open package.json and update the webpack version inside:

    "webpack": "^4.29.4",

Or, if you just want to run the webaudio example, pull the recent changes from this repo as it has already been bumped 20h ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants