From 57263538c79f5a561c449229ac8e068c641285d3 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Fri, 7 Nov 2025 09:14:21 +0200 Subject: [PATCH] fix(YouTube - Check watch history domain name resolution): Fix false positive warning message if the internet connection fails halfway into the DNS check --- .../patches/CheckWatchHistoryDomainNameResolutionPatch.java | 6 +++++- patches/src/main/resources/addresources/values/strings.xml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/extensions/shared/library/src/main/java/app/revanced/extension/shared/patches/CheckWatchHistoryDomainNameResolutionPatch.java b/extensions/shared/library/src/main/java/app/revanced/extension/shared/patches/CheckWatchHistoryDomainNameResolutionPatch.java index 23321c0e5..d12eabc0b 100644 --- a/extensions/shared/library/src/main/java/app/revanced/extension/shared/patches/CheckWatchHistoryDomainNameResolutionPatch.java +++ b/extensions/shared/library/src/main/java/app/revanced/extension/shared/patches/CheckWatchHistoryDomainNameResolutionPatch.java @@ -61,7 +61,11 @@ public class CheckWatchHistoryDomainNameResolutionPatch { // Prevent this false positive by verify youtube.com resolves. // If youtube.com does not resolve, then it's not a watch history domain resolving error // because the entire app will not work since no domains are resolving. - if (!domainResolvesToValidIP("youtube.com") + String domainYouTube = "youtube.com"; + if (!domainResolvesToValidIP(domainYouTube) + || domainResolvesToValidIP(HISTORY_TRACKING_ENDPOINT) + // Check multiple times, so a false positive from a flaky connection is almost impossible. + || !domainResolvesToValidIP(domainYouTube) || domainResolvesToValidIP(HISTORY_TRACKING_ENDPOINT)) { return; } diff --git a/patches/src/main/resources/addresources/values/strings.xml b/patches/src/main/resources/addresources/values/strings.xml index 9e8937059..bf2a45a87 100644 --- a/patches/src/main/resources/addresources/values/strings.xml +++ b/patches/src/main/resources/addresources/values/strings.xml @@ -45,7 +45,7 @@ Second \"item\" text" APK build date is corrupted - Warning + ReVanced Notice Your watch history is not being saved.<br><br>This most likely is caused by a DNS ad blocker or network proxy.<br><br>To fix this, whitelist <b>s.youtube.com</b> or turn off all DNS blockers and proxies. Do not show again