From cc14f3dac099ad5f677743ae8375411a7bf45b51 Mon Sep 17 00:00:00 2001
From: G30 <50341825+silentoplayz@users.noreply.github.com>
Date: Fri, 4 Sep 2026 11:39:52 -0400
Subject: [PATCH] fix: report version check failures instead of claiming latest
(#29626)
GET /api/version/updates returned the running version as latest whenever
the GitHub request failed, so an instance that cannot reach GitHub
reported itself up to date however far behind it was. The exception was
logged at debug, below the default level, so nothing recorded that the
check never happened.
The failure path now returns latest: None and logs at warning.
A null latest cannot be passed to compareVersion as it stood.
current.localeCompare(null) coerces to the string "null", and "0.10.2"
sorts before it, so the function returned true. The backend change alone
would have turned a false (latest) into a false update-available plus a
toast, so the guard is part of the fix.
The three callers stop substituting the running version in their catch,
and the two badge surfaces gain a third state. When latest is unknown
the badge is plain text, since there is no release to link to.
Admin Settings > General was wrong in a worse way than reported: it
initialised updateAvailable false with latest set to the running
version, and never checked on mount, so it claimed (latest) having made
no request at all. It now matches About.svelte, which starts unknown and
checks on mount.
Closes #29580
---
backend/open_webui/main.py | 4 +-
.../components/admin/Settings/General.svelte | 38 ++++++++++++-------
src/lib/components/chat/Settings/About.svelte | 28 ++++++++------
src/lib/i18n/locales/en-US/translation.json | 1 +
src/lib/utils/index.ts | 2 +-
src/routes/(app)/+layout.svelte | 2 +-
6 files changed, 45 insertions(+), 30 deletions(-)
diff --git a/backend/open_webui/main.py b/backend/open_webui/main.py
index 67a14f16b2..0ecb9f2f2e 100644
--- a/backend/open_webui/main.py
+++ b/backend/open_webui/main.py
@@ -2575,8 +2575,8 @@ async def get_app_latest_release_version(user=Depends(get_verified_user)):
return {'current': VERSION, 'latest': latest_version[1:]}
except Exception as e:
- log.debug(e)
- return {'current': VERSION, 'latest': VERSION}
+ log.warning(f'Version update check failed: {e}')
+ return {'current': VERSION, 'latest': None}
@app.get('/api/changelog')
diff --git a/src/lib/components/admin/Settings/General.svelte b/src/lib/components/admin/Settings/General.svelte
index f2fd9b0509..b54863a1a4 100644
--- a/src/lib/components/admin/Settings/General.svelte
+++ b/src/lib/components/admin/Settings/General.svelte
@@ -27,10 +27,10 @@
export let saveHandler: Function;
- let updateAvailable: boolean | null = false;
+ let updateAvailable: boolean | null = null;
let version = {
current: WEBUI_VERSION,
- latest: WEBUI_VERSION
+ latest: ''
};
let adminConfig: any = null;
@@ -47,7 +47,7 @@
version = await getVersionUpdates(localStorage.token).catch((error) => {
return {
current: WEBUI_VERSION,
- latest: WEBUI_VERSION
+ latest: null
};
});
@@ -91,6 +91,10 @@
defaultInterfaceSettings = getDefaultInterfaceSettings();
banners = [...$_banners];
+
+ if ($config?.features?.enable_version_update_check) {
+ checkForVersionUpdates();
+ }
});
@@ -112,17 +116,23 @@
v{WEBUI_VERSION}
{#if $config?.features?.enable_version_update_check}
-
- {updateAvailable === null
- ? $i18n.t('Checking for updates...')
- : updateAvailable
- ? `(v${version.latest} ${$i18n.t('available!')})`
- : $i18n.t('(latest)')}
-
+ {#if version.latest === null}
+ {$i18n.t('Could not check for updates')}
+ {:else}
+
+ {updateAvailable === null
+ ? $i18n.t('Checking for updates...')
+ : updateAvailable
+ ? `(v${version.latest} ${$i18n.t('available!')})`
+ : $i18n.t('(latest)')}
+
+ {/if}
{/if}
diff --git a/src/lib/components/chat/Settings/About.svelte b/src/lib/components/chat/Settings/About.svelte
index 6e6c2fe686..75fb775081 100644
--- a/src/lib/components/chat/Settings/About.svelte
+++ b/src/lib/components/chat/Settings/About.svelte
@@ -27,7 +27,7 @@
version = await getVersionUpdates(localStorage.token).catch((error) => {
return {
current: WEBUI_VERSION,
- latest: WEBUI_VERSION
+ latest: null
};
});
@@ -66,21 +66,25 @@
{#if $config?.features?.enable_version_update_check}
-
- {updateAvailable === null
- ? $i18n.t('Checking for updates...')
- : updateAvailable
- ? `(v${version.latest} ${$i18n.t('available!')})`
- : $i18n.t('(latest)')}
-
+ {#if version.latest === null}
+ {$i18n.t('Could not check for updates')}
+ {:else}
+
+ {updateAvailable === null
+ ? $i18n.t('Checking for updates...')
+ : updateAvailable
+ ? `(v${version.latest} ${$i18n.t('available!')})`
+ : $i18n.t('(latest)')}
+
+ {/if}
{/if}