From 753f6727b39cc342b7d08b8d3a6e4e49a47480ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20W=C3=B3jcik?= Date: Thu, 11 Sep 2025 11:37:13 +0200 Subject: [PATCH 1/3] handle websocket connection error --- .../components/MfaMobileApprove/MfaMobileApprove.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/pages/client/pages/ClientInstancePage/components/LocationsList/modals/MFAModal/components/MfaMobileApprove/MfaMobileApprove.tsx b/src/pages/client/pages/ClientInstancePage/components/LocationsList/modals/MFAModal/components/MfaMobileApprove/MfaMobileApprove.tsx index ac098e12..3b1913ea 100644 --- a/src/pages/client/pages/ClientInstancePage/components/LocationsList/modals/MFAModal/components/MfaMobileApprove/MfaMobileApprove.tsx +++ b/src/pages/client/pages/ClientInstancePage/components/LocationsList/modals/MFAModal/components/MfaMobileApprove/MfaMobileApprove.tsx @@ -51,6 +51,11 @@ export const MfaMobileApprove = ({ queryParams: { token, }, + onError: () => { + toaster.error('Unexpected error in WebSocket connection to proxy'); + // go back to previous step + onCancel(); + }, }); const qrString = useMemo(() => { From af53d0500ce449a36676bc8c6f7b8a50835614ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20W=C3=B3jcik?= Date: Thu, 11 Sep 2025 11:45:40 +0200 Subject: [PATCH 2/3] update hash --- nix/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/package.nix b/nix/package.nix index 8c01ad24..ae9b6c50 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -79,7 +79,7 @@ in ; fetcherVersion = 2; - hash = "sha256-h2nnwmjGnjxefq6KflaKgIH0HWPcyRvn6rxslwbYuwo="; + hash = "sha256-GlgQuPpOibPrItt6X9EqV4QmCOyajZh5yy7gHh+O+ME="; }; buildPhase = '' From dc3adfe0f3d3cb20ffeacc92e8badb3cfdb47d8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20W=C3=B3jcik?= Date: Thu, 11 Sep 2025 12:05:00 +0200 Subject: [PATCH 3/3] add tauri logs --- .../components/MfaMobileApprove/MfaMobileApprove.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/pages/client/pages/ClientInstancePage/components/LocationsList/modals/MFAModal/components/MfaMobileApprove/MfaMobileApprove.tsx b/src/pages/client/pages/ClientInstancePage/components/LocationsList/modals/MFAModal/components/MfaMobileApprove/MfaMobileApprove.tsx index 3b1913ea..e4870037 100644 --- a/src/pages/client/pages/ClientInstancePage/components/LocationsList/modals/MFAModal/components/MfaMobileApprove/MfaMobileApprove.tsx +++ b/src/pages/client/pages/ClientInstancePage/components/LocationsList/modals/MFAModal/components/MfaMobileApprove/MfaMobileApprove.tsx @@ -9,6 +9,7 @@ import { clientApi } from '../../../../../../../../clientAPI/clientApi'; import type { CommonWireguardFields } from '../../../../../../../../types'; import { useMFAModal } from '../../useMFAModal'; import './style.scss'; +import { debug, error } from '@tauri-apps/plugin-log'; import { Button } from '../../../../../../../../../../shared/defguard-ui/components/Layout/Button/Button'; import { MessageBox } from '../../../../../../../../../../shared/defguard-ui/components/Layout/MessageBox/MessageBox'; @@ -51,8 +52,14 @@ export const MfaMobileApprove = ({ queryParams: { token, }, + onClose: () => { + debug('WebSocket connection to proxy for mobile app MFA closed.'); + }, onError: () => { toaster.error('Unexpected error in WebSocket connection to proxy'); + error( + 'MFA auth using mobile app failed. Unexpected error in WebSocket connection to proxy.', + ); // go back to previous step onCancel(); },