Skip to content

js_run tool crashes when using fetch #2

@deepfates

Description

@deepfates

Description

The js_run tool crashes with a QuickJS memory error when attempting to use fetch().

Reproduction

bun run examples/js_agent.ts
› Can you fetch https://example.com

Error

Aborted(Assertion failed: list_empty(&rt->gc_obj_list), at: ../../vendor/quickjs-ng/quickjs.c,1954,JS_FreeRuntime)
QuickJSUseAfterFree: Lifetime not alive

Notes

  • The js_run tool has allowFetch: true by default
  • The js tool (persistent REPL) does not have this issue since it doesn't support fetch
  • Likely an issue with @sebastianwessel/quickjs or how we're managing the sandbox lifecycle

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions