Skip to content

Enabling Asyncify breaks module: Module.dynCall_i is not a function #25551

@pixelomer

Description

@pixelomer
Uncaught (in promise) TypeError: Module.dynCall_i is not a function
    invoke_i http://localhost:8000/build/MyProject.js:1
    wrapper http://localhost:8000/build/MyProject.js:1
    callMain http://localhost:8000/build/MyProject.js:1
    doRun http://localhost:8000/build/MyProject.js:1
    run http://localhost:8000/build/MyProject.js:1
    createModule http://localhost:8000/build/MyProject.js:1
    load http://localhost:8000/wrapper.js:71
    <anonymous> http://localhost:8000/main.js:1
MyProject.js:1:129537

The link flags are as follows:

set_target_properties(MyProject PROPERTIES LINK_FLAGS "-s WASM=1 -s MAIN_MODULE=1 \
    -s ERROR_ON_UNDEFINED_SYMBOLS=0 -s EXPORT_NAME=createModule -s MODULARIZE=1 \
    -s FORCE_FILESYSTEM -s EXPORTED_RUNTIME_METHODS=[\"FS\"] -s WASMFS=1 -fPIC -fexceptions --no-entry \
    -z muldefs -s ALLOW_MEMORY_GROWTH -s ASYNCIFY -s DYNCALLS -s ASYNCIFY_DEBUG -lasync.js \
    -s ASYNCIFY_ONLY=[\"extractFile(std::__2::basic_string<char?.std::__2::char_traits<char>?.std::__2::allocator<char>>)\"] ")

Adding/removing -s DYNCALLS and/or -lasync.js seems to have no effect. The project works fine when Asyncify is not enabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions