-
Notifications
You must be signed in to change notification settings - Fork 86
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
Protection is not restarted after pause #2
Comments
Re: AdguardTeam/AdguardForWindows#45 (comment) Maybe this is the cause? I meant to investigate this more fully, but, if this solves it, I'm all for it. ☺ |
Nope, Windows and Android versions are totally different. |
I meant, this issue is very specific to this fix, but, like the Windows issue, a general issue investigating this may be appropriate. Or it may be moot if this fix solves it completely.… ☺ |
Also, I'm having this issue in proxy mode, as I can't functionally use VPN mode. (Separate bug has been e-mailed a few days ago.) |
Hm, that's something new, protection is not restarted in proxy mode. It is specific to VPN mode - we need to restart it on every network reconnect. Could you please tell me ID of the ticket with the description of that proxy mode bug? |
I've no ticket for that bug, as I've only starting noticing it. The other, non-related VPN bug, I've @ least 2 ticket #s for, but I don't think you want them here.… |
Anyway, if these bugs are still present, it's better to have them here on github. |
Ok, #23 filed. I think that 1 is a hard problem. ;) |
I have just filed RMZ-109-29725 with details of what happens when AdGuard doesn't stay restarted in proxy mode. What's peculiar to me is that (as I mentioned in the report), when AdGuard quits after restarting, the app acts as if I quit the app myself, because it doesn't automatically reactivate as I'm used to, otherwise. |
Thank you, got the log file. So, what do I see there: |
Something's missed in between. The sequence as I saw it happen:
Almost every other time (maybe 5× more often than above), I see just steps 1 & 2 cycle through every 3 or 4 hours, but, about once a day, I have the above sequence (which, mind you, is still better than AB+, which forces a device reboot every 3 to 4 hours!) |
3 seconds is not a long delay. Anyway, that seems to be android problem. Do you have some kind of power management app or settings? Sometimes it's possible to whitelist the app there so Android wouldn't kill it so frequently. |
No, the order as I mentioned is correct, but maybe the timestamps you mentioned don't reflect precisely. (I've misread the 1s you quoted — I certainly waited perhaps a minute or more before trying an app restart, & confirmed app wasn't running before via app info). I don't have any automatic power management via app, only Android system's own (which I think I've set as max power/least power-saving as possible ). I've also whitelisted app everywhere I can find. |
Then I am pretty sure the order from the log is correct, but with one addition - the app was not restarted by Android.
That's why in the log file it looks like the app was restarted by Android (as it should). The problem here is that this behavior is normal, Android sometimes kills apps and restarts them in a some period of time, we can't control or influence this behavior. The only thing you can do is change Android settings to make it less aggressive to background processes. |
Hmm. Where does 1 change these settings? |
For instance try disabling Battery saver (if you have 5.X) |
Same 4.4 x86 tablet, so no 5.x Battery Saver.… The only option is for WiFi power, which is set only for Max Power/No Saving. |
Have you disabled AG notification icon? Having this icon enabled improves app priority. |
Nope, learned that the hard via previous apps, so I intentionally left the notification icon enabled. |
Found one unquestionable bug, fixed it. Added some new workarounds for network changes and slow protection starts & stops. Needs thorough testing. |
@Revertron Ready & willing tester here.… How do I get hold of this version? |
@TPS You can get it here: https://cloud.jamm.me/index.php/s/50hYBtuQRHU72uD |
Installed & using; of course, will need time to see how it behaves. (Did file 1 minor note in separate issue.) Thanks, @Revertron! |
@Revertron This build is far less stable than the 1 from from #23 that I've been using 'til this point, which is about the same as the current 2.x release for me. It crashes every 15 to 30 minutes when actively web browsing (not with any other activity, curiously — just app updating, e-mail syncing, &c, stay working just fine) but generally restarts more quickly. Still, every 10 or 15 crashes, it doesn't restart timely at all, so I'm forced to manually start via the widget or app itself. I'll send a bug report next time this happens, & note it here. |
Fixed it yet again. |
@ameshkov @Revertron I think this VPN-mode bug is back in Amazon .231, but only when device is in standby/screen-off. (I can't find the separate bug I thought was filed specifically about this?) I think this is also @ the root of AdguardTeam/AdguardFilters#869 & AdguardTeam/AdguardFilters#870, because they manifest in this state. Ticket# OXG-496-68436 |
@TPS |
I've had CM since long before AG, & have added AdGuard to CM's exceptions everyplace, even the AV (both internal & the separate CM AV app), as well as Greenify's. I reasonably sure neither of those is culprit here. |
I've had an idea.… I'm going to try pref.vpn.disable.pause ✅ tonight & see if that makes a difference.… I've observed something that looks like a timing issue, & I hope this resolves it. Does this same pref work with the equivalent function for proxy? Nope, no go.… Is there any way AdGuard can appear in [Android System Menu] » [Wireless & Networks] » [More] » [VPN] » [Vertical … Menu] » {Always On} (obscure, right? 😉) to force all connections to work only when VPN is active? Like, when proxy is down, most connections fail.… |
I don't think it could help. Do you know how extract LogCat logs? If you can do it for us I'll see there why Adguard process is killed. |
Here is an instruction: http://forum.xda-developers.com/showthread.php?t=1726238 Also please leave default logging level in Adguard. |
I'll use 1 of the logcat apps & report back. Thanks for the link! Update: On Android 4.1+, these methods all require rooting or an external PC to get the whole system logcat. I'm not setup for either 1, so logcat will have to wait 'til I get my new laptop. (Hopefully, 1st week of December.) 🙏 |
I think 1 thing I'm seeing that, if AdGuard VPN doesn't come up (delays for some reason) by the time the connection is otherwise ready, foreground app & syncing will use connection anyway, including any of the above that download ads opportunisticly when a live internet connection is detected, like CM family of apps. 😞 Is there a way to minimize this delay? (Not quite same as disable.pause …) I agree there's the related problem of Android killing it, but that I can't help with (I think) until new laptop.… |
@TPS it depends on the time when Android notifies Adguard that network is available. Unfortunately there can be a significant delay (up to 5-10 seconds). Second issue: all these apps are also listening to that event and could be notified before AG. |
@ameshkov Is there an earlier event that AG could be listening for to give it a bit of an edge? Or a way to lock/block/disable the connection until it's ready to filter? |
Using other events won't solve the problem we are solving with VPN restart. We should start VPN when connection is fully established so that the network routes are stable. |
id 1373719, the same issue with both Adguard 2.6 and 2.7 on Huawei device |
@vozersky it'd be better if you file a separate bug report on that issue. |
Linked forum threads:
http://forum.adguard.com/showthread.php?4710-APP-specific-white-list&p=54420#post54420
http://forum.adguard.com/showthread.php?5929-Android-Adguard-1-2-1087-Randomly-closes-on-Galaxy-S6&p=54429#post54429
The problem is that we receive network change events too often thus we can't start protection when it is in process of stopping.
We should throttle start/stop events handling.
The text was updated successfully, but these errors were encountered: