From fa8ac7aeaf5403720c2004cbae93a2ef3df51b78 Mon Sep 17 00:00:00 2001 From: Martin Schoeler Date: Wed, 11 Sep 2024 15:22:23 -0300 Subject: [PATCH] fix: Infinite loading when uploading a private app (#33181) --- .changeset/wet-hats-walk.md | 5 +++++ .../client/views/marketplace/hooks/useInstallApp.tsx | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 .changeset/wet-hats-walk.md diff --git a/.changeset/wet-hats-walk.md b/.changeset/wet-hats-walk.md new file mode 100644 index 000000000000..4c3565e75523 --- /dev/null +++ b/.changeset/wet-hats-walk.md @@ -0,0 +1,5 @@ +--- +"@rocket.chat/meteor": patch +--- + +Fixed issue that caused an infinite loading state when uploading a private app to Rocket.Chat diff --git a/apps/meteor/client/views/marketplace/hooks/useInstallApp.tsx b/apps/meteor/client/views/marketplace/hooks/useInstallApp.tsx index f10d3e989e0a..3b784e24c375 100644 --- a/apps/meteor/client/views/marketplace/hooks/useInstallApp.tsx +++ b/apps/meteor/client/views/marketplace/hooks/useInstallApp.tsx @@ -114,8 +114,11 @@ export const useInstallApp = (file: File, url: string): { install: () => void; i }; const extractManifestFromAppFile = async (appFile: File) => { - const manifest = await getManifestFromZippedApp(appFile); - return manifest; + try { + return getManifestFromZippedApp(appFile); + } catch (error) { + handleInstallError(error as Error); + } }; const install = async () => { @@ -158,6 +161,7 @@ export const useInstallApp = (file: File, url: string): { install: () => void; i handleEnableUnlimitedApps={() => { openExternalLink(manageSubscriptionUrl); setModal(null); + setInstalling(false); }} />, );