Skip to content

Cannot instantiate WebAssembly #11

Closed
@matsbror

Description

@matsbror

I am following the instructions to "Instantiate the Game of Life via JavaScript". At this point, I get the following error when trying to instantiate:
Uncaught (in promise) LinkError: WebAssembly Instantiation: Import #1 module="env" function="__memory_base" error: global import must be a number or WebAssembly.Global object

This makes it impossible to reach the exports.

Attaching my javascript/html code as text.
index.html.txt

Activity

matsbror

matsbror commented on Nov 22, 2018

@matsbror
Author

So I found out the reason. With later version of emcc replace memoryBase with __memory_base and tableBase with __table_base

sayantan-sadhukhan

sayantan-sadhukhan commented on Aug 14, 2022

@sayantan-sadhukhan

not working by replacing the table with __table_base & the memory with __memory_base ,the error is still there for me!

script.js:31 Uncaught (in promise) LinkError:
WebAssembly.instantiate(): Import #0 module="env" function="exit" error: function import requires a [callable]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @matsbror@sayantan-sadhukhan

        Issue actions

          Cannot instantiate WebAssembly · Issue #11 · googlecodelabs/web-assembly-introduction