Skip to content

Can't run bash due to missing wasix_32v1:proc_exit2 #469

@tavianator

Description

@tavianator

The following simple script

import { init, Wasmer } from "@wasmer/sdk/node";

await init();

const pkg = await Wasmer.fromRegistry("wasmer/bash");
const instance = await pkg.entrypoint!.run({ args: ["--version"] });
const output = await instance.wait();
console.log(output.stdout);

hangs with only the following output:

$ npx tsx index.ts
using deprecated parameters for the initialization function; pass a single object instead
using deprecated parameters for the initialization function; pass a single object instead
using deprecated parameters for the initialization function; pass a single object instead
using deprecated parameters for the initialization function; pass a single object instead

Adding initializeLogger("trace") prints

 WARN handle{worker.id=2}: wasmer::backend::js::entities::module: import not found wasix_32v1:proc_exit2

DEBUG handle{worker.id=2}: wasmer::backend::js::entities::module: imported shared memory MemoryType { minimum: 133 pages, maximum: Some(65536 pages), shared: true }

ERROR handle{worker.id=2}: wasmer_wasix::state::env: Instantiation failed pid=1 error=RuntimeError: js: WebAssembly.Instance(): Import #44 "wasix_32v1" "proc_exit2": function import requires a callable

DEBUG handle{worker.id=2}: wasmer_js::tasks::worker_message: Sending a worker message current_thread=2 msg=Scheduler(SpawnBlocking(_))

DEBUG handle{worker.id=2}: wasmer_js::tasks::worker_message: Message sent current_thread=2

DEBUG wasmer_js::tasks::scheduler: Sending message to scheduler current_thread=0 msg=SpawnBlocking(_)

DEBUG scheduler{thread_id=0}: wasmer_js::tasks::scheduler: Dropping Scheduler

ERROR handle{worker.id=2}: wasmer_js::tasks::task_wasm: Failed to crate wasi context error=Failed to create the instance - RuntimeError: js: WebAssembly.Instance(): Import #44 "wasix_32v1" "proc_exit2": function import requires a callable

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

    Issue actions