AXeL-dev / distract-me-not

:no_entry: A lightweight website blocker with a user friendly interface
https://addons.mozilla.org/addon/distract-me-not/
MIT License
122 stars 14 forks source link

DMN not Blocking when Browser first starts (even though Block is enabled) #65

Closed OttScott closed 2 years ago

OttScott commented 2 years ago

When Edge loads from a closed session (restoring all my tabs), Distract-Me-Not is enabled and Active. Clicking the icon shows password prompt and, once supplied, indicates blocking is active in Combined mode. Blocking is not working, however, until I disable blocking and re-enable it.

Your environment

Steps to reproduce

-Close edge with Tabs open and set to restore tabs on open (Unsure if necessary. Have not tested other variations) -Reopen Edge (Which restores saved tabs and extension states) -Open a New Tab and navigate to a location that should be blocked -> Notice it is not blocked -Ensure Extension is Enabled and Status is Active in Combined Mode (Supplying password as needed) image -Open DMN Settings (Supplying password as needed) -Notice Active and Blocking is in Combined Mode image

-Verify Tab destination should be blocked by verifying Blacklist image

-Disable Blocking (And Save) image

-Re-enable Blocking (And Save) -> Notice existing working tab suddenly becomes blocked image

Expected behaviour

On load, the extension should verify blocking status and ensure every tab is blocked as appropriate

Actual behaviour

On load, tabs that should be blocked, as well as new tabs that should be blocked, are not blocked until blocking is turned off and back on.

AXeL-dev commented 2 years ago

Tested on Edge Version 103.0.1264.51 (Linux version) & i couldn't reproduce the bug, i used the combined mode + (tried with & without a password) & the blocking works fine even after many restarts & or enabling/disabling the extension.

Can you provide more details about how was you able to load the websites from an old session?

Edit: well actually i just noticed what you wrote on these 2 steps:

-Close edge with Tabs open and set to restore tabs on open (Unsure if necessary. Have not tested other variations) -Reopen Edge (Which restores saved tabs and extension states)

and it's exactly what i did still i wasn't able to reproduce the issue on my side, what i'm wondering about is that how a blocked website like twitch can be restored as it is:

Capture d'écran Deepin_zone de sélection _20220708103253

actually it shouldn't be a twitch tab there, 'cause on the previous session the extension should have already block that tab so it will turn out to an extension tab, something like so:

Capture d'écran Deepin_zone de sélection _20220708102903

So i'm really wondering how is it possible for you to restore a blocked tab, unless you disabled the extension before or maybe you didn't have your blacklist correctly set when you did so? idk, but it's weird.

AXeL-dev commented 2 years ago

Hey @OttScott, i know that you didn't check back yet, still i just wanted to add something: can you please send me your settings (all the settings if possible), because i'm quite sure that there is a specific case where the issue happens still i can't yet reproduce it. Thanks!

OttScott commented 2 years ago

Sorry. Yes. I’ve been on vacation for a bit here. Will check into this when I get back home.

On Tue, Jul 19, 2022 at 3:59 AM AXeL @.***> wrote:

Hey @OttScott https://github.com/OttScott, i know that you didn't check back yet, still i just wanted to add something: can you please send me your settings (all the settings if possible), because i'm quite sure that there is a specific case where the issue happens still i can't yet reproduce it. Thanks!

— Reply to this email directly, view it on GitHub https://github.com/AXeL-dev/distract-me-not/issues/65#issuecomment-1188911845, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADMIERENTUTM6DW2WFWJGCLVU2DCFANCNFSM5252EBUA . You are receiving this because you were mentioned.Message ID: @.***>

OttScott commented 2 years ago

OK, looking into it now, I cannot find a way to export my config. Do you want my Black/Whitelists posted here? What about other settings? Is there a way to export it into CSV or something?

AXeL-dev commented 2 years ago

@OttScott there is no way to export the whole settings for now, so if you can send me screenshots of each setting tab + your blacklist/whitelist on my email, that would be helpful (sorry for the inconvenience).

AXeL-dev commented 2 years ago

@OttScott I was able to reproduce the issue using the config files you sent me (thanks!), i'll investigate more & work on a fix for the issue.

AXeL-dev commented 2 years ago

@OttScott i've found the origin of the issue, it was mainly related to the keywords list which was not correctly handled when the extension gets loaded on the browser start. The fix would be available on the next release!

Additionally, i've added buttons to export/import all the settings under the Miscellaneous tab.