From 8c48267da147f6984f82a265e7fd2b47600f0c74 Mon Sep 17 00:00:00 2001 From: MartinSchoeler Date: Thu, 29 Aug 2024 10:04:10 -0300 Subject: [PATCH 1/4] fix: Infinite loading when uploading an invalid zip app --- .../client/views/marketplace/hooks/useInstallApp.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/meteor/client/views/marketplace/hooks/useInstallApp.tsx b/apps/meteor/client/views/marketplace/hooks/useInstallApp.tsx index f10d3e989e0a..52bba9ba26ee 100644 --- a/apps/meteor/client/views/marketplace/hooks/useInstallApp.tsx +++ b/apps/meteor/client/views/marketplace/hooks/useInstallApp.tsx @@ -114,8 +114,12 @@ export const useInstallApp = (file: File, url: string): { install: () => void; i }; const extractManifestFromAppFile = async (appFile: File) => { - const manifest = await getManifestFromZippedApp(appFile); - return manifest; + try { + const manifest = await getManifestFromZippedApp(appFile); + return manifest; + } catch (error) { + handleInstallError(error as Error); + } }; const install = async () => { From a974adde3c5c8c930e244c260502c4770cc0087e Mon Sep 17 00:00:00 2001 From: MartinSchoeler Date: Thu, 29 Aug 2024 11:15:14 -0300 Subject: [PATCH 2/4] fix: upsell infinite loading --- apps/meteor/client/views/marketplace/hooks/useInstallApp.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/meteor/client/views/marketplace/hooks/useInstallApp.tsx b/apps/meteor/client/views/marketplace/hooks/useInstallApp.tsx index 52bba9ba26ee..fe7b86037e3e 100644 --- a/apps/meteor/client/views/marketplace/hooks/useInstallApp.tsx +++ b/apps/meteor/client/views/marketplace/hooks/useInstallApp.tsx @@ -162,6 +162,7 @@ export const useInstallApp = (file: File, url: string): { install: () => void; i handleEnableUnlimitedApps={() => { openExternalLink(manageSubscriptionUrl); setModal(null); + setInstalling(false); }} />, ); From 91ec0e1e148d98fd43bd9ce927ac825fbbf00a9c Mon Sep 17 00:00:00 2001 From: Martin Schoeler Date: Thu, 29 Aug 2024 14:02:36 -0300 Subject: [PATCH 3/4] Create wet-hats-walk.md --- .changeset/wet-hats-walk.md | 5 +++++ 1 file changed, 5 insertions(+) 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 From f2d722cf1dc0371b7b6f0253e55984647b00572f Mon Sep 17 00:00:00 2001 From: MartinSchoeler Date: Thu, 29 Aug 2024 17:23:54 -0300 Subject: [PATCH 4/4] review --- apps/meteor/client/views/marketplace/hooks/useInstallApp.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/meteor/client/views/marketplace/hooks/useInstallApp.tsx b/apps/meteor/client/views/marketplace/hooks/useInstallApp.tsx index fe7b86037e3e..3b784e24c375 100644 --- a/apps/meteor/client/views/marketplace/hooks/useInstallApp.tsx +++ b/apps/meteor/client/views/marketplace/hooks/useInstallApp.tsx @@ -115,8 +115,7 @@ export const useInstallApp = (file: File, url: string): { install: () => void; i const extractManifestFromAppFile = async (appFile: File) => { try { - const manifest = await getManifestFromZippedApp(appFile); - return manifest; + return getManifestFromZippedApp(appFile); } catch (error) { handleInstallError(error as Error); }