From fd66b105b8c9a7178dd5f9caa249c071a24ca126 Mon Sep 17 00:00:00 2001 From: LawyZheng Date: Fri, 10 Apr 2026 17:41:17 +0800 Subject: [PATCH] fix: resolve noVNC RFB constructor failure after Vite 8 upgrade (#5455) --- skyvern-frontend/src/components/BrowserStream.tsx | 7 ++++++- skyvern/config.py | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/skyvern-frontend/src/components/BrowserStream.tsx b/skyvern-frontend/src/components/BrowserStream.tsx index 64e915dec..107ab30b8 100644 --- a/skyvern-frontend/src/components/BrowserStream.tsx +++ b/skyvern-frontend/src/components/BrowserStream.tsx @@ -1,4 +1,9 @@ -import RFB from "@novnc/novnc/lib/rfb.js"; +// @novnc/novnc is CJS with __esModule marker. Vite 8 (Rollup 5) changed +// CJS interop so the default import may be the namespace object instead of +// exports.default. This guard works across bundler versions. +import _RFB from "@novnc/novnc/lib/rfb.js"; +type RFB = _RFB; +const RFB = (_RFB as typeof _RFB & { default?: typeof _RFB }).default ?? _RFB; import { ExitIcon, HandIcon, InfoCircledIcon } from "@radix-ui/react-icons"; import { useEffect, useState, useRef, useCallback } from "react"; import { useQuery } from "@tanstack/react-query"; diff --git a/skyvern/config.py b/skyvern/config.py index abea0005d..570ce983c 100644 --- a/skyvern/config.py +++ b/skyvern/config.py @@ -168,6 +168,11 @@ class Settings(BaseSettings): # browser settings BROWSER_LOCALE: str | None = None # "en-US" BROWSER_TIMEZONE: str = "America/New_York" + # Directory containing pre-built default browser profiles ({dir}/chrome/ and {dir}/chromium/). + # When set, used as the default profile source for new browser sessions. + # Cloud workers download S3 profiles here at startup; self-hosted users can point this at a + # local profile directory. Leave empty to use the in-repo template. + DEFAULT_BROWSER_PROFILE_DIR: str = "" BROWSER_WIDTH: int = 1920 BROWSER_HEIGHT: int = 1080 BROWSER_POLICY_FILE: str = "/etc/chromium/policies/managed/policies.json"