Skip to content

dev server logs "Unknown message from front end: runtime:ready" for every browser client #5795

Description

@Trainingdlu

Wails version family

v2

Operating System

Windows

Description

Every time a browser client loads the page under wails dev, two error lines show up in the terminal:

ERR | process message error: runtime:ready -> Unknown message from front end: runtime:ready
ERR | Unknown message from front end: runtime:ready

Nothing actually breaks, but the wording cost me a while: "Unknown message from front end" sounds like my own frontend sent something malformed. It didn't. runtime:ready comes from the runtime Wails injects.

The desktop window doesn't trigger it. Only browser clients do.

To Reproduce

  1. wails init -n testbed -t vanilla
  2. cd testbed && wails dev
  3. Wait for the navigate to: http://localhost:34115 line. Terminal is still clean at this point.
  4. Open http://localhost:34115 in a browser.
  5. Two ERR lines appear, and two more on every refresh.

Expected behaviour

The dev server should swallow runtime:ready the way the desktop frontends already do, and log nothing. It's a runtime control message, not application traffic.

Screenshots

No response

Attempted Fixes

Traced it through the code:

  • The injected runtime always ends init with WailsInvoke("runtime:ready") (v2/internal/frontend/runtime/desktop/main.js).
  • In dev mode the asset server picks the IPC shim by User-Agent (v2/pkg/assetserver/assetserver_dev.go), so the desktop webview and a browser end up on different transports.
  • windows/darwin/linux all consume runtime:ready before dispatching. The dev server's websocket loop only special-cases drag, so it reaches dispatcher.ProcessMessage, which routes on the first byte and has no case for r.

Two lines rather than one because the dispatcher logs it in a deferred handler and the dev server then logs the returned error again.

Searched the tracker for "Unknown message from front end" and "process message error", nothing existing. (runtime:ready itself isn't searchable, GitHub splits on the colon.)

I have a fix, PR to follow.

System Details

# Wails
Version | v2.12.0

# System
| OS           | Windows 10 Home China                                              |
| Version      | 2009 (Build: 26200)                                                |
| ID           | 25H2                                                               |
| Go Version   | go1.26.4                                                           |
| Platform     | windows                                                            |
| Architecture | amd64                                                              |
| CPU          | Intel(R) Core(TM) i7-14700HX                                       |
| GPU 1        | NVIDIA GeForce RTX 4070 Laptop GPU (NVIDIA) - Driver: 32.0.15.8088 |
| GPU 2        | Intel(R) UHD Graphics (Intel Corporation) - Driver: 32.0.101.6790  |
| Memory       | 16GB                                                               |

# Dependencies
| Dependency | Package Name | Status    | Version       |
| WebView2   | N/A          | Installed | 150.0.4078.83 |
| Nodejs     | N/A          | Installed | 22.15.1       |
| npm        | N/A          | Installed | 10.9.2        |
| *upx       | N/A          | Available |               |
| *nsis      | N/A          | Available |               |

Additional context

Only affects wails dev with a browser client, since the message only reaches the dispatcher over the websocket transport.

Terminal output from the steps above, trimmed to the first two loads:

Using DevServer URL: http://localhost:34115
Using Frontend DevServer URL: http://localhost:5173/
INF | Serving assets from frontend DevServer URL: http://localhost:5173/
Watching (sub)/directory: C:\Users...\testbed
[WebView2] Environment created successfully

To develop in the browser and call your bound Go methods from Javascript, navigate to: http://localhost:34115
ERR | process message error: runtime:ready -> Unknown message from front end: runtime:ready
ERR | Unknown message from front end: runtime:ready
ERR | process message error: runtime:ready -> Unknown message from front end: runtime:ready
ERR | Unknown message from front end: runtime:ready

The desktop window had already loaded before navigate to printed, and logged nothing of its own. Everything above appeared only once the browser connected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions