Skip to content

PyodideBridge should clear initPromise on init failure to allow retry #116

@bbopen

Description

@bbopen

Problem

If loadPyodide or loadPackage fails during initialization, initPromise remains rejected and is never cleared. Subsequent calls return the same rejected promise, so the bridge cannot recover without creating a new instance.

Evidence

  • src/runtime/pyodide.ts: ensureReady() returns initPromise when set; doInit() failures do not reset it.

Acceptance criteria

  • On init failure, clear initPromise and py so a subsequent call can retry initialization.
  • Add a test that simulates a loadPackage or loadPyodide failure, then fixes it and retries successfully.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions