🧩 TypeScript Binding — Troubleshooting

Common issues and fixes when working with the TypeScript binding.


"Engine is not initialized"

Cause: Calling any API before initEngine.

Fix: Always call initEngine({ transport }) once at startup.


"WASM transport not initialized"

Cause: Using transportWasm before initWasmTransport().

Fix: Call await initWasmTransport() before initEngine in the browser.


"World not found" or "World already exists"

Cause: Using a world ID that was never created, or reusing the same ID.

Fix: Call createWorld(worldId) once per world, then reuse the same ID for window/entity/resource calls.


MessagePack / SendQueue Errors

You may see logs like:

example
[Vulfram] vulframSendQueue failed with result X

Cause: Serialization mismatch or invalid payload in the command batch.

Fix: Verify you are passing correct types (arrays, numbers, enums) to createMaterial, createTexture, createGeometry, etc. Avoid passing plain objects where tuple arrays are required.


Frame Loop Not Advancing

Cause: tick() is not called every frame.

Fix: In browsers use requestAnimationFrame. In Node/Bun use a regular timer.


Input Always Empty

Cause: Input state is generated by the input system and only updates during tick().

Fix: Call tick() once per frame and query input after the tick.


Native Library Not Found (Node/Bun)

Cause: Missing or incompatible native core binaries.

Fix: Ensure the correct transport package is installed for your platform, and that your runtime (Node/Bun) matches the binary you installed.

Documentation Vulfram Core