From 6301508037b30489c42ee9ea8acee97cdea76297 Mon Sep 17 00:00:00 2001 From: Yao Chung Hu <30311066+FlashyReese@users.noreply.github.com> Date: Mon, 26 Oct 2026 16:08:24 -0600 Subject: fix: handle plugin store load failures (#1001) --- frontend/src/plugin-loader.tsx | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'frontend/src/plugin-loader.tsx') diff --git a/frontend/src/plugin-loader.tsx b/frontend/src/plugin-loader.tsx index 185d260a..81b96dcc 100644 --- a/frontend/src/plugin-loader.tsx +++ b/frontend/src/plugin-loader.tsx @@ -34,7 +34,7 @@ import { NotificationService } from './notification-service'; import { DisabledPlugin, InstallType, Plugin, PluginLoadType } from './plugin'; import RouterHook from './router-hook'; import { deinitSteamFixes, initSteamFixes } from './steamfixes'; -import { checkForPluginUpdates } from './store'; +import { PluginUpdateMapping, checkForPluginUpdates } from './store'; import TabsHook from './tabs-hook'; import Toaster from './toaster'; import { getVersionInfo } from './updater'; @@ -274,19 +274,24 @@ class PluginLoader extends Logger { await this.notifyPluginUpdates(); } - public async checkPluginUpdates() { - const frozenPlugins = this.deckyState.publicState().frozenPlugins; + public async checkPluginUpdates(): Promise { + try { + const frozenPlugins = this.deckyState.publicState().frozenPlugins; - const updates = await checkForPluginUpdates( - this.deckyState.publicState().installedPlugins.filter((p) => !frozenPlugins.includes(p.name)), - ); - this.deckyState.setUpdates(updates); - return updates; + const updates = await checkForPluginUpdates( + this.deckyState.publicState().installedPlugins.filter((p) => !frozenPlugins.includes(p.name)), + ); + this.deckyState.setUpdates(updates); + return updates; + } catch (error) { + this.error('Failed to check for plugin updates', error); + return null; + } } public async notifyPluginUpdates() { const updates = await this.checkPluginUpdates(); - if (updates?.size > 0 && this.notificationService.shouldNotify('pluginUpdates')) { + if (updates && updates.size > 0 && this.notificationService.shouldNotify('pluginUpdates')) { this.pluginUpdateToast && this.pluginUpdateToast.dismiss(); this.pluginUpdateToast = this.toaster.toast({ title: , -- cgit v1.2.3