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

WebGL example fails with unexpected section: <unknown> @+2824 #1267

Closed
bwasty opened this issue Feb 17, 2019 · 8 comments
Closed

WebGL example fails with unexpected section: <unknown> @+2824 #1267

bwasty opened this issue Feb 17, 2019 · 8 comments

Comments

@bwasty
Copy link

bwasty commented Feb 17, 2019

The WebGL Example (Guide Page) fails with this error (Browser console):

CompileError: AsyncCompile: Wasm decoding failed: unexpected section: <unknown> @+2824

I also get the same error when I copy the code to my project that is based on wasm-pack-template.

@xtuc
Copy link
Member

xtuc commented Feb 17, 2019

Interesting, I'll try to repro it. What version of Webpack and webassemblyjs are you using? (Check npm ls).

@bwasty
Copy link
Author

bwasty commented Feb 17, 2019

webpack@4.29.4
@webassemblyjs/ast@1.8.2 (same version also for all other webassemblyjs packages)

Before upgrading to webpack@4.29.4 I had another similar error - the same as here: #1251.

@alexcrichton
Copy link
Contributor

@bwasty can you test out the latest version of wasm-pack and NPM dependencies as well to see if the issue is fixed now?

@bwasty
Copy link
Author

bwasty commented Feb 19, 2019

@alexcrichton No change with

wasm-pack 0.6.0
wasm-bindgen v0.2.37
webpack@4.29.5
@webassemblyjs/*@1.8.3

@alexcrichton
Copy link
Contributor

alexcrichton commented Feb 19, 2019

Oh sorry @bwasty I misunderstood, this is indeed published live and I can see it myself!

@xtuc it looks like webpack may be producing an invalid JS wasm file?

@xtuc
Copy link
Member

xtuc commented Feb 20, 2019

Indeed, Webpack's transformation breaks the Wasm module.

@sendilkumarn
Copy link
Member

@bwasty This will work if you remove the start. We are working on a fix now at xtuc/webassemblyjs#493

xtuc added a commit to xtuc/webpack that referenced this issue Feb 26, 2019
alexcrichton added a commit to alexcrichton/wasm-bindgen that referenced this issue Feb 28, 2019
With rustwasm#1267 now fixed looks like we had an accidental regression sneak
through in the meantime!
@alexcrichton
Copy link
Contributor

Looks like this is now fixed, thanks @xtuc and @sendilkumarn!

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

4 participants