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}