Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AdGuard blocks Internet connection #2842

Closed
Chinaski1 opened this issue Jun 26, 2019 · 82 comments
Closed

AdGuard blocks Internet connection #2842

Chinaski1 opened this issue Jun 26, 2019 · 82 comments

Comments

@Chinaski1
Copy link
Member

When the user switching from Wi/Fi to LTE internet connection is lost.
Need relaunch protection to reconnect.

"pref.vpn.disable.reconfigure" : true
"pref.vpn.disable.pause" : true

User ID

2228088

Logs

Your environment

  • Adguard version: 3.1.0/3.1.44n
  • Adguard filtering mode: Local VPN
  • Device model: Xiaomi Mi 9
  • Operating system and version: 9
  • Root access: Yes
@ameshkov
Copy link
Member

@Chinaski1 "record everything"-level logs are required to troubleshoot

@Chinaski1
Copy link
Member Author

Same problem : 1557976 Logs in NCloud
18:25 27|06

And another one: 2240216 Logs in NCloud

@Chinaski1
Copy link
Member Author

When switching from 4G to Wi / Fi, the Internet connection is lost

User ID

1889438

Logs in NCloud

Your Environment

Adguard version: 3.1.0
Device model: Xiaomi Mi A1
Operating system and version: 9
Adguard filtering mode: Local VPN

@Chinaski1
Copy link
Member Author

One more user @ev_klzn
User update from 8 to 9 Android. From time to time the Internet connection is lost
(Both Wi / Fi and LTE)
Device model: Xiaomi Redmi note 5.
Logs in Ncloud

@dnovitskyi
Copy link

Same issue for user 2240216.
Samsung G960F, Wi-Fi/LTE, issues began quite recently.

@Chinaski1
Copy link
Member Author

Another one user: 1254045
Connection lost on Wi/Fi and LTE
Device model: SM-G975F
Logs in Ncloud

@ameshkov
Copy link
Member

ameshkov commented Jul 3, 2019

Also this one:
#2872

My device : Samsung A8 2018
OS : Android pie
Adguard V. : 3.1.0
Dns filtering : ON ( cloudflare server )
Adguard filtering method : Local VPN
Antivirus : Kaspersky mobile security
Root access : No

@ameshkov ameshkov added this to the 3.2 milestone Jul 3, 2019
@ameshkov
Copy link
Member

ameshkov commented Jul 3, 2019

@Chinaski1 @TheHasagi to figure out what's wrong, we need to get the logcat log:
https://kb.adguard.com/en/android/solving-problems/logcat

It needs to be exported right after the issue is reproduced.

@Eugene-Savenko
Copy link
Member

Eugene-Savenko commented Jul 6, 2019

Another report here - 2045896

На устройстве android после установки adguard начались перебои с работой интернета (не грузятся страницы в браузере гугл хром, не работают приложения, требующие интернет соединения), но при выключении и повторном включении AdGuard, работа восстанавливается.

My device : Samsung Galaxy M20 (SM-M205FN)
OS : Android 9
Adguard V. : 3.1.0
Dns filtering : false
Adguard filtering method : Local VPN
Antivirus : n/a
Root access : n/a

And here - 1562409

My device : Samsung Galaxy S10 Plus (SM-G975F)
OS : Android 9
Adguard V. : 3.1.0
DNS filtering : false
Adguard filtering method : Local VPN
Antivirus : n/a
Root access : n/a

@ameshkov
Copy link
Member

ameshkov commented Jul 13, 2019

We cannot reproduce this even on the same test devices.

Here's what we need to troubleshoot:

  1. Wait until the issue happens again
  2. Get logcat: https://kb.adguard.com/en/android/solving-problems/logcat
  3. Get AdGuard's own log files (settings -> advanced -> export logs)
  4. Remember the exact time when it happened

@patrickdrd
Copy link

patrickdrd commented Jul 14, 2019

it happens to me too,
I'm attaching logcat and log files:

adguard_logs_3.2.95_1407_183159.zip

2019-07-14-18-29-42.txt

the time it happened should be around 18:25:
java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: Connection closed by peer

I restarted AG and connection was restored

I'm running latest nightly on local proxy (root) with cloudflare dns (regular)

@patrickdrd
Copy link

patrickdrd commented Jul 14, 2019

what are all these

`TLS connection is not HTTPS, adding 'com.facebook.katana#157.240.20.15:443#graph.facebook.com' to exceptions

TLS connection is not HTTPS, adding 'com.facebook.katana#157.240.20.35:443#b-api.facebook.com' to exceptions

TLS connection is not HTTPS, adding 'com.facebook.katana#157.240.20.35:443#b-graph.facebook.com' to exceptions

TLS connection is not HTTPS, adding 'com.facebook.katana#157.240.20.15:443#api.facebook.com' to exceptions

TLS connection may not be filtered because CA cert is not recognized by application, adding 'com.facebook.katana#157.240.20.10:443#edge-mqtt.facebook.com' to exceptions

TLS connection is not HTTPS, adding 'com.instagram.android#157.240.20.63:443#i.instagram.com' to exceptions

TLS connection may not be filtered because CA cert is not recognized by application, adding 'com.instagram.android#157.240.20.19:443#connect.facebook.net' to exceptions`

should I do something about them?

@dnovitskyi
Copy link

Progress update:

2228088 reports that the issue cannot be reproduced when his phone is connected to a PC. Asked for clean logcat logs, just for the case.
1557976 had encountered problems while installing ADB/Fastboot; ADB fails to recognize his device.

2240216, 1889438, 1254045, 2045896, 1562409: logs requested. Waiting for response.

@Eugene-Savenko
Copy link
Member

Eugene-Savenko commented Jul 17, 2019

Find a logcat here (two instances collected in a different time): 2228088

@dnovitskyi
Copy link

One more user with this issue: 2075818. Requested logcats, waiting for reply.

@Eugene-Savenko
Copy link
Member

We have logcat from 1889438

@ameshkov
Copy link
Member

ameshkov commented Jul 25, 2019

@AdguardTeam/support-team guys, next time please request this instead of logcat.

It contains all the necessary information + logcat. Besides that, we'll need to get AdGuard logs.

Also, we'll need to know the time when the issue happened.

Template:

To troubleshoot this issue, we need to get the additional logs.

When the issue happens again, please do the following:

  1. Remember the exact time when the issue happened, we will need it to find the corresponding records in the log file.
  2. Export AdGuard log: settings -> advanced -> export logs
  3. Additionally, capture the system bug report after reproducing the issue. Here's the instruction.
  4. Send both files to us, and please mention the exact time when the issue was reproduced.

@ameshkov
Copy link
Member

I'm running latest nightly on local proxy (root) with cloudflare dns (regular)

Root is different. Most likely, AdGuard was killed by Android.

should I do something about them?

Nope, these are okay.

@ameshkov
Copy link
Member

ameshkov commented Jul 25, 2019

2228088

Too late to record the logcat:(

Please ask the user to do this:
#2842 (comment)

Considering that capturing Android bug report is not as complicated and does not require connecting to a computer, it'd be much easier to collect the necessary information.

@ameshkov
Copy link
Member

1889438

This one looks very relevant actually:

07-18 07:32:42.029 16681 16881 E com.adguard.android.filtering.api.LocalVpnService: [tcpip-stack-pool-3-thread-4] TCP id=919 Unexpected exception in the onTcpConnectRequest handler
07-18 07:32:42.029 16681 16881 E com.adguard.android.filtering.api.LocalVpnService: java.lang.IllegalStateException: Network filter is already closed
07-18 07:32:42.029 16681 16881 E com.adguard.android.filtering.api.LocalVpnService: 	at com.adguard.filter.NativeNetworkFilterImpl.a(NativeNetworkFilterImpl.java:9) ~[na:0.0]
07-18 07:32:42.029 16681 16881 E com.adguard.android.filtering.api.LocalVpnService: 	at com.adguard.android.filtering.filter.d$a.a(ConnectionFilter.java:2) ~[na:0.0]
07-18 07:32:42.029 16681 16881 E com.adguard.android.filtering.api.LocalVpnService: 	at com.adguard.android.filtering.api.LocalVpnService$a.a(LocalVpnService.java:35) ~[na:0.0]
07-18 07:32:42.029 16681 16881 E com.adguard.android.filtering.api.LocalVpnService: 	at com.adguard.android.filtering.api.LocalVpnService$a.onTcpConnectRequest(LocalVpnService.java:15) ~[na:0.0]
07-18 07:32:42.029 16681 16881 E com.adguard.android.filtering.api.LocalVpnService: 	at com.adguard.corelibs.tcpip.NativeTcpIpStackImpl$Callbacks$1.run(NativeTcpIpStackImpl.java:1) ~[na:0.0]
07-18 07:32:42.029 16681 16881 E com.adguard.android.filtering.api.LocalVpnService: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) ~[na:0.0]
07-18 07:32:42.029 16681 16881 E com.adguard.android.filtering.api.LocalVpnService: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) ~[na:0.0]
07-18 07:32:42.029 16681 16881 E com.adguard.android.filtering.api.LocalVpnService: 	at java.lang.Thread.run(Thread.java:764) ~[na:0.0]

@patrickdrd
Copy link

Root is different. Most likely, AdGuard was killed by Android.

I didn't say that AG was killed, but my internet connection did,
it has happened twice lately if I'm not mistaken,
very rare issue, but awfully annoying when it happens

@Chinaski1
Copy link
Member Author

User ID: 2580549
Time/Date: 11:25-12:29 | 11.03.2020

@Chinaski1
Copy link
Member Author

User ID: 2595086
Time/Date: 09:55 | 17.03.2020

@ameshkov ameshkov modified the milestones: 3.5, 3.4 Mar 23, 2020
@artemiv4nov
Copy link
Contributor

After all, at another one deep study of the problem, we noticed unusual network behavior that told us where the possible bug has been hidden.
The first, unofficial bug fix has appeared in the Nightly 9. We interviewed the AdGuard community members who were most often exposed to this problem and all confirmed the fix is succeeded.
We hope the fix will be a success for you all, also.

@dnovitskyi
Copy link

User 2669879 reports that the problem has not gone away. They are running AdGuard 3.4 beta 1.
See support ticket 2669879 for detailed logs.

@artemiv4nov
Copy link
Contributor

Got the situation from User 2669879, sent an email.

@quyleanh
Copy link

I still have this error sometimes...

@Jinestic
Copy link

Jinestic commented Jun 2, 2020

Internet blocking issue still present on 3.4 stable. Yes, it's less prevalent compared to 3.3 but it's definitely not fixed.

Also, It's not actually related to switching connections between wifi/LTE because many time it blocks internet access even in same WiFi connection, it's like internet was working a minute ago now no application can connect to internet unless I go to Adguard manually, and disable protection and re-enable it. (quick setting widget turn off/on also don't work to gain internet access back)

I'm on POCO F1 but with custom ROM Android 10, so it's not like MIUI is shutting down adguard.
Plus Battery optimization is disabled
Running in Background allowed fully
Even allowed OOM adjustment via advanced setting with root

But issue stays. (Same issue was there in stock MIUI Android 10 as well, same setup as described above)

It's kind of random on daily basis but mostly happens after using device that has been in ideal for some time. Also, it doesn't happen right after waking up ideal device as internet works for sometime and then suddenly nothing connects ! So, manual reconnect is required to get Internet access back as described initially.

Don't know what kind of logs you'll need for this so let know.

@quyleanh
Copy link

quyleanh commented Jun 2, 2020

@jineshpatel30 Your description is the same with me. I notice that the issue is not happened when using mobile data, it's seems only happen on wifi network.

@Jinestic
Copy link

Jinestic commented Jun 2, 2020

@jineshpatel30 Your description is the same with me. I notice that the issue is not happened when using mobile data, it's seems only happen on wifi network.

I'm on WiFi for like 99% of time, so what you're saying is highly probable but I can't confirm.

@quyleanh
Copy link

quyleanh commented Jun 2, 2020

@jineshpatel30 ok. Hope this issue is fix.

@Jinestic
Copy link

Jinestic commented Jun 5, 2020

@jineshpatel30 ok. Hope this issue is fix.

Hey can you check whether internet blocking issue continues for you if you use "Proxy Blocking" method instead of VPN. (Auto proxy won't work without root but you can still setup manual proxy) Adguard will guide you through steps.

I have an Interesting theory through my experiment yesterday.
https://forum.adguard.com/index.php?threads/what-causes-adguard-to-block-my-internet-connection.29301/post-198917

@quyleanh
Copy link

quyleanh commented Jun 5, 2020

@jineshpatel30 I am checking now.
There is some work around for this, I think. You can try to pause and resume the protection from notification panel. I did twice and it worked.

@Jinestic
Copy link

Jinestic commented Jun 5, 2020

@jineshpatel30 I am checking now.
There is some work around for this, I think. You can try to pause and resume the protection from notification panel. I did twice and it worked.

I tried pause & resume few days back but some time that also doesn't work :(
Anyway give Proxy blocking a try, I'm using it for around 12 hours now without any network drop so far. See how it turns out for you and let them know here.

@quyleanh
Copy link

quyleanh commented Jun 5, 2020

@jineshpatel30 is there any recommended proxy server?
Btw, the ads is not blocked well when I change to proxy mode...

@Jinestic
Copy link

Jinestic commented Jun 5, 2020

@jineshpatel30 is there any recommended proxy server?
Btw, the ads is not blocked well when I change to proxy mode...

I don't think so, It's local proxy so there's nothing like different proxy server. Tough, I think Manual Proxy doesn't work with mobile data, You'll need WiFi for manual proxy setup. For me it was auto configured since I have root but here's manual setup guide.
https://kb.adguard.com/en/android/faq#how-to-manually-configure-a-local-http-proxy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment