windmill-labs/windmill · error

[WebSocket] Unknown message type: ${type}

Error message

[WebSocket] Unknown message type: ${type}

What it means

Default arm of the WebSocket message dispatch in `wmill app dev`: a message arrived whose `type` is none of the handled cases (e.g. not sqlMigrationResult/skipSqlMigration). Almost always a version mismatch between the CLI dev server and the frontend dev page, or a malformed client message. Logged and ignored.

Source

Thrown at cli/src/commands/app/dev.ts:1409

            break;
          }

          case "skipSqlMigration": {
            // User chose to skip this SQL file
            const { fileName } = message;
            log.info(
              colors.yellow(`[SQL Migration] Skipped: ${fileName}`),
            );

            // Don't delete file, just move to next
            if (currentSqlFile) {
              await onSqlFileCompleted(currentSqlFile, false);
            }
            break;
          }

          default:
            log.warn(
              colors.yellow(`[WebSocket] Unknown message type: ${type}`),
            );
            respond(
              "error",
              { message: `Unknown message type: ${type}` },
              true,
            );
        }
      } catch (error: any) {
        log.error(
          colors.red(`[WebSocket] Failed to parse message: ${error.message}`),
        );
      }
    });

    ws.on("close", () => {
      log.info(colors.cyan("[WebSocket] Client disconnected"));
    });

View on GitHub (pinned to e474e8803c)

Solutions

  1. Update the CLI and the frontend to matching versions so both sides know the same message types
  2. Check for a custom client sending extra WebSocket messages to the dev server
  3. Ignore if the app still hot-reloads correctly — the message is harmless
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at cli/src/commands/app/dev.ts:1409 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03). Data as JSON: /api/errors/69c04d423ba63c2a. Report an issue: GitHub.