diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index ed9f63e54f..31425b4f67 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -13447,7 +13447,7 @@ repositoryURL = "https://github.com/duckduckgo/BrowserServicesKit"; requirement = { kind = exactVersion; - version = 183.0.1; + version = 184.0.0; }; }; 9FF521422BAA8FF300B9819B /* XCRemoteSwiftPackageReference "lottie-spm" */ = { diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index f252c26951..dfc932907d 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/NetworkProtection/AppAndExtensionAndAgentTargets/NetworkProtectionPixelEvent.swift b/DuckDuckGo/NetworkProtection/AppAndExtensionAndAgentTargets/NetworkProtectionPixelEvent.swift index 6b0a86cfec..3a89fcb611 100644 --- a/DuckDuckGo/NetworkProtection/AppAndExtensionAndAgentTargets/NetworkProtectionPixelEvent.swift +++ b/DuckDuckGo/NetworkProtection/AppAndExtensionAndAgentTargets/NetworkProtectionPixelEvent.swift @@ -98,7 +98,8 @@ enum NetworkProtectionPixelEvent: PixelKitEventV2 { case networkProtectionWireguardErrorInvalidState(reason: String) case networkProtectionWireguardErrorFailedDNSResolution case networkProtectionWireguardErrorCannotSetNetworkSettings(_ error: Error) - case networkProtectionWireguardErrorCannotStartWireguardBackend(code: Int32) + case networkProtectionWireguardErrorCannotStartWireguardBackend(_ error: Error) + case networkProtectionWireguardErrorCannotSetWireguardConfig(_ error: Error) case networkProtectionNoAuthTokenFoundError @@ -290,6 +291,9 @@ enum NetworkProtectionPixelEvent: PixelKitEventV2 { case .networkProtectionWireguardErrorCannotStartWireguardBackend: return "netp_wireguard_error_cannot_start_wireguard_backend" + case .networkProtectionWireguardErrorCannotSetWireguardConfig: + return "netp_wireguard_error_cannot_set_wireguard_config" + case .networkProtectionNoAuthTokenFoundError: return "netp_no_auth_token_found_error" @@ -378,8 +382,10 @@ enum NetworkProtectionPixelEvent: PixelKitEventV2 { return parameters case .networkProtectionWireguardErrorCannotSetNetworkSettings(let error): return error.pixelParameters - case .networkProtectionWireguardErrorCannotStartWireguardBackend(code: let code): - return [PixelKit.Parameters.errorCode: String(code)] + case .networkProtectionWireguardErrorCannotStartWireguardBackend(let error): + return error.pixelParameters + case .networkProtectionWireguardErrorCannotSetWireguardConfig(let error): + return error.pixelParameters case .networkProtectionClientFailedToFetchServerStatus(let error): return error?.pixelParameters case .networkProtectionClientFailedToParseServerStatusResponse(let error): @@ -458,6 +464,8 @@ enum NetworkProtectionPixelEvent: PixelKitEventV2 { .networkProtectionTunnelWakeFailure(let error), .networkProtectionClientFailedToParseRedeemResponse(let error), .networkProtectionWireguardErrorCannotSetNetworkSettings(let error), + .networkProtectionWireguardErrorCannotStartWireguardBackend(let error), + .networkProtectionWireguardErrorCannotSetWireguardConfig(let error), .networkProtectionRekeyFailure(let error), .networkProtectionUnhandledError(_, _, let error), .networkProtectionSystemExtensionActivationFailure(let error), @@ -507,7 +515,6 @@ enum NetworkProtectionPixelEvent: PixelKitEventV2 { .networkProtectionWireguardErrorCannotLocateTunnelFileDescriptor, .networkProtectionWireguardErrorInvalidState, .networkProtectionWireguardErrorFailedDNSResolution, - .networkProtectionWireguardErrorCannotStartWireguardBackend, .networkProtectionNoAuthTokenFoundError, .networkProtectionRekeyAttempt, .networkProtectionRekeyCompleted, diff --git a/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/EventMapping+NetworkProtectionError.swift b/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/EventMapping+NetworkProtectionError.swift index fc47c35d55..93107416d4 100644 --- a/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/EventMapping+NetworkProtectionError.swift +++ b/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/EventMapping+NetworkProtectionError.swift @@ -82,6 +82,7 @@ extension EventMapping where Event == NetworkProtectionError { .wireGuardDnsResolution, .wireGuardSetNetworkSettings, .startWireGuardBackend, + .setWireguardConfig, .failedToRetrieveAuthToken, .failedToFetchServerStatus, .failedToParseServerStatusResponse: diff --git a/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/NetworkExtensionTargets/MacPacketTunnelProvider.swift b/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/NetworkExtensionTargets/MacPacketTunnelProvider.swift index c4633c14bc..46a84aeca7 100644 --- a/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/NetworkExtensionTargets/MacPacketTunnelProvider.swift +++ b/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/NetworkExtensionTargets/MacPacketTunnelProvider.swift @@ -110,8 +110,10 @@ final class MacPacketTunnelProvider: PacketTunnelProvider { domainEvent = .networkProtectionWireguardErrorFailedDNSResolution case .wireGuardSetNetworkSettings(let error): domainEvent = .networkProtectionWireguardErrorCannotSetNetworkSettings(error) - case .startWireGuardBackend(let code): - domainEvent = .networkProtectionWireguardErrorCannotStartWireguardBackend(code: code) + case .startWireGuardBackend(let error): + domainEvent = .networkProtectionWireguardErrorCannotStartWireguardBackend(error) + case .setWireguardConfig(let error): + domainEvent = .networkProtectionWireguardErrorCannotSetWireguardConfig(error) case .noAuthTokenFound: domainEvent = .networkProtectionNoAuthTokenFoundError case .failedToFetchServerStatus(let error): diff --git a/LocalPackages/DataBrokerProtection/Package.swift b/LocalPackages/DataBrokerProtection/Package.swift index fa17f1c540..f6320f6d43 100644 --- a/LocalPackages/DataBrokerProtection/Package.swift +++ b/LocalPackages/DataBrokerProtection/Package.swift @@ -29,7 +29,7 @@ let package = Package( targets: ["DataBrokerProtection"]) ], dependencies: [ - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "183.0.1"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "184.0.0"), .package(path: "../SwiftUIExtensions"), .package(path: "../XPCHelper"), ], diff --git a/LocalPackages/NetworkProtectionMac/Package.swift b/LocalPackages/NetworkProtectionMac/Package.swift index 4b72f71fe9..2b498a855e 100644 --- a/LocalPackages/NetworkProtectionMac/Package.swift +++ b/LocalPackages/NetworkProtectionMac/Package.swift @@ -32,7 +32,7 @@ let package = Package( .library(name: "VPNAppLauncher", targets: ["VPNAppLauncher"]), ], dependencies: [ - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "183.0.1"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "184.0.0"), .package(url: "https://github.com/airbnb/lottie-spm", exact: "4.4.3"), .package(path: "../AppLauncher"), .package(path: "../UDSHelper"), diff --git a/LocalPackages/SubscriptionUI/Package.swift b/LocalPackages/SubscriptionUI/Package.swift index 31b26c3215..ff322c42e1 100644 --- a/LocalPackages/SubscriptionUI/Package.swift +++ b/LocalPackages/SubscriptionUI/Package.swift @@ -12,7 +12,7 @@ let package = Package( targets: ["SubscriptionUI"]), ], dependencies: [ - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "183.0.1"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "184.0.0"), .package(path: "../SwiftUIExtensions") ], targets: [ diff --git a/UnitTests/NetworkProtection/NetworkProtectionPixelEventTests.swift b/UnitTests/NetworkProtection/NetworkProtectionPixelEventTests.swift index cd60e9adf7..cd27726b43 100644 --- a/UnitTests/NetworkProtection/NetworkProtectionPixelEventTests.swift +++ b/UnitTests/NetworkProtection/NetworkProtectionPixelEventTests.swift @@ -322,12 +322,18 @@ final class NetworkProtectionPixelEventTests: XCTestCase { underlyingErrors: [TestError.underlyingError]), file: #filePath, line: #line) - fire(NetworkProtectionPixelEvent.networkProtectionWireguardErrorCannotStartWireguardBackend(code: 1), + fire(NetworkProtectionPixelEvent.networkProtectionWireguardErrorCannotStartWireguardBackend(TestError.testError), frequency: .dailyAndCount, and: .expect(pixelName: "m_mac_netp_wireguard_error_cannot_start_wireguard_backend", - customFields: [ - PixelKit.Parameters.errorCode: "1" - ]), + error: TestError.testError, + underlyingErrors: [TestError.underlyingError]), + file: #filePath, + line: #line) + fire(NetworkProtectionPixelEvent.networkProtectionWireguardErrorCannotSetWireguardConfig(TestError.testError), + frequency: .dailyAndCount, + and: .expect(pixelName: "m_mac_netp_wireguard_error_cannot_set_wireguard_config", + error: TestError.testError, + underlyingErrors: [TestError.underlyingError]), file: #filePath, line: #line) fire(NetworkProtectionPixelEvent.networkProtectionNoAuthTokenFoundError,