summaryrefslogtreecommitdiffhomepage
path: root/gui
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2024-05-29 12:56:03 +0200
committerDavid Lönnhager <david.l@mullvad.net>2024-05-29 12:56:03 +0200
commit596286dffee268327265879469588f8760cd43a6 (patch)
tree97176e347d6fb96143c573fc4b651604e01e512d /gui
parent2b04fed8d6a486d97af47f1add45b0eeb1071db8 (diff)
parent6289b4c7feb587e8fe2a9a4be175a8bd1aafa9f7 (diff)
downloadmullvadvpn-596286dffee268327265879469588f8760cd43a6.tar.xz
mullvadvpn-596286dffee268327265879469588f8760cd43a6.zip
Merge branch 'macos-add-split-tunnel-error-info'
Diffstat (limited to 'gui')
-rw-r--r--gui/locales/messages.pot4
-rw-r--r--gui/src/main/daemon-rpc.ts6
-rw-r--r--gui/src/shared/notifications/error.ts17
3 files changed, 23 insertions, 4 deletions
diff --git a/gui/locales/messages.pot b/gui/locales/messages.pot
index 9126cb9c99..65267fd5bd 100644
--- a/gui/locales/messages.pot
+++ b/gui/locales/messages.pot
@@ -1087,6 +1087,10 @@ msgid "Disconnected and unsecure"
msgstr ""
msgctxt "notifications"
+msgid "Failed to enable split tunneling. Please try again or disable it."
+msgstr ""
+
+msgctxt "notifications"
msgid "Lockdown mode active, connection blocked"
msgstr ""
diff --git a/gui/src/main/daemon-rpc.ts b/gui/src/main/daemon-rpc.ts
index 10e39f020d..c51524f1ee 100644
--- a/gui/src/main/daemon-rpc.ts
+++ b/gui/src/main/daemon-rpc.ts
@@ -1046,6 +1046,12 @@ function convertFromTunnelStateError(state: grpcTypes.ErrorState.AsObject): Erro
...baseError,
cause: ErrorStateCause.splitTunnelError,
};
+ case grpcTypes.ErrorState.Cause.NEED_FULL_DISK_PERMISSIONS:
+ // TODO: handle correctly
+ return {
+ ...baseError,
+ cause: ErrorStateCause.splitTunnelError,
+ };
case grpcTypes.ErrorState.Cause.VPN_PERMISSION_DENIED:
// VPN_PERMISSION_DENIED is only ever created on Android
throw invalidErrorStateCause;
diff --git a/gui/src/shared/notifications/error.ts b/gui/src/shared/notifications/error.ts
index 673d6cea28..1d36b7e1de 100644
--- a/gui/src/shared/notifications/error.ts
+++ b/gui/src/shared/notifications/error.ts
@@ -183,10 +183,18 @@ function getMessage(errorState: ErrorState): string {
'Your device is offline. The tunnel will automatically connect once your device is back online.',
);
case ErrorStateCause.splitTunnelError:
- return messages.pgettext(
- 'notifications',
- 'Unable to communicate with Mullvad kernel driver. Try reconnecting or send a problem report.',
- );
+ switch (process.platform ?? window.env.platform) {
+ case 'darwin':
+ return messages.pgettext(
+ 'notifications',
+ 'Failed to enable split tunneling. Please try again or disable it.',
+ );
+ default:
+ return messages.pgettext(
+ 'notifications',
+ 'Unable to communicate with Mullvad kernel driver. Try reconnecting or send a problem report.',
+ );
+ }
}
}
}
@@ -265,6 +273,7 @@ function getActions(errorState: ErrorState): InAppNotificationAction | void {
},
};
} else if (errorState.cause === ErrorStateCause.splitTunnelError) {
+ // TODO: macos: handle this and full disk access error
return {
type: 'troubleshoot-dialog',
troubleshoot: {