Skip to content

TS 2.0.4 Migration Failed - WASM Bad Magic Number #4621

@NullP0inter

Description

@NullP0inter

I received the following error message when attempting to step up from 2.0.3 to 2.0.4. I have tested and I can switch back to 2.0.3 and I can keep things progressing on my prototype. If I am going to use this in production, I want to learn to debug these types of errors better. Are there any recommendations on how I can further investigate this and hopefully find what in my setup is causing the issue?

ARM Windows Host running spacetimedb on WSL Ubuntu 24. Using typescript for both backend and frontend.
These are my upgrade steps.

  • spacetime version upgrade
  • pnpm update spacetimedb && pnpm install
  • (cd spacetimedb && pnpm update spacetimedb && pnpm install)

2026-03-12T02:31:21.980674Z INFO /home/ubuntu/actions-runner-linux-arm64-2.309.0/_work/SpacetimeDB/SpacetimeDB/crates/core/src/host/host_controller.rs:778: launching module db=c20061e34b07d1ea0ecf28081075dfbe44302b9add2b41e65b9c394b3aa58ec1 replica=8000001 program=22a38cc26993d622b05f95042a9b576ae4a2d863bca6a04d72fffe1d9487ef24 host_type=Wasm
2026-03-12T02:31:21.982838Z INFO crates/core/src/db/durability.rs:195: durability worker actor done
2026-03-12T02:31:21.982855Z ERROR /home/ubuntu/actions-runner-linux-arm64-2.309.0/_work/SpacetimeDB/SpacetimeDB/crates/client-api/src/lib.rs:627: internal error: error starting database: failed to init replica 8000001 for c20061e34b07d1ea0ecf28081075dfbe44302b9add2b41e65b9c394b3aa58ec1: failed to parse WebAssembly module: magic header not detected: bad magic number - expected=[
0x0,
0x61,
0x73,
0x6d,
] actual=[
0x69,
0x6d,
0x70,
0x6f,
] (at offset 0x0): failed to init replica 8000001 for c20061e34b07d1ea0ecf28081075dfbe44302b9add2b41e65b9c394b3aa58ec1: failed to parse WebAssembly module: magic header not detected: bad magic number - expected=[
0x0,
0x61,
0x73,
0x6d,
] actual=[
0x69,
0x6d,
0x70,
0x6f,
] (at offset 0x0)
2026-03-12T02:31:21.982901Z INFO /home/ubuntu/actions-runner-linux-arm64-2.309.0/_work/SpacetimeDB/SpacetimeDB/crates/durability/src/imp/local.rs:340: close local durability
2026-03-12T02:31:21.982915Z INFO /home/ubuntu/actions-runner-linux-arm64-2.309.0/_work/SpacetimeDB/SpacetimeDB/crates/durability/src/imp/local.rs:267: exiting durability actor
2026-03-12T02:31:21.982928Z INFO crates/core/src/db/durability.rs:158: [c20061e34b07d1ea0ecf28081075dfbe44302b9add2b41e65b9c394b3aa58ec1] durability worker shut down at tx offset: Some(156)
2026-03-12T02:32:57.997794Z INFO crates/core/src/auth/token_validation.rs:210: Fetching key for issuer https://auth.spacetimedb.com

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