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

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

Open
5 of 6 tasks
TigerBeanst opened this issue May 28, 2024 · 25 comments
Open
5 of 6 tasks
Assignees
Labels
Bug Priority: P4 Root Issues that involve root rights Triage

Comments

@TigerBeanst
Copy link

TigerBeanst commented May 28, 2024

Please answer the following questions for yourself before submitting an issue

  • Filters were updated before reproducing an issue
  • I checked the knowledge base and found no answer
  • 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

  • yes, I do

Root access

  • 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

If I keep Adguard on foreground, it works ok (almost all the time).
If it in under background, my device will lost internet after a little time.
I have sent the screenrecorder and logs to you.

It maybe cause by Clash For Android, the test version, which can use Shizuku to proxy network by tun.
I use the Shizuku mode. Although I didnot turn on TUN mode, just turn on http/socks5 proxy and dns, but maybe the Shizuku mode will still break Adguard's Automatic proxy.

Base on #5287 , I create a new issue here.
#5287 (comment)

@Versty
Copy link
Contributor

Versty commented May 28, 2024

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

@playaz44
Copy link

playaz44 commented May 29, 2024

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
Copy link

Ref

@adguard-bot adguard-bot added the Root Issues that involve root rights label Jun 21, 2024
@Versty
Copy link
Contributor

Versty commented Jul 29, 2024

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

@Versty
Copy link
Contributor

Versty commented Aug 8, 2024

@TigerBeanst Any updates?

@Versty
Copy link
Contributor

Versty commented Aug 8, 2024

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

@playaz44
Copy link

playaz44 commented Aug 8, 2024

@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

@Versty
Copy link
Contributor

Versty commented Aug 8, 2024

@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?

@TigerBeanst
Copy link
Author

@TigerBeanst Any updates?

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

@Versty
Copy link
Contributor

Versty commented Aug 8, 2024

@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 devteam@adguard.com:

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

@TigerBeanst
Copy link
Author

@Versty Sent ;)

@Versty
Copy link
Contributor

Versty commented Aug 8, 2024

@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?

@playaz44
Copy link

playaz44 commented Aug 8, 2024

@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

@TigerBeanst
Copy link
Author

@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

@playaz44
Copy link

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

@Versty
Copy link
Contributor

Versty commented Sep 2, 2024

@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
Copy link
Contributor

Versty commented Sep 4, 2024

@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.

@playaz44
Copy link

playaz44 commented Sep 4, 2024

@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?

@Versty
Copy link
Contributor

Versty commented Sep 5, 2024

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

@Versty
Copy link
Contributor

Versty commented Sep 16, 2024

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

@playaz44
Copy link

@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.

@Versty
Copy link
Contributor

Versty commented Sep 23, 2024

@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 qa@adguard.com:

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

@playaz44
Copy link

@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 qa@adguard.com:

    • 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.

@Versty
Copy link
Contributor

Versty commented Oct 2, 2024

@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?

@playaz44
Copy link

playaz44 commented Oct 2, 2024

I updated adguard from 4.6.1 to 4.6.3 and everything works fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Priority: P4 Root Issues that involve root rights Triage
Projects
None yet
Development

No branches or pull requests

4 participants