question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Background image that should be blocked by uBO is appearing

See original GitHub issue

Bug Report

Describe the bug

I honestly am not sure at this point what is going on here. On the surface, it appears that Dark Reader is showing an image that should have been blocked by uBlock Origin. This needs more investigation to determine what is going on.

I’ve seen this issue before, but it was not easy to replicate. Finally, I’ve found a place where I can easily replicate it. See STR.

Steps to reproduce

  1. Install uBlock Origin (uBO) v1.34.0 in Firefox
  2. Install Dark Reader v4.9.31 in Firefox
  3. Enable Dark Reader v5 beta mode in v4.9.31 and be sure Dynamic dark mode is enabled
  4. Go to https://sourceforge.net/
  5. Notice the background image that looks like this: DR1
  6. Add uBO filter: ||fsdn.com/con/$important and save filters in uBO
  7. Go back to the Firefox tab with https://sourceforge.net/
  8. Hold down the Shift key, and press Firefox’s refresh button to refresh the page while bypassing the browser’s cache
  9. Notice that the background mentioned above is still present
  10. Use Dark Reader’s drop-down menu to disable Dark Reader
  11. Notice that the background mentioned above disappears
  12. Use Dark Reader’s drop-down menu to re-enable Dark Reader
  13. Notice that the background mentioned above re-appears

Expected behavior

The background image to no longer appear regardless of whether or not Dark Reader is enabled.

Actual behavior

The background image only appears when Dark Reader is enabled.

Screenshots

DR1

System Information

  • OS: Windows
  • Browser: Firefox 87.0
  • Dark Reader Version: v4.9.31

Additional context

Normally, this would just be a simple case of using the Dynamic Theme Editor to tweak the dynamic theme. But in this case, I don’t currently understand why the background image is being shown at all given that it should be blocked by uBO. It’s like Dark Reader is bypassing uBO filtering, but this requires further investigation before that conclusion can be made.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

4reactions
Gustedcommented, Apr 17, 2021

Dark Reader could use a listener on webRequest.onErrorOccurred to find out which resources should not be fetched.

Ah, thanks for the suggestion. Will have a PR for this up soon.

3reactions
gorhillcommented, Apr 16, 2021

Is there any way to get around Dark Reader calling resources that are blocked by other extensions (such as uBO)?

Not that I know of.

Dark Reader could use a listener on webRequest.onErrorOccurred to find out which resources should not be fetched.

Regardless of uBO, it would be best that DR respects the blocking of resources from content blockers.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix CSS background-image not working | HTML/CSS
2. Make sure the image path is set correctly in the background-image url. Once you have made sure that your CSS file is...
Read more >
Problem with background-image (resolved) - CSS-Tricks
If you copied and pasted your code then the issue is a simple typo. This: background-image" url("images/pic. jpg") no-repeat;
Read more >
USER GUIDE - Health.mil
This is a living document that is updated by the Defense Health Agency (DHA) UBO Program. Office as necessary. 2. Background. MTF UBOs...
Read more >
What is an Ultimate Beneficial Owner (UBO)? - Swift
1. Acquire the organisation's credentials. While the exact specifications vary depending on the jurisdiction and AML/CTF regulation standards, companies must ...
Read more >
background-repeat - CSS: Cascading Style Sheets | MDN
The background-repeat CSS property sets how background images are repeated. A background image can be repeated along the horizontal and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found