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

Multiple entries for the same resources in the logger (Firefox only) #1122

Closed
8 tasks done
darkred opened this issue Jun 21, 2020 · 7 comments
Closed
8 tasks done

Multiple entries for the same resources in the logger (Firefox only) #1122

darkred opened this issue Jun 21, 2020 · 7 comments
Labels
declined declined

Comments

@darkred
Copy link

darkred commented Jun 21, 2020

Prerequisites

  • I verified that this is not a filter issue
  • This is not a support issue or a question
  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue
    • Your issue may already be reported.
  • I tried to reproduce the issue when...
    • uBlock Origin is the only extension
    • uBlock Origin with default lists/settings
    • using a new, unmodified browser profile
  • I am running the latest version of uBlock Origin
  • I checked the documentation to understand that the issue I report is not a normal behavior

 

Description

The issue is that, only in Firefox (no issue in Google Chrome), there are multiple entries for the same resources in uBO logger.

But, when I disable uBO via about:addons,
there are no such multiple network request entries for these resources in the Network devtool.

For reference I quote the only relevant comment I found, by @gorhill , in gorhill/uBlock#391 (comment)
(It's from 5 years ago, at that time Firefox was at version 38) :

If there are multiple entries for the same resource, it's simply because Firefox's makes multiple requests for the same resource, uBlock merely shows you what is happening internally, it does not create entries out of thin air.

If the above still stands stands (I mean, with the current Firefox version 77), and it's not a uBO issue but a Firefox issue, should I report it to bugzilla.mozilla.org ? In such case, could you please help me with providing technical details to include in my report?

 

A specific URL where the issue occurs

Here are two example URLs (it occurs consistently/every time) :

 

Steps to Reproduce

  1. In a fresh Firefox 77.0.1 profile with only uBO installed

  2. Open uBO logger

  3. Open Network devtool and tick the Disable cache checkbox, or presh Ctrl+F5(bypassing cache) on each page

  4. Load https://majorgeeks.com/
    Switch to uBO logger, for convenience filter the logger output to view only "Blocked* entries:
    notice that the following entries appear twice:

    /ad160px.​        ​         www.majorgeeks.com​ ​ image ​  https://www.majorgeeks.com/images/mg/ad160px.png
    /www/delivery/*​           ​www.majorgeeks.com​ ​ script  ​https://ra.majorgeeks.com/www/delivery/spcjs.php?id=1&target=_blank
    ||googlesyndication.com^​  ​www.majorgeeks.com  ​script  https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js
    ||thisiswaldo.com^$3p     ​www.majorgeeks.com ​ script ​ https://cdn.thisiswaldo.com/static/js/4107.js
    
  5. Load https://rarbgproxy.org/torrents.php
    Notice in uBO logger that the following entry appears twice:

    |dyncdn.me/static/20/js/expla*.js$domain=ra...  ​rarbgproxy.org   ​script​  https://dyncdn.me/static/20/js/expla95.js
    

 

Expected behavior:

There should be no multiple entries in the logger
(for comparison there are no such entries in uBO logger with Google Chrome)

 

Actual behavior:

There are several multiple entries in the logger.

 

Your environment

  • uBlock Origin version: 1.27.11rc4 (or any other uBO version), with only default filter lists, all updated.
  • Browser Name and version: Firefox 77.0.1 x64
  • Operating System and version: win10 x64 version 2004
@gorhill
Copy link
Member

gorhill commented Jun 21, 2020

From what I can see when stepping in the debugger, uBO is reporting accurately, those duplicated blocked requests were really fired twice by Firefox to uBO's onBeforeRequest() listener. They are also labelled as distinct network requests as the have different request ids.

@gwarser
Copy link

gwarser commented Jun 21, 2020

image

@darkred
Copy link
Author

darkred commented Jun 21, 2020

Thanks for the quick response.

 

With uBO disabled, I see that in Network devtool, there's only one expla95.js request in Network devtool :

Firefox Network devtool screenshot

2020-06-21_212131

For reference, the same occurs in Google Chrome:

Chrome Network devtool screenshot

2020-06-21_213949

So, since these requests are really fired twice by Firefox,
maybe both the Firefox (and Chrome) Network tools don't view duplicate entries? But only every request once?

If that's the case, I'd like to ask please consider adding an option in logger, to only display unique network requests,
i.e. display each network request only once per page load (between the horizontal separators) .
I believe it would make using the logger more convenient, visually avoiding duplicate entries,
and because there are no such duplicate entries in uBO logger with in Google Chrome.

@uBlock-user uBlock-user added the something to address something to address label Jun 21, 2020
@gwarser
Copy link

gwarser commented Jun 21, 2020

Even using DevTools built-in blocker creates duplicate:

image

It seems Firefox is requesting resource second time in case of error? Even if Chrome is doing this it does not send all requests to extensions. For example 301 redirects are always visible in Firefox but not in Chrome - gorhill/uBlock-for-firefox-legacy#229 (comment)

@uBlock-user
Copy link
Contributor

Browser quirk ? I have noticed duplicates in Chrome too many times, always thought this was browser behavior or website was forcing a request until the content got loaded

@gorhill
Copy link
Member

gorhill commented Jun 21, 2020

If that's the case, I'd like to ask please consider adding an option in logger, to only display unique network requests

Declined, I rather have the logger output exactly what is happening inside uBO.

@gorhill gorhill closed this as completed Jun 21, 2020
@uBlock-user uBlock-user added declined declined and removed something to address something to address labels Jun 21, 2020
@darkred
Copy link
Author

darkred commented Jun 22, 2020

Declined, I rather have the logger output exactly what is happening inside uBO.

Just to clarify, I didn't mean to drop(=ignore/not include) the duplicate entries from the logger output.
I only had in mind to be able to visually filter the duplicate entries,
as an extra toggle expression, named Unique, in the expression picker, below the "Not / CNAME" row :
2020-06-22_185528

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
declined declined
Projects
None yet
Development

No branches or pull requests

4 participants