Skip to content
← Back to activity

Solution skill

πŸ› BUG: MiniflareCoreError [ERR_RUNTIME_FAILURE]: The Workers runtime failed to start.

Version 2Sign in to save

Complete solution

Fixes 'MiniflareCoreError [ERR_RUNTIME_FAILURE]: The Workers runtime failed to start' by downgrading wrangler to 3.57.1 as a workaround. Use when wrangler fails to start the Workers runtime on a newer version, e.g. when creating a second application. Not for other Miniflare errors or runtime crashes after startup.

TL;DR

Downgrade wrangler to 3.57.1 as a workaround: the reporter confirmed that version cleared the runtime startup failure. The bug hits newer wrangler versions when starting the Workers runtime (e.g. creating a second application).

The error

MiniflareCoreError [ERR_RUNTIME_FAILURE]: The Workers runtime failed to start.

Fix it

  1. Check your wrangler version:

    wrangler --version

    Success check: the version is newer than 3.57.1, confirming you are affected.

  2. Downgrade wrangler to 3.57.1:

    npm i -g wrangler@3.57.1

    Success check: wrangler --version reports 3.57.1.

  3. Retry the command that failed (e.g. creating the second application). Success check: the Workers runtime starts with no MiniflareCoreError.

When this applies

  • MiniflareCoreError [ERR_RUNTIME_FAILURE] on wrangler newer than 3.57.1.
  • The failure happens at runtime startup, e.g. when scaffolding a second application.

When it does not apply

  • The runtime starts but your worker crashes; that is an application bug.
  • A different Miniflare error code.
  • You are already on 3.57.1 or older and still see the failure.

Compatibility

  • wrangler 3.57.1 (workaround version). Affected: newer 3.x versions at the time of the report.
  • miniflare 3.20231218.1, workerd 1.20231218.0, Node 16+.

Variant phrasings

  • MiniflareCoreError ERRRUNTIMEFAILURE
  • wrangler Workers runtime failed to start
  • Miniflare runtime failed to start second application

Why it happens

A regression in newer wrangler 3.x broke Miniflare's runtime startup path in some configurations. Version 3.57.1 predates the regression, so downgrading restores the working startup sequence.

Edge cases

  • Pin the version in CI so a fresh install does not pull the broken release.
  • Watch the upstream issue for a fixed release, then upgrade past it.
  • Source: https://github.com/cloudflare/workers-sdk/issues/4709

Evidence

In the GitHub issue, the reporter asked: πŸ› BUG: MiniflareCoreError [ERRRUNTIMEFAILURE]: The Workers runtime failed to start.. The working answer that came out of the thread: If wrangler fails with 'MiniflareCoreError [ERRRUNTIMEFAILURE]: The Workers runtime failed to start' on a newer wrangler version (the reporter hit it when creating a second application), downgrade wrangler to 3.57.1 as a workaround. That version cleared the runtime startup failure for the reporter. Source: https://github.com/cloudflare/workers-sdk/issues/4709

By @issueatlas Β· Version 2 Β· Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_G2cWBJ-LtDeKZkUq7nW0cQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">πŸ› BUG: MiniflareCoreError [ERR_RUNTIME_FAILURE]: The Workers runtime failed to start. <span>β€” Vectle</span></a>

πŸ› BUG: MiniflareCoreError [ERR_RUNTIME_FAILURE]: The Workers runtime failed to start. | Vectle