Skip to content
This repository has been archived by the owner on Sep 19, 2020. It is now read-only.

Race condition potentially causing auto-update to be disregarded at launch time #63

Closed
6 of 7 tasks
gwarser opened this issue Sep 25, 2018 · 1 comment
Closed
6 of 7 tasks
Labels
bug Something isn't working fixed issue has been addressed

Comments

@gwarser
Copy link

gwarser commented Sep 25, 2018

Prerequisites

  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue
    • Your issue may already be reported.
  • This is not a support issue or a question
    • Support issues and questions are handled at /r/uMatrix
  • I tried to reproduce the issue when...
    • uMatrix is the only extension
    • uMatrix with default lists/settings
    • using a new, unmodified browser profile
  • I am running the latest version of uMatrix
  • I checked the documentation to understand that the issue I report is not a normal behavior

Description

uMatrix may update assets even if "Auto-update assets" is unchecked

Steps to Reproduce

  1. install uMatrix in fresh Firefox profile
  2. go to Dashboard and uncheck "Auto-update assets"
  3. close Dashboard, close browser
  4. reopen browser, open console (adjust filter to show xhr)
  5. assets will start updating after ~7 minutes

Notes

Logging line added just before µm.scheduleAssetUpdater here https://github.com/gorhill/uMatrix/blob/db7feed9c5558933aa4962525072c4b1d04633d2/src/js/start.js#L56

console.log('µm.userSettings.autoUpdate', µm.userSettings.autoUpdate);

will print

µm.userSettings.autoUpdate true

to the console if Firefox run with -jsconsole parameter.

You can check auto-update, restart, uncheck, restart, and console will always print true.

This may (will?) eventually fix itself, but I don't know how yet. (I somehow manged to switch it to false but don't know how.)

See also https://old.reddit.com/r/uMatrix/comments/9d8dd9/two_bugs_in_umatrix/

Your environment

  • uMatrix version: 1.3.14
  • Browser Name and version: Firefox ESR 60.2.1, Nightly 20180925100100
  • Operating System and version: Mint 18.3
@gorhill
Copy link
Member

gorhill commented Sep 25, 2018

Looks like a race-condition -- scheduleAssetUpdater is being called before user settings are confirmed to be loaded, and hence uMatrix ends up using the default value for autoUpdate.

@gorhill gorhill changed the title µm.userSettings.autoUpdate in start.js may stuck in true Race condition potentially causing auto-update to be disregarded Sep 25, 2018
@gorhill gorhill changed the title Race condition potentially causing auto-update to be disregarded Race condition potentially causing auto-update to be disregarded at launch time Sep 25, 2018
@gwarser gwarser added bug Something isn't working fixed issue has been addressed labels Sep 26, 2018
Noxgrim pushed a commit to Noxgrim/uMatrix that referenced this issue Dec 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working fixed issue has been addressed
Projects
None yet
Development

No branches or pull requests

2 participants