From c17e7221c92c4112781bc7c7db6a3d0cfd91ed5e Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 14 Mar 2016 09:42:45 +0100 Subject: [PATCH] Explain VPN start problem --- .../main/java/eu/faircode/netguard/ServiceSinkhole.java | 8 +++++--- app/src/main/res/values/strings.xml | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/faircode/netguard/ServiceSinkhole.java b/app/src/main/java/eu/faircode/netguard/ServiceSinkhole.java index 1d298cfc..653500d3 100644 --- a/app/src/main/java/eu/faircode/netguard/ServiceSinkhole.java +++ b/app/src/main/java/eu/faircode/netguard/ServiceSinkhole.java @@ -348,13 +348,15 @@ public class ServiceSinkhole extends VpnService implements SharedPreferences.OnS } catch (Throwable ex) { Log.e(TAG, ex.toString() + "\n" + Log.getStackTraceString(ex)); - showExitNotification(ex.toString()); - - if (!(ex instanceof IllegalStateException)) { + if (ex instanceof IllegalStateException) + showErrorNotification(4, getString(R.string.msg_start_failed)); + else { // Disable firewall prefs.edit().putBoolean("enabled", false).apply(); Widget.updateWidgets(ServiceSinkhole.this); + showExitNotification(ex.toString()); + // Report exception Util.sendCrashReport(ex, ServiceSinkhole.this); } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 10dd8193..5b8ef1c0 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -140,6 +140,8 @@ however it is impossible to guarantee NetGuard will work correctly on every devi NetGuard is disabled, use the switch above to enable NetGuard NetGuard has been disabled, likely by using another VPN based application NetGuard has been disabled, because of an internal error + The Android VPN service could not be started, which is most likely caused by a bug in your Android version. +Restarting your device or revoking the VPN permission using the Android settings from NetGuard might (temporarily) solve this problem. \'%1$s\' installed %1$s attempted internet access Action completed