From da44deb1c79acd37bf2f1352c3911a683e61fc90 Mon Sep 17 00:00:00 2001 From: Sam Symons Date: Thu, 31 Oct 2024 18:36:05 -0700 Subject: [PATCH 1/3] Set BSK branch. --- DuckDuckGo.xcodeproj/project.pbxproj | 4 ++-- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index f4d4acb3db..1fc700b9fa 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -14683,8 +14683,8 @@ isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/duckduckgo/BrowserServicesKit"; requirement = { - kind = exactVersion; - version = 202.1.0; + branch = "sam/validate-errors-before-throwing-them-to-the-os"; + kind = branch; }; }; 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 150832d719..9a7cacb427 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" : "8a1bc5526e14c589ca2cc74e6e7d125952b79bc1", - "version" : "202.1.0" + "branch" : "sam/validate-errors-before-throwing-them-to-the-os", + "revision" : "aff5f0ca16cc9861157014c96752ec366d4f2c15" } }, { From 308c9df7b5215a5eb18e88dfd481d57f6f926b3d Mon Sep 17 00:00:00 2001 From: Sam Symons Date: Fri, 1 Nov 2024 16:44:20 -0700 Subject: [PATCH 2/3] Add malformed error event. --- .../xcshareddata/swiftpm/Package.resolved | 2 +- .../NetworkProtectionPixelEvent.swift | 11 +++++++++-- .../MacPacketTunnelProvider.swift | 5 +++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index e91c8af306..f469fadf58 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -33,7 +33,7 @@ "location" : "https://github.com/duckduckgo/BrowserServicesKit", "state" : { "branch" : "sam/validate-errors-before-throwing-them-to-the-os", - "revision" : "aff5f0ca16cc9861157014c96752ec366d4f2c15" + "revision" : "a853f3ac5450bd515c4974808c7d91949f0ee6f5" } }, { diff --git a/DuckDuckGo/NetworkProtection/AppAndExtensionAndAgentTargets/NetworkProtectionPixelEvent.swift b/DuckDuckGo/NetworkProtection/AppAndExtensionAndAgentTargets/NetworkProtectionPixelEvent.swift index b76f79f60b..ce1b4fca3a 100644 --- a/DuckDuckGo/NetworkProtection/AppAndExtensionAndAgentTargets/NetworkProtectionPixelEvent.swift +++ b/DuckDuckGo/NetworkProtection/AppAndExtensionAndAgentTargets/NetworkProtectionPixelEvent.swift @@ -118,6 +118,8 @@ enum NetworkProtectionPixelEvent: PixelKitEventV2 { case networkProtectionConfigurationPixelTest case networkProtectionConfigurationFailedToParse(_ error: Error) + case networkProtectionMalformedErrorDetected(_ error: Error) + case networkProtectionUnhandledError(function: String, line: Int, error: Error) /// Name of the pixel event @@ -348,6 +350,9 @@ enum NetworkProtectionPixelEvent: PixelKitEventV2 { case .networkProtectionConfigurationFailedToParse: return "netp_ev_configuration_failed_to_parse" + case .networkProtectionMalformedErrorDetected: + return "netp_malformed_error_detected" + case .networkProtectionUnhandledError: return "netp_unhandled_error" } @@ -466,7 +471,8 @@ enum NetworkProtectionPixelEvent: PixelKitEventV2 { .networkProtectionDNSUpdateCustom, .networkProtectionDNSUpdateDefault, .networkProtectionConfigurationInvalidPayload, - .networkProtectionConfigurationPixelTest: + .networkProtectionConfigurationPixelTest, + .networkProtectionMalformedErrorDetected: return nil } } @@ -495,7 +501,8 @@ enum NetworkProtectionPixelEvent: PixelKitEventV2 { .networkProtectionSystemExtensionActivationFailure(let error), .networkProtectionServerMigrationFailure(let error), .networkProtectionConfigurationErrorLoadingCachedConfig(let error), - .networkProtectionConfigurationFailedToParse(let error): + .networkProtectionConfigurationFailedToParse(let error), + .networkProtectionMalformedErrorDetected(let error): return error case .networkProtectionActiveUser, .networkProtectionNewUser, diff --git a/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/NetworkExtensionTargets/MacPacketTunnelProvider.swift b/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/NetworkExtensionTargets/MacPacketTunnelProvider.swift index 60e7d064db..1b080d38df 100644 --- a/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/NetworkExtensionTargets/MacPacketTunnelProvider.swift +++ b/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/NetworkExtensionTargets/MacPacketTunnelProvider.swift @@ -399,6 +399,11 @@ final class MacPacketTunnelProvider: PacketTunnelProvider { NetworkProtectionPixelEvent.networkProtectionTunnelStartAttemptOnDemandWithoutAccessToken, frequency: .dailyAndCount, includeAppVersionParameter: true) + case .malformedErrorDetected(let error): + PixelKit.fire( + NetworkProtectionPixelEvent.networkProtectionMalformedErrorDetected(error), + frequency: .dailyAndCount, + includeAppVersionParameter: true) } } From 618fef2afc794e099bd7ff2373ea1a5f987b67b2 Mon Sep 17 00:00:00 2001 From: Sam Symons Date: Sun, 3 Nov 2024 15:18:06 -0800 Subject: [PATCH 3/3] Set BSK to 203.0.0. --- DuckDuckGo.xcodeproj/project.pbxproj | 2 +- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 4 ++-- LocalPackages/DataBrokerProtection/Package.swift | 2 +- LocalPackages/NetworkProtectionMac/Package.swift | 2 +- LocalPackages/SubscriptionUI/Package.swift | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index c79cce94d0..832cc7e21a 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -14684,7 +14684,7 @@ repositoryURL = "https://github.com/duckduckgo/BrowserServicesKit"; requirement = { kind = exactVersion; - version = 202.4.0; + version = 203.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 d4630afbc7..b1e3143165 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" : "80894bf69fe789e41b13f3de6be97f1300ca56e5", - "version" : "202.4.0" + "revision" : "45261df2963fc89094e169f9f2d0d9aa098093f3", + "version" : "203.0.0" } }, { diff --git a/LocalPackages/DataBrokerProtection/Package.swift b/LocalPackages/DataBrokerProtection/Package.swift index 263b0e9c44..81c1a4d1b9 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: "202.4.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "203.0.0"), .package(path: "../SwiftUIExtensions"), .package(path: "../XPCHelper"), .package(path: "../Freemium"), diff --git a/LocalPackages/NetworkProtectionMac/Package.swift b/LocalPackages/NetworkProtectionMac/Package.swift index 4a0458db28..5510c60228 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: "202.4.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "203.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 d1335e2589..39a44b7ea7 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: "202.4.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "203.0.0"), .package(path: "../SwiftUIExtensions") ], targets: [