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

error on init (__wbindgen_cb_forget) #1543

Closed
derekdreery opened this issue May 18, 2019 · 0 comments · Fixed by #1544
Closed

error on init (__wbindgen_cb_forget) #1543

derekdreery opened this issue May 18, 2019 · 0 comments · Fixed by #1544
Labels

Comments

@derekdreery
Copy link
Contributor

Describe the Bug

In browser the wasm fails to load with:

LinkError: import object field '__wbindgen_cb_forget' is not a Function

Steps to Reproduce

  1. Update wasm-bindgen-cli and wasm-pack to latest release
  2. git clone https://github.com/derekdreery/dodrio-realworld-starter-kit
  3. cd dodrio-realworld-starter-kit
  4. wasm-pack build --target web
  5. python -m http.server (or your fave static file server)
  6. go to http://localhost:<your_port>

Expected Behavior

You see a web page with some stuff in it

Actual Behavior

A blank page plus the aforementioned error message.

Additional Context

I tried adding in the export of __wbindgen_cb_forget manually and it all works then! So I guess the error is to do with it not getting exported. I tried to understand the code and failed.

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

Successfully merging a pull request may close this issue.

1 participant