Skip to content

wasm error: function import requires a callable in 1.12 beta2 #30052

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

Closed
advdv opened this issue Feb 1, 2019 · 3 comments
Closed

wasm error: function import requires a callable in 1.12 beta2 #30052

advdv opened this issue Feb 1, 2019 · 3 comments

Comments

@advdv
Copy link

advdv commented Feb 1, 2019

What version of Go are you using (go version)?

$ go version
go1.12beta2 darwin/amd64

Does this issue reproduce with the latest release?

It works with go 1.11

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/adam/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/adam/Projects/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/8g/sd7s1zr94f948ds6_q0v3q180000gn/T/go-build940179440=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

I followed the wiki article on using web assembly: https://github.com/golang/go/wiki/WebAssembly. i to complete the "Getting Started" part with Go 1.12 when navigating with Chrome 71 to localhost:8080 it shows an error.

Upgrading to chrome 72 fixes the issue

What did you expect to see?

I expected it to work and show "Hello, WebAssembly" in the console.

What did you see instead?

When navigating to the localhost:8080 the developer console shows the following error:

(index):1 Uncaught (in promise) LinkError: WebAssembly Instantiation: Import #5 module="go" function="runtime.scheduleTimeoutEvent" error: function import requires a callable
Promise.then (async)
(anonymous) @ (index):7
@agnivade
Copy link
Contributor

agnivade commented Feb 1, 2019

I would be surprised if a simple hello world does not work in Chrome 71 but works in Chrome 72. Are you sure this is not caused by an incorrect wasm_exec.js ?

Please see #29827.

@advdv
Copy link
Author

advdv commented Feb 1, 2019

Thank you for the quick response! That was my though also so i copied the wasm_exec again after installing go1.12: cp "$(go env GOROOT)/misc/wasm/wasm_exec.js" .. I'm now trying to revert back to 71 but it apparently pretty difficult...

@advdv
Copy link
Author

advdv commented Feb 1, 2019

I tried it again on my old version of Chrome and it now seems to work fine again, maybe the old wasm_exec.js was still loading from my browsers cache? Hard to say after the fact. Anyway, thank you for the quick response, i'll close this issue!

@advdv advdv closed this as completed Feb 1, 2019
turutcrane added a commit to turutcrane/cefingo-sample that referenced this issue Mar 3, 2019
turutcrane added a commit to turutcrane/cefingo-sample that referenced this issue Mar 3, 2019
@golang golang locked and limited conversation to collaborators Feb 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants