summaryrefslogtreecommitdiffhomepage
path: root/gui/src
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2024-05-24 13:50:11 +0200
committerDavid Lönnhager <david.l@mullvad.net>2024-05-29 12:55:01 +0200
commit461bb179af039b2ab9622f8df2c2bffd09a21b77 (patch)
tree38f67fdda816084a54d888d3f4df0a5d3754e85a /gui/src
parent2b04fed8d6a486d97af47f1add45b0eeb1071db8 (diff)
downloadmullvadvpn-461bb179af039b2ab9622f8df2c2bffd09a21b77.tar.xz
mullvadvpn-461bb179af039b2ab9622f8df2c2bffd09a21b77.zip
Add error state cause for full disk permissions error
Diffstat (limited to 'gui/src')
-rw-r--r--gui/src/main/daemon-rpc.ts6
-rw-r--r--gui/src/shared/notifications/error.ts17
2 files changed, 19 insertions, 4 deletions
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: {