diff --git a/Core/Pixel.swift b/Core/Pixel.swift index b569bea727..c2ee1ee14c 100644 --- a/Core/Pixel.swift +++ b/Core/Pixel.swift @@ -115,7 +115,6 @@ public struct PixelParameters { // Network Protection public static let keychainFieldName = "fieldName" public static let keychainErrorCode = errorCode - public static let wireguardErrorCode = errorCode public static let latency = "latency" public static let server = "server" public static let networkType = "network_type" diff --git a/Core/PixelEvent.swift b/Core/PixelEvent.swift index 675a1dc23a..660507ae59 100644 --- a/Core/PixelEvent.swift +++ b/Core/PixelEvent.swift @@ -408,7 +408,8 @@ extension Pixel { case networkProtectionWireguardErrorFailedDNSResolution case networkProtectionWireguardErrorCannotSetNetworkSettings case networkProtectionWireguardErrorCannotStartWireguardBackend - + case networkProtectionWireguardErrorCannotSetWireguardConfig + case networkProtectionFailedToLoadFromPreferences case networkProtectionFailedToSaveToPreferences case networkProtectionActivationRequestFailed @@ -1143,6 +1144,7 @@ extension Pixel.Event { case .networkProtectionWireguardErrorFailedDNSResolution: return "m_netp_wireguard_error_failed_dns_resolution" case .networkProtectionWireguardErrorCannotSetNetworkSettings: return "m_netp_wireguard_error_cannot_set_network_settings" case .networkProtectionWireguardErrorCannotStartWireguardBackend: return "m_netp_wireguard_error_cannot_start_wireguard_backend" + case .networkProtectionWireguardErrorCannotSetWireguardConfig: return "m_netp_wireguard_error_cannot_set_wireguard_config" case .networkProtectionFailedToLoadFromPreferences: return "m_netp_network_extension_error_failed_to_load_from_preferences" case .networkProtectionFailedToSaveToPreferences: return "m_netp_network_extension_error_failed_to_save_to_preferences" case .networkProtectionActivationRequestFailed: return "m_netp_network_extension_error_activation_request_failed" diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index 0558faf6b4..4fcc12de47 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -10507,7 +10507,7 @@ repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit"; requirement = { kind = exactVersion; - version = 183.0.1; + version = 184.0.0; }; }; 9F8FE9472BAE50E50071E372 /* XCRemoteSwiftPackageReference "lottie-spm" */ = { diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index f9510ec799..6d7db1bb65 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/DuckDuckGo/BrowserServicesKit", "state" : { - "revision" : "f0220c164618c7ca1cbf276db644d71711b0c76a", - "version" : "183.0.1" + "revision" : "c6ce430371032930d770b0388cbe44a2d40ad729", + "version" : "184.0.0" } }, { diff --git a/DuckDuckGo/EventMapping+NetworkProtectionError.swift b/DuckDuckGo/EventMapping+NetworkProtectionError.swift index 684ccafcf7..e24613266d 100644 --- a/DuckDuckGo/EventMapping+NetworkProtectionError.swift +++ b/DuckDuckGo/EventMapping+NetworkProtectionError.swift @@ -85,7 +85,6 @@ extension EventMapping where Event == NetworkProtectionError { .wireGuardInvalidState, .wireGuardDnsResolution, .wireGuardSetNetworkSettings, - .startWireGuardBackend, .failedToRetrieveAuthToken, .failedToFetchServerStatus, .failedToParseServerStatusResponse: @@ -95,6 +94,12 @@ extension EventMapping where Event == NetworkProtectionError { // Should never be sent from from the app case .unhandledError(function: let function, line: let line, error: let error): pixelEvent = .networkProtectionUnhandledError + case .startWireGuardBackend(let error): + pixelEvent = .networkProtectionWireguardErrorCannotStartWireguardBackend + pixelError = error + case .setWireguardConfig(let error): + pixelEvent = .networkProtectionWireguardErrorCannotSetWireguardConfig + pixelError = error } DailyPixel.fireDailyAndCount(pixel: pixelEvent, error: pixelError, withAdditionalParameters: params) diff --git a/PacketTunnelProvider/NetworkProtection/NetworkProtectionPacketTunnelProvider.swift b/PacketTunnelProvider/NetworkProtection/NetworkProtectionPacketTunnelProvider.swift index ca2209846f..668c89e439 100644 --- a/PacketTunnelProvider/NetworkProtection/NetworkProtectionPacketTunnelProvider.swift +++ b/PacketTunnelProvider/NetworkProtection/NetworkProtectionPacketTunnelProvider.swift @@ -271,9 +271,12 @@ final class NetworkProtectionPacketTunnelProvider: PacketTunnelProvider { case .wireGuardSetNetworkSettings(let error): pixelEvent = .networkProtectionWireguardErrorCannotSetNetworkSettings pixelError = error - case .startWireGuardBackend(let code): + case .startWireGuardBackend(let error): pixelEvent = .networkProtectionWireguardErrorCannotStartWireguardBackend - params[PixelParameters.wireguardErrorCode] = String(code) + pixelError = error + case .setWireguardConfig(let error): + pixelEvent = .networkProtectionWireguardErrorCannotSetWireguardConfig + pixelError = error case .noAuthTokenFound: pixelEvent = .networkProtectionNoAccessTokenFoundError case .vpnAccessRevoked: