AdguardForAndroid icon indicating copy to clipboard operation
AdguardForAndroid copied to clipboard

Lost network when Adguard is not foreground when using Automatic proxy.

Open TigerBeanst opened this issue 1 year ago • 3 comments

Please answer the following questions for yourself before submitting an issue

  • [X] Filters were updated before reproducing an issue
  • [X] I checked the knowledge base and found no answer
  • [X] I checked to make sure that this issue has not already been filed

AdGuard version

4.4.189(10171804)

Environment

  • OS version: Android 14
  • Device: Xiaomi 14 Pro

HTTPS filtering

  • [X] yes, I do

Root access

  • [X] yes, I have it

Integration with AdGuard VPN

  • [ ] yes, I do

Routing mode

Automatic proxy

Which DNS server do you use?

Custom DNS

DNS protocol

None

Custom DNS

127.0.0.1:1053

Issue Details

Base on #5287 , I create a new issue here. https://github.com/AdguardTeam/AdguardForAndroid/issues/5287#issuecomment-2134839064

TigerBeanst avatar May 28 '24 15:05 TigerBeanst

@TigerBeanst Could you add detailed steps on how to reproduce this issue? Please add an info about Shizuku mode as well.

Versty avatar May 28 '24 15:05 Versty

I was just about to write the same problem because I bounced with automatic messages from support. I identified an issue where if some other app messes with something on the connections (e.g. another VPN app) adguard sometimes freezes and you can't turn on protection manually or automatically. You must kill adguard to enable protection. I probably also know the reason for this, I checked in the root logs adguard access and it is in proxy mode requested only once at adguard startup, if something changes in the connection later, adguard does not request root access and is not able to set Internet system routes. The solution is to request root rights in proxy mode every time when adguard disables protection for some reason.

playaz44 avatar May 29 '24 04:05 playaz44

Ref

playaz44 avatar Jun 15 '24 13:06 playaz44

@TigerBeanst Does the issue persist on latest version of AdGuard (4.6.1)?

Versty avatar Jul 29 '24 15:07 Versty

@TigerBeanst Any updates?

Versty avatar Aug 08 '24 09:08 Versty

@playaz44 Could you also check with AdGuard for Android 4.6.1?

Versty avatar Aug 08 '24 09:08 Versty

@playaz44 Could you also check with AdGuard for Android 4.6.1?

Hello, yes, the problem persists. I have pixel 7 pro root without sizuku

playaz44 avatar Aug 08 '24 10:08 playaz44

@playaz44

adguard sometimes freezes and you can't turn on protection manually or automatically. You must kill adguard to enable protection. I probably also know the reason for this, I checked in the root logs adguard access and it is in proxy mode requested only once at adguard startup, if something changes in the connection later, adguard does not request root access and is not able to set Internet system routes. The solution is to request root rights in proxy mode every time when adguard disables protection for some reason.

Are you allowing root access for AdGuard for the Once or Forever time period while starting the protection?

Versty avatar Aug 08 '24 11:08 Versty

@TigerBeanst Any updates?

Sorry about being late. I have tried 4.7.10(10212591), it still lose my network.

TigerBeanst avatar Aug 08 '24 11:08 TigerBeanst

@TigerBeanst @playaz44 We would like to take a look at the logs from your devices. Could you please collect the logs and send the file to our email following the steps below?

  1. Enable debug logging: Settings -> General -> Advanced -> Logging level -> Debug

  2. Wait for the issue to be reproduced, then remember the exact time when it happened

  3. Collect logs: Settings -> General -> Advanced -> Export logs and system info

  4. Send this file to [email protected]:

    • mention the 5338 number in the subject
    • specify the exact time when the issue occurred

Versty avatar Aug 08 '24 11:08 Versty

@Versty Sent ;)

TigerBeanst avatar Aug 08 '24 12:08 TigerBeanst

@TigerBeanst We are currently examining your logs and see that you have changed logging level to debug at 19:58:34. Did you experience the issue with network loss after that point and up until the time you exported the logs?

Versty avatar Aug 08 '24 12:08 Versty

@playaz44

adguard sometimes freezes and you can't turn on protection manually or automatically. You must kill adguard to enable protection. I probably also know the reason for this, I checked in the root logs adguard access and it is in proxy mode requested only once at adguard startup, if something changes in the connection later, adguard does not request root access and is not able to set Internet system routes. The solution is to request root rights in proxy mode every time when adguard disables protection for some reason.

Are you allowing root access for AdGuard for the Once or Forever time period while starting the protection?

Root rights for adguard it's granted forever. The problem I wrote about is that adguard get root rights once at the start of the app and later never again ask for root perms.

//edit: I sent logs and provided the time of adguard crashed in email

playaz44 avatar Aug 08 '24 17:08 playaz44

@TigerBeanst We are currently examining your logs and see that you have changed logging level to debug at 19:58:34. Did you experience the issue with network loss after that point and up until the time you exported the logs?

Yes

TigerBeanst avatar Aug 16 '24 06:08 TigerBeanst

I sent logs to support email almost a month ago highlighting this issue, can someone check it out?

playaz44 avatar Aug 28 '24 14:08 playaz44

@playaz44 We have received and examined your logs, thank you! Currently we are trying to reproduce this issue on our side and are looking for a proper fix.

Versty avatar Sep 02 '24 15:09 Versty

@TigerBeanst @playaz44 Please disable the IPv6 filtering option in the low-level settings and monitor the application behavior for a while. Let me know if the issue persists.

Versty avatar Sep 04 '24 09:09 Versty

@TigerBeanst @playaz44 Please disable the IPv6 filtering option in the low-level settings and monitor the application behavior for a while. Let me know if the issue persists.

After disabling ipv6 filtering the problem is resolved. Is the problem known or do I have open a new issue?

playaz44 avatar Sep 04 '24 17:09 playaz44

@playaz44 Glad to hear that the temporary solution helped. Will be resolved in this issue, so no need to create a new one.

Versty avatar Sep 05 '24 13:09 Versty

@playaz44 Does this issue reproduce on your device in Local VPN operating mode with enabled IPv6 filtering option?

Versty avatar Sep 16 '24 13:09 Versty

@playaz44 Does this issue reproduce on your device in Local VPN operating mode with enabled IPv6 filtering option?

I tested ipv6 filtering enabled in auto proxy and local vpn mode, the problem only occurs in auto proxy mode. On a local VPN, everything works as it should.

playaz44 avatar Sep 18 '24 13:09 playaz44

@playaz44 Would you mind sending more logs from your device in auto proxy mode with enabled IPv6 filtering? We need it in order to find and eliminate the exact cause.

If so, please follow the steps:

  1. Enable debug logging: Settings -> General -> Advanced -> Logging level -> Debug.

  2. Reproduce the problem, then remember the exact time when it happened.

  3. Collect logs: Settings -> General -> Advanced -> Export logs and system info.

  4. Send this file to [email protected]:

    • include [android] keyword and 5338 in the subject of your email
    • specify the exact time when the issue occurred

Versty avatar Sep 23 '24 14:09 Versty

@playaz44 Would you mind sending more logs from your device in auto proxy mode with enabled IPv6 filtering? We need it in order to find and eliminate the exact cause.

If so, please follow the steps:

  1. Enable debug logging: Settings -> General -> Advanced -> Logging level -> Debug.

  2. Reproduce the problem, then remember the exact time when it happened.

  3. Collect logs: Settings -> General -> Advanced -> Export logs and system info.

  4. Send this file to [email protected]:

    • include [android] keyword and 5338 in the subject of your email
    • specify the exact time when the issue occurred

@Versty 4 days with IPv6 filtering enabled and I can't reproduce this issue, it looks like it's been magically fixed.

playaz44 avatar Sep 28 '24 11:09 playaz44

@playaz44 That is quite unusual. Especially if you're still using the same version of AdGuard application.

@TigerBeanst How is it going on your device?

Versty avatar Oct 02 '24 08:10 Versty

I updated adguard from 4.6.1 to 4.6.3 and everything works fine

playaz44 avatar Oct 02 '24 08:10 playaz44