Skip to content

Error WASM 'sync/atomic.LoadPointer' is not a Function #1115

@k0mpreni

Description

@k0mpreni

I'm just getting started with Go and WASM.

While uploading an image and decoding it on the WASM side, I have this error on my browser console:
LinkError: import object field 'sync/atomic.LoadPointer' is not a Function.

I don't have it when using the command GOARCH=wasm GOOS=js go build -o lib.wasm main.go.

I used the correct wasm_exec.js file for TinyGo and my compile command is tinygo build -o lib.wasm -target wasm main.go.

I checked and all packages that I'm using seems supported.

Here is the test repository: https://github.com/brainlulz/wasm-go-image
If you use the commange GOARCH=wasm GOOS=js go build -o lib.wasm main.go and change the wasm_exec.js` file it's working.

Any idea where it's comming from ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions