gorhill / uMatrix

uMatrix: Point and click matrix to filter net requests according to source, destination and type
GNU General Public License v3.0
4.55k stars 470 forks source link

Auto-update of hosts files broken? #956

Closed ghost closed 6 years ago

ghost commented 6 years ago

OS: macOS 10.13.3 / 10.11.6 Browser: FF 58.0.2, clean install, default settings, no other add-ons installed besides uMatrix uMatrix: version 1.3.2, default config (only enabled 'Auto-update hosts files')

Steps to reproduce:

  1. install Firefox & create a new profile, don't change any settings
  2. install uMatrix and enable 'Auto-update hosts files'
  3. let Firefox run for 2 hours optional:
  4. restart Firefox
  5. repeat step 3 & 4 a couple of times

expected behaviour: uMatrix should auto-update the hosts files - unclear when exactly but it should at some point. Logger should show the expected behind-the-scene xhr requests.

actual behaviour: uMatrix will not auto-update the hosts files, no matter how long I let Firefox run or how often I restart it. Logger shows no activity.

add. note: It is possible to force a manual update of the hosts files by clicking the 'Update now' button (which will show the expected entries in the logger). So a blocked network connection should not be the problem.

But Auto-Updates don't happen.

gorhill commented 6 years ago

install uMatrix and enable 'Auto-update hosts files' let Firefox run for 2 hours

When I fixed #928, I did find an issue which caused the toggling of auto-update to not take place until the next restart. This is fixed in the dev build.

optional: restart Firefox

As said, the auto-update setting will take effect after restarting uMatrix. I installed uMatrix 1.3.2 on a fresh Firefox 58.0.2 profile, enabled auto-update, then I restarted the browser. Result:

a

Note that auto-update kicks in ~7 minutes after uMatrix is started.

So, unable to reproduce. Investigate more on your side please.

ghost commented 6 years ago

Thank you for your reply. To know that the updating process should start about 7mins after uMatrix has been started is certainly very helpful. I've done some more testing:

I have installed FF 59.0b10 (developer edition) with uMatrix 1.3.3b8, on macOS 10.11.6 for testing purposes. Auto-update works as expected.

But with the specs detailled in the original post (uMatrix 1.3.2, FF58.0.2, macOS), auto-update does not work for me, that's still true - however long I wait or no matter how many restarts I do (after enabling auto-updates). Did you do your test on macOS? So I don't know whether this is the combination of macOS and the specific uMatrix version 1.3.2 or something else. It doesn't matter anyway if the update to the official release of 1.3.3 will fix it. If you don't mind, from my side, I will close this, as soon as I have confirmed this. Thank you for your help.

gorhill commented 6 years ago

Did you do your test on macOS?

I don't have macOS. See if there are related error messages in the browser console (ctrl-shift-j).

ghost commented 6 years ago

There is one message at the very start of FF58.0.2/ uMatrix 1.3.2 which seems to be about uMatrix:

Unknown localization message http i18n.js:158 localizeMessage resource://gre/modules/ExtensionCommon.jsm:1422:17 localizeMessage resource://gre/modules/ExtensionChild.jsm:658:44 getMessage chrome://extensions/content/ext-i18n.js:13:18 callFunction resource://gre/modules/ExtensionCommon.jsm:660:36 stub resource://gre/modules/Schemas.jsm:2261:22 vAPI.i18n.render/< moz-extension://569b4(...)/js/i18n.js:158:21 DOMList.prototype.forEach moz-extension://569b4(...)/js/udom.js:200:9 vAPI.i18n.render moz-extension://569b4(...)/js/i18n.js:157:5

moz-extension://569b4(...)/js/i18n.js:178:1 moz-extension://569b4(...)/js/i18n.js:29:2

As far as I can tell this message does not appear with FF59 (en-US) / uMatrix 1.3.3. After that nothing. Could this error stop uMatrix from auto-updating?

gorhill commented 6 years ago

I have that message when I open the hosts files pane (including with latest dev build). It's inconsequential, it's just that uMatrix can't find a specific localized string and will fall back using an empty string. Anyway, auto-update does not require the hosts file pane to be opened at all.

ghost commented 6 years ago

Ok, I guess then I'll have to wait for 1.3.3 which should fix for me this if my tests above are any indication. Do you have a rough idea about when 1.3.3 might be ready for release?

ghost commented 6 years ago

It seems that version 1.3.4 has fixed the problem. Thank you.