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

no-large-media can cause a large volume of repeated requests for audio file #3184

Closed
9 tasks done
filip-hejsek opened this issue Mar 26, 2024 · 10 comments
Closed
9 tasks done
Labels
duplicate This issue or pull request already exists

Comments

@filip-hejsek
Copy link

Prerequisites

  • I verified that this is not a filter list issue. Report any issues with filter lists or broken website functionality in the uAssets issue tracker.
  • This is NOT a YouTube, Facebook or Twitch report. These sites MUST be reported by clicking their respective links.
  • This is not a support issue or a question. For support, questions, or help, visit /r/uBlockOrigin.
  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue.
  • The issue is not present after disabling uBO in the browser.
  • I checked the documentation to understand that the issue I am reporting is not normal behavior.

I tried to reproduce the issue when...

  • uBO is the only extension.
  • uBO uses default lists and settings.
  • using a new, unmodified browser profile.

Description

When no-large-media is enabled and a large audio file is opened (as the top level document), Firefox makes repeated attempts to stream the audio, downloading hundreds of megabytes of data very quickly.

A specific URL where the issue occurs.

https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451

Steps to Reproduce

  1. In uBlock Origin settings, enable blocking of large media elements
  2. Open a large audio file in a new tab (for example this one)
  3. Open the uBlock Origin request log or the network tab in browser console and observe an excessive amount of requests

Expected behavior

Either the audio file should be blocked in such a way that the browser doesn't attempt to download it again, or alternatively the file should play without interference from uBlock Origin

Actual behavior

The browser makes a large number of requests, downloading hundreds of megabytes in a short time.

Logger output
+6 static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+6 no-large-media: * true -- static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+5 static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+5 no-large-media: * true -- static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+5 static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+5 no-large-media: * true -- static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+5 static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+5 no-large-media: * true -- static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+5 static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+5 no-large-media: * true -- static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+5 static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+5 no-large-media: * true -- static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+4 static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+4 no-large-media: * true -- static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+4 static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+4 no-large-media: * true -- static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+4 static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+4 no-large-media: * true -- static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+4 static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+4 no-large-media: * true -- static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+4 static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+4 no-large-media: * true -- static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+4 static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+4 no-large-media: * true -- static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+4 static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+4 no-large-media: * true -- static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+3 static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+3 no-large-media: * true -- static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+3 static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+3 no-large-media: * true -- static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+2 static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+2 no-large-media: * true -- static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+2 static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+2 no-large-media: * true -- static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+2 static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+2 no-large-media: * true -- static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+2 static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+2 no-large-media: * true -- static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+2 static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+2 no-large-media: * true -- static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+2 static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+2 no-large-media: * true -- static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+2 static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+2 no-large-media: * true -- static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+1 static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+1 no-large-media: * true -- static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+1 static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+1 no-large-media: * true -- static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+1 static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+1 no-large-media: * true -- static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+1 static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+1 no-large-media: * true -- static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+1 static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+1 no-large-media: * true -- static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+1 static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+1 no-large-media: * true -- static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+0 static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+0 no-large-media: * true -- static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+0 static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+0 no-large-media: * true -- static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+0 static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+0 no-large-media: * true -- static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+0 static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+0 no-large-media: * true -- static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+0 static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+0 no-large-media: * true -- static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+0 static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451
+0 no-large-media: * true -- static.wikia.nocookie.net 1 get media https://static.wikia.nocookie.net/undertale/images/e/ee/MEGALOVANIA_music.ogg/revision/latest?cb=20160401053451

uBO version

1.56.0

Browser name and version

Firefox 124.0

Operating System and version

Manjaro Linux

@gwarser
Copy link

gwarser commented Mar 26, 2024

#1201

@uBlock-user uBlock-user added the duplicate This issue or pull request already exists label Mar 26, 2024
@garry-ut99

This comment was marked as abuse.

@gorhill
Copy link
Member

gorhill commented Mar 26, 2024

downloading hundreds of megabytes of data very quickly

Seems to be an exaggerated claim. The response headers are downloaded since they are needed for uBO to make a decision, but using Network pane in browser dev tools, I do not see "hundreds of megabytes of data very quickly". After two minutes of broken playback, I see ~800KB.

Without the browser tools opened, about:processes also does not support "hundreds of megabytes of data very quickly".

@garry-ut99

This comment was marked as abuse.

@gorhill
Copy link
Member

gorhill commented Mar 26, 2024

Right, my bad, about:networking#sockets does show a lot of data received.

@garry-ut99

This comment was marked as abuse.

@gorhill
Copy link
Member

gorhill commented Mar 26, 2024

I will squeeze in a lightweight fix in the release candidate to address both the case here and the original issue at #1201.

The intended behavior is for uBO to not block the media since the media itself is a top level document rather than a secondary resource.

There are two code paths to address:

First one is that the mime type for the media here is application/ogg, which uBO does not detect as a media type.

The other issue is probably Firefox-specific, is that when uBO starts to act on the document being loaded, the context is seen as about:newtab, which eventually become the hostname of the media URL. This prevents uBO from remembering the state of the no-large-media-elements switch.

The changes will address those two quirks.

gorhill added a commit to gorhill/uBlock that referenced this issue Mar 26, 2024
@garry-ut99

This comment was marked as abuse.

gorhill added a commit to gorhill/uBlock that referenced this issue Mar 26, 2024
@garry-ut99

This comment was marked as abuse.

@gorhill
Copy link
Member

gorhill commented Mar 27, 2024

A better fix would require more changes, I wanted to keep changes to a minimum to avoid delaying release candidate for too long.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

5 participants