From 429be4cc6790d06987cafe2f25bb57073ee9a021 Mon Sep 17 00:00:00 2001 From: MasterPhooey Date: Sat, 25 Apr 2026 12:48:06 -0500 Subject: [PATCH] 502 --- dockerfile | 2 +- trainer_server.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/dockerfile b/dockerfile index 0fd7bbd..ef4478e 100644 --- a/dockerfile +++ b/dockerfile @@ -6,7 +6,7 @@ ENV DEBIAN_FRONTEND=noninteractive # System deps RUN apt-get update && apt-get install -y --no-install-recommends \ python3.12 python3.12-venv python3.12-dev python3-pip python-is-python3 \ - git wget curl unzip patch ca-certificates nano less \ + git wget curl unzip patch ninja-build ca-certificates nano less \ && rm -rf /var/lib/apt/lists/* \ && mkdir -p /data diff --git a/trainer_server.py b/trainer_server.py index f342c46..ffc6dc0 100644 --- a/trainer_server.py +++ b/trainer_server.py @@ -2012,6 +2012,12 @@ def _run_firmware_build_flash_background(session_id: str): "Tip: PlatformIO's ESP-IDF Python environment crashed while installing dependencies. " "Run Clean Build Files once, then retry the flash.", ) + if "pioarduino/registry" in joined_lines and "ninja-" in joined_lines and "status code '502'" in joined_lines: + _append_firmware_log( + session_id, + "Tip: GitHub returned a 502 while PlatformIO was downloading Ninja. " + "This is an upstream package download failure; retry the build in a few minutes.", + ) _append_firmware_log(session_id, f"✗ Firmware build + flash failed (exit_code={rc})") with FIRMWARE_LOCK: live = FIRMWARE_SESSIONS.get(session_id)