AdguardTeam / AdguardForiOS

The most advanced ad blocker for iOS
https://adguard.com/
GNU General Public License v3.0
1.43k stars 202 forks source link

DNS filtering / privacy module disabled after some time #771

Closed kevandoyle2 closed 6 years ago

kevandoyle2 commented 6 years ago

This has been occurring in all 3 modes, including the new mode of full-tunnel (with the VPN icon, a feature that I assume is new as of the update yesterday). When I say disabled, I do not mean it toggles itself off, rather, it continues to be toggled on but it will not filter DNS traffic and sometimes stop internet connections all together.

Steps to reproduce

  1. Enable the privacy module
  2. Close the app and continue to use device as normal, opening apps that run ads and using them
  3. After using an app for a few seconds, close it. Open the Adguard app again and open the DNS request log. Close request log and repeat 2 and 3. If nothing happens, try switching between wifi and cellular networks. Another way to induce this issue is by switching between the two full-tunnel modes while the module is enabled.
  4. Eventually, device traffic will stop being filtered, even though the privacy module remains enabled, allowing ads to be displayed.

I have not tried this with split-tunnel, only with the new and old version of full-tunnel. When this bug happens, I have found turning the module off and on again will usually fix it, but in some cases I have had to restart my entire device to get it working again. It should be able to remain connected continuously, even when switching between cellular and wifi networks, and between modes.

Customer ID

1860764

Your environment

ghost commented 6 years ago

Same thing happens to me. After the latest update 2.1.0, with "Full-Tunnel" mode I have no connection to the internet (wifi or mobile). "Split-Tunnel" works fine.

AdGuard Pro 2.1.0 iPhone 7 on iOS 11.0.3

IvanIin commented 6 years ago

@kevandoyle2 @rafuse To resolve this issue i need logs from your devices. Please choose "report an issue" -> "contact the support" to send us logs and write your user ids here. Also write a time when such behavior was observed.

kevandoyle2 commented 6 years ago

My user ID as per the auto reply email: 1860764

IvanIin commented 6 years ago

@kevandoyle2 I did not find not blocked advertising domains in the logs. Could you specify the exact time when the advertisement appears?

kevandoyle2 commented 6 years ago

It is no advertisement or time in particular. It is just the issue in which after a while of use the app will stop filtering DNS traffic, even though the module is still toggled on. This is most likely why it does not show up in the logs.

ghost commented 6 years ago

This is eerily similar to the issue I encountered in #748 . I’ve not run into this since the latest β release; it’s unfortunate others are, though it does certainly help in bug squashing. So for that I am grateful you both @kevandoyle2 & @rafuse for running into this.

kevandoyle2 commented 6 years ago

No problem at all, love the app.

Is there a reasonable eta you might have on a hotfix?

zeezeepiggy commented 6 years ago

Split Tunnel seems to be fine. The Full Tunnels have some weird issues when jumping to network... Still love the app. But i am in Split Tunnel for the time being since i always jump networks from cellular to wifi and vice versa.

kathampy commented 6 years ago

I have the same issue after that last update. Full-Tunnel Mode doesn’t work anymore on 4G. It only works on Wi-Fi. All apps show connection errors.

Even after disconnecting from Wi-Fi the icon remains on 1 bar and doesn’t switch to 4G.

ghost commented 6 years ago

@kevandoyle2 , I was rereading the various posts & this caught my attention:

It is no advertisement or time in particular. It is just the issue in which after a while of use the app will stop filtering DNS traffic, even though the module is still toggled on. This is most likely why it does not show up in the logs.

If by “[stopping] filtering DNS traffic” you mean stopping all ad, tracking, etc. blocking, then this does actually differ from my own experience in the two previous releases in one important way. Yes, logging had stopped. My DNSCrypt server connection was interrupted, returning to using my iPhone’s default DNS servers. But never did any of AdGuard’s blocking capabilities stop functioning.

kevandoyle2 commented 6 years ago

@X8716e in your case, AG’s functionality remains in tact because either your device or yourself made the switch back to default DNS when the dnscrypt (or other encrypted dns) connection was interrupted. I never meant to say there was an issue with AG’s ad blocking capabilities, rather the way it handles the connection to my selected dns server. In my case, when that connection is interrupted (to dnscrypt), it would remain on dnscrypt until I manually restart the module or change dns servers. This is what I meant by stopping the filtering of dns traffic.

As a note, up to now I have only been having that issue with the full tunnel modes, not split tunnel. As far as I can tell, split tunnel works as intended, with a continuous connection to my selected dns server, even across cellular and WiFi networks.

ghost commented 6 years ago

@kevandoyle2 , thank-you for the clarification.

ghost commented 6 years ago

I don't want to be rude, but it's been almost 2 weeks now.. is this going to be fixed anytime soon? I mean, people paid for the app and users are put to risk when such a basic function doesn't work as intended.

I really appreciate the effort of AdGuard team though!

ameshkov commented 6 years ago

I suppose that the next beta build will cover most of the open high priority bugs at once, but we'd better verify it before publishing the update.

Do you mind signing up for the beta test?

ghost commented 6 years ago

Do you mind signing up for the beta test?

If it helps, I'd be happy to sign up! Where do I have to do this?

ghost commented 6 years ago

Here is the form to use: https://docs.google.com/forms/d/e/1FAIpQLSf5JWqO_Qsdri1nwJphse46Qk48YHVyc3IZs1l-XmJ3ff0dDQ/viewform

zebrum commented 6 years ago

Guys! Who of you want to check if the problem was fixed? I need to know your apple_id to add you to a small beta test group. Contact me in Telegram (the same name as here) or write me an email to mg@adguard.com

Marco224 commented 6 years ago

hi guys, in my case AdGuard beta version 2.1.1 (158) did not solve the problem :(

ameshkov commented 6 years ago

Could you please send the logs to devteam at adguard.com?

Marco224 commented 6 years ago

I have sent it, here is the video recording, the banner appears at the bottom of the screen. User ID: 1148487

https://ufile.io/i7j5j

bug-killer commented 6 years ago

Archive.zip The logs from @Marco224

zebrum commented 6 years ago

@Marco224 post here a link to the app. Does the problem appear in other apps?

Marco224 commented 6 years ago

The problem appears in all the apps. It is easy for me to reproduce it, just activate "wifi assistance" in settings-> cellular -> scroll down to the end -> activate "wifi assistance". This setting speeds up the transition between wifi and cellular network, so just go to an area where the wifi has a medium-low signal and use any app that requires internet data in daily use or in the steps between the various menus or pages. (I say this only to make the problem even more evident, actually it appears even if the wifi assistance is off).

the app that I used in the video is Newsify, just a rss reader, but then again, the ads appear in the same way in all the other apps, here the link: https://itunes.apple.com/us/app/newsify-rss-reader/id510153374?mt=8

Marco224 commented 6 years ago

Hi guys I’m here again, it seems that the problem is not solved yet, I have tested the same app previously linked and here is the video using the new version 2.1.1 (161) and all privacy module suggestions enable: https://ufile.io/cifvp

I did a quick test but it seems that as before, the ads appear in all the apps. I have already sent the log file. User ID: 1148487

Marco224 commented 6 years ago

Here is another video using google news app where at the end appears the ads. Normally it would be so: img_4598

https://ufile.io/8hd0z

I have sent the log again

IvanIin commented 6 years ago

@Marco224
In the log to the firs video I see that system wide blocking works as it should. You can see the blocked domains in request log(to view it tap on dns requests statistics cell). Perhaps our filter does not contains the necessary domain names. You can try to block domains directly from request log. hello.lqm.io looks like an ads domain, try to block it first.

Marco224 commented 6 years ago

Tanks to reply, I have add that domain to black list but nothing is change

ameshkov commented 6 years ago

Make sure that this domain is now blocked (check the filtering log).

It does seem we're missing some of the ad domains, otherwise it's hard to explain why you see ads.

And one more thing, the ad you see have a small rectangle "ad choices" icon in the corner of the banner. Try tapping on it -- it will show where the ad comes from.

Marco224 commented 6 years ago

That domain doesn’t appear again in the filtering log... anyhow I did as you said but the domain of advertising seems to be already blocked in the log even if I continue to see it. this happens only with a weak connection that leads to the change between wifi and cellular data, not using a stable connection. 2888030d-5740-4c3c-a5df-a92c9306dd46 f805691a-01ff-403b-a5dc-ad727ea87c65

ameshkov commented 6 years ago

Hm, weird. Does switching to full tunnel change anything?

Marco224 commented 6 years ago

No, it change only ads (that is blocked in the log (is red)) that appear every time I switch between WiFi and cellular..

Marco224 commented 6 years ago

in full tunnel with vpn icons also happens sometimes that in the passage to cellular data the internet connection is stopped until you activate and deactivate the airplane mode or connect to the Wi-Fi network.. so it is better without vpn icon for me. 0ada6363-1531-4eda-b4fb-0aa01b4843d8

bug-killer commented 6 years ago

logs.zip Logs from @Marco224

ameshkov commented 6 years ago

@Marco224 one more thing regarding changing between Wi-Fi and Cellular: in the new beta version there's a new flag that lets you disable tunnel restart on a network change. Could you please try it and see if it changes anything?

Marco224 commented 6 years ago

I did a quick test, but it seems to be perfect right now disabling tunnel restart :)

ameshkov commented 6 years ago

@Marco224 that's great news, thank you for testing it!

@IvanIin I guess this might help with the issue @Goddess-Bastet faces in #772.

First of all, let's consider making it the default behavior (again). Second, to mitigate the issue, consider adding a slight delay after the Wi-Fi - Mobile data transition.

Marco224 commented 6 years ago

It’s just perfect, in all tunnel mode disabling tunnel restart, full tunnel without vpn icon doesn’t show ads during switch anymore and full tunnel with vpn icon doesn’t block internet connection.

I only have one question, the disabling tunnel restart can involve something negative?

Great work 👍🏻

Marco224 commented 6 years ago

@ameshkov I do not know if it can help, but in the past I also had the same problem of Goddess-Bastet and I solved with a forced reboot (home + sleep until the apple appears), probably not an error of adguard but it is an error of ios: some recommend a reset of the network settings in case the forced restart does not solve the problem.

ameshkov commented 6 years ago

I only have one question, the disabling tunnel restart can involve something negative?

In theory, it should work just okay.

Goddess-Bastet commented 6 years ago

First thing I tried @Marco224 & it didn’t work. Afaik the network reset is for WiFi settings but I will try it.

Marco224 commented 6 years ago

So, forget I said anything... probably mine was due to something different, if I remember it happened after a bad iOS update or a restore of a backup. I know, it was really frustrating for me.

Goddess-Bastet commented 6 years ago

It’s good that we’re sharing what is working for us. I first suspected it was 4G which was the problem as it appeared 3G was fine (when I was in a 3G area) but that wasn’t the case. For me the problem is intermittent - it can go away for days then return.

Marco224 commented 6 years ago

@Goddess-Bastet Mmh it is a stranger things... probably in your case I would try to circumscribe the problem with the various gradually deeper reset (network reset etc. ..) always after a backup in the original situation. This always after confirming that it is not a problem related to the new version of AdGuard or some interference with some other vpn configuration. This would take a long time...

Anyway I do not know why but the problem with advertising this morning has returned :( happens the same thing that previously, in the log file advertising appears blocked but is always visible in applications ... this happens however much more rarely than before, as if in some rare times the tunnel is restarted even if the option is deactivated.The ads that appear have the most diverse sources: AppLovin (again as the screen), Amazon-adsystem or appstore app ... I have the various screens but I do not want to clog the thread unnecessarily.

2363fe2f-3d84-4548-b6ff-e566feef4797 e6d26454-5789-47f8-8344-66ce3134b4fc 27332876-3ede-4cb8-8f29-6652b72f299d

ameshkov commented 6 years ago

@Goddess-Bastet have you tried disabling the tunnel restart in the AG advanced settings?

ameshkov commented 6 years ago

@Marco224

Anyway I do not know why but the problem with advertising this morning has returned :(

Is there anything common in the situations when it returns? For instance: network change, device wakeup or smth like this? Does it always happen on Wi-Fi?

Marco224 commented 6 years ago

now it is much rarer to reproduce it, but as before, it always happens in the transition between wifi and cellular. It only happens when you switch from wifi to mobile, it does not happen when you switch from mobile to wifi. Is it possible that the tunnel is not 100% stable and does it restart some time during the switch?

Goddess-Bastet commented 6 years ago

Yes & so far that seems to work in my case.

Marco224 commented 6 years ago

I have done some test on iPad, it is very easy to reproduce here... here is the video and dns log: https://ufile.io/jous4

zebrum commented 6 years ago

How it goes on build .165?

Goddess-Bastet commented 6 years ago

Good providing the ‘restart when network changes’ switch is off but as soon as you turn it on everything is blocked again.