Skip to content

TypeError: WebAssembly.compile expects a Response object in WebContainer environments #3027

@zion-sati

Description

@zion-sati

Bug description

asc --version no longer works inside web containers (e.g. StackBlitz).

Steps to reproduce

I upgraded the package.json for AssemblyScript to 0.28.17 using the playground found here https://stackblitz.com/edit/learning-assemblyscript-01-t6meir?file=package.json

Then, in the terminal,
npm upgrade
asc --version

And I got the following error:

[TypeError: An argument must be provided, which must be a Response or Promise<Response> object] {
  message: "Failed to execute 'compile' on 'WebAssembly': An argument must be provided, which must be a Response or Promise<Response> object"
}

0.27.x is fine, but as soon as you go 0.28.x, you hit this error.

AssemblyScript version

0.28.x

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions