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

uBO badge counter doesn't work when network requests originate from service-workers #1204

Closed
ghost opened this issue Aug 11, 2020 · 8 comments
Labels
bug Something isn't working fixed issue has been addressed

Comments

@ghost
Copy link

ghost commented Aug 11, 2020

URL(s) where the issue occurs

https://www.fotocasa.es/

Describe the issue

the uBO counter not working for me in this site. in the logs i can see blocked content.. but the counter in the uBO icon, no appears numbers.

no problem, in any other website.

Screenshot(s)

Captura

Versions

  • Browser/version: [Chrome]
  • uBlock Origin version: [1.28.4]

Settings

@ghost
Copy link
Author

ghost commented Aug 11, 2020

i just test with ABP and appears the numbers 🤔
maybe it's problem of my uBO? I'm going to reinstall it

@ghost
Copy link
Author

ghost commented Aug 11, 2020

was a cookies issue, after clean it.. works well

@ghost ghost closed this as completed Aug 11, 2020
@ghost
Copy link
Author

ghost commented Aug 11, 2020

well the solution has been short-duration.. again no numbers.. after 8-9 pages views

@liamengland1
Copy link

liamengland1 commented Aug 11, 2020

It's a service worker making the requests, uBo considers that a different context

@uBlock-user
Copy link
Contributor

Extension pages never show counter. Put the focus back on the webpage tab and the counter will appear.

@uBlock-user uBlock-user transferred this issue from uBlockOrigin/uAssets Aug 12, 2020
@gorhill gorhill reopened this Aug 12, 2020
@gorhill
Copy link
Member

gorhill commented Aug 12, 2020

@llacb47 is right.

i just test with ABP and appears the numbers

From what I gather, ABP will try to find from which page the requests originate -- it's a guest. As a result, if you open two or more pages to the site https://www.fotocasa.es/ in different tabs, reloading one page will cause the count on all other pages to also go up, despite no changes on these pages, because ABP will attribute the tab-less requests to all tabs which matches the context.

Given how service workers are becoming more common, I feel that something must be done about it, but ideally not with ABP's approach.

@uBlock-user uBlock-user added the bug Something isn't working label Aug 12, 2020
@uBlock-user uBlock-user changed the title fotocasa.es - the uBO counter not working uBO badge counter doesn't work when network requests originate from service-workers Oct 19, 2020
gorhill added a commit to gorhill/uBlock that referenced this issue Dec 12, 2020
Related issue:
- uBlockOrigin/uBlock-issues#1204

Not much can be done beside reporting to tabless network
requests to all tabs for which the context is a match.

A short term local cache is used to avoid having to iterate
through all existing tabs for each tabless network request
just to find and report to the matching ones -- users
reporting having a lot of opened tabs at once is not so
uncommon.
@gwarser
Copy link

gwarser commented Dec 12, 2020

Tested on Slack with woff*$xmlhttprequest,domain=app.slack.com.

@gwarser gwarser closed this as completed Dec 12, 2020
@gwarser gwarser added the fixed issue has been addressed label Dec 12, 2020
@ghost
Copy link
Author

ghost commented Jul 4, 2022

in some websites the numbers of the "mini-icon" are not refreshed:
Example cadenaser.com , twitch.tv youtube.com

but in other sites the numbers refresh when navigate in the site:
Example: cnn.com , marca.com amazon.com

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

4 participants