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

Race condition at browser launch may prevent application of cosmetic filters #974

Closed
gorhill opened this issue Apr 4, 2020 · 0 comments
Closed
Labels
bug Something isn't working fixed issue has been addressed

Comments

@gorhill
Copy link
Member

gorhill commented Apr 4, 2020

Description

As originally reported at https://www.reddit.com/r/uBlockOrigin/comments/fuscia/ublock_doesnt_load_at_startup_firefox_macos/.

The issue is a race condition when applying cosmetic filtering at browser launch.

A specific URL where the issue occurs

https://www.qwant.com/

Steps to Reproduce

  1. Un-check browser option "Restore previous session"
  2. Set browser "Homepage and new windows" to https://www.qwant.com/
  3. Ensure that browser "New tabs" is set to "Firefox Home (Default)"
  4. Create custom filter www.qwant.com##footer
    • Navigate to https://www.qwant.com/ and verify that the element corresponding to footer is not visible
  5. Quit Firefox
  6. Launch Firefox

Expected behavior:

The DOM element footer is not visible.

Actual behavior:

The DOM element footer is visible.

Your environment

  • uBlock Origin version: 1.26.0
  • Browser Name and version: Firefox 74
  • Operating System and version: irrelevant
gorhill added a commit to gorhill/uBlock that referenced this issue Apr 4, 2020
Related issue:
- uBlockOrigin/uBlock-issues#974

Related feedback:
- https://www.reddit.com/r/uBlockOrigin/comments/fuscia/

The race condition was that a content script could
query the main process to retrieve cosmetic filters
while the cosmetic filters had not been yet fully
loaded into memory. The fix ensure that an already
injected content script will re-query once the
cosmetic filters are fully loaded in memory at
browser launch time.
@uBlock-user uBlock-user added bug Something isn't working external issue involving an external factor labels Apr 4, 2020
@gwarser gwarser added fixed issue has been addressed and removed external issue involving an external factor labels Apr 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed issue has been addressed
Projects
None yet
Development

No branches or pull requests

3 participants