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

Blokada is closed all the time on Samsung S9 when Notifications are set to No #613

Closed
alexanderadam opened this issue Jan 5, 2020 · 16 comments

Comments

@alexanderadam
Copy link

alexanderadam commented Jan 5, 2020

Blokada ran perfectly fine since 547 was fixed but on some point in the last months (I guess it was December or November) it began being closed every now and then. The notification bar disappears and when I open Blokada it will reestablish the connection again.
It's not the battery optimisation thingy (because I excluded Blokada from battery optimisation).
I don't think that Blokada is killing itself but I guess it's not prohibiting others from killing it. 😉

I also have the feeling that it might be related to switching networks (i.e. between wifi & 4G) or because I'm occasionally setting it into flight mode. But I'm not sure about that. Maybe it's unrelated to that.

Steps to reproduce

  1. Run Blokada on Samsung S9 or Samsung Tab S6

Expected behaviour

Blokada would keep running. 👍

Actual behaviour

Blokada closes. 👎

Configuration

  1. 🛡️ Blokada versions:
  2. 📱 Device model: Samsung S9 & Samsung Galaxy Tab S6
  3. 🤖 Android version / ROM:
    • 9 / One UI 1.0 / Kernel 4.9.59-16947752
    • 10 / One UI 2.1 / Kernel 4.9.118-18847185
    • 10 / One UI 2.1 / Kernel 4.14.117-18571899

Questions

  1. How long have you been using Blokada?
    Since a long time but I'm still struggling why this is relevant. Maybe you want to add a comment to the issue template that explains how and why this is relevant. This would help to answer this question better, I guess.

  2. How long time ago has the problem started to happen?
    Not too long ago. I would say since two months at maximum. But I didn't had a look on it exactly.

  3. How often does this problem happen to you?
    All the time.

Settings

Notifications: No
Start on boot: Yes
Settings location: Internal Storage
Background animation: No
Keep alive: Yes
Watchdog: Yes
Aggressive wakeup: Yes

Without VPN set to always-on it becomes this:
Disconnected from always-on VPN. Change network or VPN settings

When VPN is set to always-on it simply leads to this:

Can't connect to always-on VPN. Blokada is set up to stay connected all the time, but it can't connect at the moment. Your phone will use a public network until it can reconnect to Blokada. Change VPN settings. Dismiss. Open app

PS: there were similar issues on Blokada 2.2.2, 3.6 (1, 2), 3.7 (1, 2, 3), 4.3.4.
PPS: Please note that other applications are staying in background perfectly fine on the same device (i.e. messengers like Conversations or Threema). Furthermore alternative Ad blockers like personalDNSfilter or DNS66 doesn't cause this problem on my device.

@Notabas-iC
Copy link

Notabas-iC commented Jan 6, 2020

Hello there,
For Samsung devices please either try to enable Always-on-VPN in your system settings or lock Blokada in recents (if it's possible on your device) and see whether that resolves the problem.

@peterroth
Copy link
Contributor

peterroth commented Jan 6, 2020

Turn off "Watchdog". If you want to keep the VPN running all the time, you don't need that.
Didn't you update your Android recently?

@alexanderadam alexanderadam changed the title Blokada is closed all the time on Samsung S9 Blokada is closed all the time on Samsung S9 when Notifications are set to No Jan 6, 2020
@alexanderadam
Copy link
Author

alexanderadam commented Jan 6, 2020

Turn off "Watchdog".

Wouldn't the watchdog kill messengers as well if it would be faulty? 🤔

Didn't you update your Android recently?

No, I didn't but I saw that Blokada stays on when I set Notifications to Yes (EDIT: It doesn't stays on — I was wrong about that).
However, messengers don't need a permanent notification and they are staying on perfectly fine.

@peterroth
Copy link
Contributor

peterroth commented Jan 6, 2020

Wouldn't the watchdog kill messengers as well if it would be faulty? 🤔

Can you elaborate on it? I'm afraid I don't get what you mean.

A messenger application also has notifications, if you check, otherwise you won't be notified about new messages. You don't only receive them because somebody wrote you, but because that keeps the service up and running in the background. Notifications increases the process' priority, what will ensure it isn't killed by the system.

@alexanderadam
Copy link
Author

alexanderadam commented Jan 6, 2020

A messenger application also has notifications, if you check, otherwise you won't be notified about new messages.

Ah sorry, this is probably caused because the term notification is misleading in the case of Blokada.
In most cases notifications are something that pop up once and you can close them / swipe them away when you read them.
In the case of Blokada, however, activating Notifications shows a permanent, non-removable notification (at least in my case):

blokada_notification

Messengers (like the mentioned ones in the first comment) don't have a permanent notification. They only show notifications when a message arrives but they are staying in background anyway.

And I guess it's obvious that the notification drawer is not meant for many entries but it seems that Blokada uses two full entries if I want to have it running.

But I presume that it should stay running without having notifications activated anyway, right? Or is this not intended?

@peterroth
Copy link
Contributor

Tap on the Notifications line in Blokada, there cap on SETTINGS. Disable what you don't need. For example, I activated 'Keep alive' in Blokada, but disabled the notification for that in the system.
The result? The app runs in the background but I don't see a notification.

@alexanderadam
Copy link
Author

Okay, I see, so you worked around the mentioned bug.

But then again it's pretty useless if Blokada is closed anyway if Notification is set to No, isn't it? 🤔

@peterroth
Copy link
Contributor

Why do you think it's a bug? The system will always have higher priority and the Notification options are there to increase Blokada's process priority to prevent being killed.

@alexanderadam
Copy link
Author

Because of those two reasons:

  1. Having the option of showing Notifications does not imply "Hey, Blokada won't be functional if you don't activate it". This like saying "The car won't drive if you chose it in the colour 'blue'". There's no way a regular user will see any semantic connection between the option and Blokada behaving malfunctioning.
  2. As I mentioned before, other permanently running applications don't have the problem of having the need to show a permanent notification.

@peterroth
Copy link
Contributor

For the 1st: no. The car won't drive if you don't pour some gasoline into it. Yes, the application will be killed if you don't enable notifications because the Android system is designed to kill/hibernate everything that has low priority and doesn't operate with notifications.
Other, permanently running applications also operate with notifications, either permanent or not. You can also swipe out the notifications of Blokada if you want to. I think the difference of a messaging app and Blokada is obvious from the point of view of notifications.
Those chat applications ask for permissions to show notifications at installation time. It's possible to enable 'Keep alive' by default, but then users need to hide that with the steps I described above, and that also leads us to the question of User Experience.

@alexanderadam
Copy link
Author

alexanderadam commented Jan 6, 2020

The car won't drive if you don't pour some gasoline into it.

This is exactly my point: why having an option "Remove all gasoline" in the settings then? 😉
And what makes it even worse is, that this option has a misleading caption that is not informing the user that Blokada will be killed if it has the 'wrong' setting. 😉

[…] that also leads us to the question of User Experience.

I wholeheartedly agree! Why offering an option if that will break the whole user experience?

You can also swipe out the notifications of Blokada if you want to.

It's not working in my case. It's locked and if I try to swipe left/right it just shows the options of configuring notifications. I can't just swipe it away.

To summarize:

  1. It would be good to remove options that will knowingly break Blokada's functionality. Why is it offered in the first place if the breaking behaviour is known? And why is there no warning about drawing Blokada nonfunctional if it has to be offered?
  2. It would be good if there would be a possibility to have temporary notifications instead of non-removable ones.

@peterroth
Copy link
Contributor

So we are talking about a new default configuration proposition, and not about a bug ;) Asking for less permission ensures the user has better experience as we are talking about a security aware applications, furthermore, the current default configuration works on a big number of devices and Android versions.
However, it worth a revisit, for sure.

It's not working in my case. It's locked and if I try to swipe left/right it just shows the options of configuring notifications. I can't just swipe it away.

I must check and validate it.

@peterroth
Copy link
Contributor

peterroth commented Jan 10, 2020

I few versions ago, with 4.1 or around that, the 'Keep alive' was enabled by default. Users complained why it is so, why they must have a constant notification, seeing that Blokada is active. This change was reverted but to the high number of user requests.
The proposal you have @alexanderadam was already delivered.

@alexanderadam
Copy link
Author

I also mentioned that there should rather be a warning informs about possible malfunctioning of Blokada if someone want's to disable the notification (last question of 1.).

And proposal 2 is unanswered as well so far. 😉

@cm-mc
Copy link

cm-mc commented Jan 25, 2020

I noticed this before, too, but it seems 4.5.1 fixed it somehow, as I haven't experienced it since.
My phone's a S9+.

@alexanderadam
Copy link
Author

alexanderadam commented Feb 25, 2020

So it turned out that this problem reappeared even when notifications were activated.

I tried using personalDNSfilter and DNS66 in the last weeks and the problem doesn't appear on those alternatives so I simply switched.

Therefore I will simply close this issue because it seems that I was the only user who ran into this issue anyway.

Thank you for your support! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants