
Loading…
Twitter: "I just noticed ublock today is not blocking gmail ads" #223
[Request log removed just in case -- I will keep a copy locally in case I need it]
Quick question: did you restart uBlock after the Google Mail page was already opened?
restart ublock and then reload gmail
If you know how to bring up the dev console, is there anything at the dev console of the Google Mail page that suggest en exception from contentscript-end.js occurred on the page?
I forgot to ask: What browser version?
Failed to load resource: net::ERR_CACHE_MISS
Assuming you didn't force-reload the GMail web page after the ads started to show up, can you cut&paste the full console output at uKOeoIfHQDp8@gmail.com? (a GMail account i use for testing purpose)
Ok I don't see any error from uBlock in the page console.
However I see nothing blocked. Looking at the log you sent earlier, these are all allowed requests and as far as I can see, none of these allowed requests are the result of an exception filter.
So it come to this: it appears uBlock is not running, or it is running but there are zero filters in effects.
Can you tell me the number of filters in effect (go to dashboard, "3rd-party filters" tab: how many net and cosmetic filters in effect?
Again:
- Browser version?
And, are you using Google Mail in incognito mode? If so, is uBlock enabled for incognito mode?
easylist and filtros nautostropicos
18,646 network filters + 34,465 cosmetic filters from:
So:
- Browser version?
- What other extensions is running?
Looks like I will have to wait this occur on my side -- though I don't really receive emails to that account. I can't see ads. Where does it appear? In an email or somewhere else?
Just for the record, my google apps account is not showing ads. I suspect gmail changed code.
I suspect gmail changed code.
If so, I would also have the problem. They are properly hidden here. If I disable uBlock, I see ads to the right of the email you sent me. I enable uBlock, they disappear if I force-refresh the page.
Gmail does not update all users at the same time. Why would work in a gapps account and doesn't in a standard account?
Ok sorry, I don't know what's Google Apps vs. Standard. I am currently using the web page at mail.google.com to browse the GMail account. There is another place to handle GMail?
both url are the same, source code must be different
Ok I guess you meant this: http://setup.googleapps.com/apps/gmail.
I wasn't aware there was such a service from Google. But it does say:
Paid Gmail features include: [...], zero ads, [...].
So that would be because you pay for the service, not because of the blocker. So I am not sure what to think at this point: they changed the site style/layout, or there is a bug in uBlock. Easiest to find out is to test with ABP + same filter lists.
abp works fine
Thanks for the feedback. Not sure how to proceed from here to investigate further. I looked and Google Apps is no longer offered for free.
It's quite baffling that the same code:
- Works for you on Google Apps Gmail
- Works for me on standard Gmail
- Does not wok for you on standard Gmail
Re. "Gmail Checker", is it the one from Google or another one?
jason´s
keep in mind that google does not release the same code for all users and google apps is usually an older version
Working here as well. Have you tried restarting your PC?
Something I am curious, is the CSS rules injected by uBlock on the problematic web page (where ads appear).
Entering...
document.querySelector('style[id^="ublock"]').textContent;
... at the dev console should normally output something like ...
#ad,
#tadsc,
.GC3LC41DERB + div[style="position: relative; height: 170px;"],
.GGQPGYLCD5,
.GGQPGYLCMCB,
.GISRH3UDHB,
.nH.MC,
div[style^="height: 16px; font: bold 12px/16px"],
#rhs_block,
#subscribe-area,
#wmxmsg,
#\:rr .nH[role="main"] .mq:first-child,
#\:rr > .nH > .nH[role="main"] > .aKB,
#\:rr > .nH > .nH[role="main"] > .nH > .nH > .AT[style],
#\:rr > .nH > div[role="main"] > .mq:last-child,
.aeF .nH[role="main"] > .mq:last-child,
.aeF > .nH > .nH[role="main"] > .aKB,
.aeF > .nH > .nH[role="main"] > .afn:first-child + .mq,
.aeF > .nH > .nH[role="main"] > .mq:first-child,
.aeF > .nH > .nH[role="main"] > .nH > .nH > .AT[style],
.aeF > .nH > .nH[role="main"] > .nH > .nH > .nH > .mq:last-child,
.aeF > .nH > .nH[role="main"] > div + .mq,
.nH.PS,
.nH.adC > .nH > .nH > .u5 > .azN,
.oM,
.rh > #ra,
.u4,
.u9,
.xz,
.z0DeRc,
[href^="http://pagead2.googlesyndication.com/"],
.mq,
.vb,
.Zs,
[class="AT"],
[class="u5"]
{display:none !important;}
And entering...
document.querySelector('style[class^="ublock"]').textContent;
... at the dev console should normally output something like
[href^="http://www.google.com/aclk?"]
{display:none !important;}
Given how uBlock works, the result could be inversed, but overall, this is all the CSS rules injected by uBlock when I open an email in Gmail. I am curious at what CSS rules are present in the pages where ads appear.
Of interest there is also the CSS exception rules:
document.querySelector('[data-ublock-exceptions]').getAttribute('data-ublock-exceptions');
Should look like:
[".c[style=\"margin: 0pt;\"]",".ts[style=\"margin:0 0 12px;height:92px;width:100%\"]","[style=\"border: 1px solid rgb(0, 90, 136);\"]","[style=\"border: 1px solid rgb(145, 117, 77);\"]","[style=\"border: 1px solid rgb(241, 250, 248);\"]","[style=\"border: 1px solid rgb(51, 102, 153);\"]","[style=\"border: 1px solid rgb(51, 102, 204);\"]","[href^=\"http://www.liutilities.com/\"]"]
I forgot to ask also... What version of uBlock? There were bugs resolved not that long ago which could lead to CSS rules not being properly injected (for example, see https://github.com/gorhill/uBlock/releases/tag/0.5.5.1).
I've got an idea this morning... You said ads are properly hidden when using Google Apps, but not when using standard web interface?
What is the URL in the address bar appearing in each version, the one with ads and the one without ads?
The idea is that I suspect maybe something changed in the pattern matching in Chrome 39 (you said you are using the dev version?) which causes uBlock's content scripts to not be injected in the page. uBlock explicitly declare that its content scripts must be injected only in web pages which URL address matches http://*/* or https://*/*.
Just by the way: You can combine http and https to " * " (which is *://*/*), but it isn't worth it (as it disables the extension as permissions change)
I know... But I don't want the extension to have permissions it doesn't need, i.e. uBlock is not intended to work on any other scheme than http and https.
Actually I am clueless as to why uBlock doesn't hide ads in current case, feedback with details is crucial in solving bugs. I still do not know whether the styles were injected or not (document.querySelector('style[id^="ublock"]').textContent;)
I started to collect error log:
console.log('µBlock> Beginning to intercept net requests at %s', (new Date()).toISOString());
I started to collect error log:
That's the extension's own console, but I am curious to know whether the CSS rules are injected in the Gmail page itself. The following command in the dev console of the Gmail page itself will definitely tell:
document.querySelector('style[id^="ublock"]').textContent;
So we have something now: the style which is injected by uBlock is not there. So far I can see two reasons for this to happen:
- No CSS rules were found matching the current page
- uBlock's content script was not injected by the browser into the page
"1." is very unlikely, since EasyList contains many CSS rules specific to mail.google.com. But these CSS rules will be injected if the hostname of the URL address matches. What is the URL in your address bar for the Gmail page?
Looks like what I have myself, and ads are hidden here. So, second hypothesis, the content script is not injected into the page by the browser. There is no easy way, this has to be verified manually:
- Open dev console for the Gmail page
- Go to Sources tab
- Ensure the left-hand side pane is revealed
- Click "Content scripts"
- Picture below shows uBlock's content scripts. Do you see them?
start.js is not present
It's ok actually, it's flushed from memory after it has done its job of injecting the style, I took care that it doesn't stay around once no longer needed. Mine is also gone now. You should normally see it though if you refresh the Gmail page while keeping the console open.
Are there any custom filters in your uBlock installation? (the "Your filters" tab in uBlock's dashboard)
Edit: Bah never mind, even if you had a custom filter to cancel all stock filters, a style would have been injected, and it's not.
Enable the logging of network requests
Type URL Filter
Blocked requests
google.com
frame https://clients5.google.com/pagead/drt/dn/ google.com/pagead/
Allowed requests
google.com
image https://chatenabled.mail.google.com/mail/images/cl
eardot.gif?VER=8&at=AF6bupMp7cHtRiva8qL-qnO7WMx7Ju
GRLw&it=1084&zx=gyely85tl0je
image https://mail.google.com/mail/u/1/?ui=2&ik=815ca75e
b6&view=att&th=1487a19f49959c44&attid=0.1&disp=emb
&realattid=b13d59d349ceb7a5_0.1&zw&atsh=1
image https://mail.google.com/mail/u/1/?ui=2&view=dim&iv
=18ri3h5ulat0a&it=ioi
image https://mail.google.com/mail/u/1/?ui=2&view=dim&iv
=1jvyjfdjwtb26&it=ic
image https://mail.google.com/mail/u/1/images/cleardot.g
if
image https://mail.google.com/mail/u/1/images/cleardot.g
if?zx=o64h5m8ngwwu
image https://plus.google.com/u/1/_/focus/photos/private
/AIbEiAIAAAAhCJqRwK3jsfb2RhCdncW1zqTpjBMYpKiKpbTkx
9-FATABfsQlviXhePOFWilIxg9QjzTSp4o?sz=48
image https://plus.google.com/u/1/_/focus/photos/private
/AIbEiAIAAAAhCJqRwK3jsfb2RhCiheXYh6Kk-AgYtOjL26ui5
4KqATABp5VRpWH2Q6OMpgKQ_YYYkFM8BGM?sz=48
image https://plus.google.com/u/1/_/focus/photos/public/
AIbEiAIAAABDCJqRwK3jsfb2RiILdmNhcmRfcGhvdG8qKDk5YT
A5YjQzOGZkYTk5OWRhYTQ0OTNiNDM3ZDllZjFiNGI1MWU4MzQw
AYj1Fwu4AUYChLFb-2uSgRRovL16?sz=24
image https://plus.google.com/u/1/_/focus/photos/public/
AIbEiAIAAABDCJqRwK3jsfb2RiILdmNhcmRfcGhvdG8qKDk5YT
A5YjQzOGZkYTk5OWRhYTQ0OTNiNDM3ZDllZjFiNGI1MWU4MzQw
AYj1Fwu4AUYChLFb-2uSgRRovL16?sz=27
image https://plus.google.com/u/1/_/focus/photos/public/
AIbEiAIAAABDCJqRwK3jsfb2RiILdmNhcmRfcGhvdG8qKDk5YT
A5YjQzOGZkYTk5OWRhYTQ0OTNiNDM3ZDllZjFiNGI1MWU4MzQw
AYj1Fwu4AUYChLFb-2uSgRRovL16?sz=48
image https://www.google.com/setgmail?zx=ogs7bfmf70cj
frame https://accounts.google.com/o/oauth2/postmessageRe
lay?parent=https%3A%2F%2Fmail.google.com#rpctoken=
250077760&forcesecure=1
frame https://apis.google.com/u/1/_/streamwidgets/hoverc
ard?origin=https%3A%2F%2Fmail.google.com&hl=en&jsh
=m%3B%2F_%2Fscs%2Fabc-static%2F_%2Fjs%2Fk%3Dgapi.g
api.en.iZDBesfZ6mY.O%2Fm%3D__features__%2Frt%3Dj%2
Fd%3D1%2Frs%3DAItRSTP_sEernYXqJDrKaJ6RhtFAapKzIQ#r
pctoken=149681052&methods=noContent%2Ckeystroke%2
Cready%2CdispatchEvent%2C_event%2C_ready%2C_close%
2C_open%2C_resizeMe%2C_renderstart&id=I1_141082744
5676&parent=https%3A%2F%2Fmail.google.com&pfname=
frame https://clients6.google.com/static/proxy.html?jsh=
m%3B%2F%2Fscs%2Fabc-static%2F_%2Fjs%2Fk%3Dgapi.ga
pi.en.iZDBesfZ6mY.O%2Fm%3D__features__%2Frt%3Dj%2F
d%3D1%2Frs%3DAItRSTP_sEernYXqJDrKaJ6RhtFAapKzIQ#pa
rent=https%3A%2F%2Fmail.google.com&rpctoken=427586
664
frame https://mail.google.com/_/scs/mail-static/_/js/k=g
mail.main.en.3VLAplWfUBM.O/m=m_i,t/am=nFXDS8jYH1TO
cJc-4Pbvf88-aXb_vshPmACEsBeA_zf7f9DWA_uh7tg/rt=h/d
=1/t=zcms/rs=AItRSTPu37R7guYiiCF913UXYuC2Y3dUKw
frame https://mail.google.com/mail/u/1/?ui=2&view=bsp&ve
r=ohhl4rw8mbn4
XHR https://mail.google.com/mail/u/1/?ui=2&ik=815ca75e
b6&rid=6845..&view=tl&start=0&num=45&lhop=3897236&
ltup=%5Es&slmm=1487ba8d5369dd1d&scid=593vjnaiib40&
avw=1194&ntlv=4&reqid=1377431&pcd=1&mb=0&rt=c&sea
rch=spam
XHR https://mail.google.com/mail/u/1/?ui=2&ik=815ca75e
b6&rid=mail%3Adas.6845.6.0&lmt=5000&at=AF6bupMp7cH
tRiva8qL-qnO7WMx7JuGRLw&view=up&act=dl&_reqid=1277
431&pcd=1&mb=0&rt=c&search=spam
XHR https://mail.google.com/mail/u/1/?ui=2&ik=815ca75e
b6&rid=mail%3Alc.6845.4.0&view=tl&start=0&num=45&a
vw=1194&_reqid=1077431&pcd=1&mb=0&rt=c&search=spam
XHR https://mail.google.com/mail/u/1/?ui=2&ik=815ca75e
b6&rid=mail%3Alc.6845.4.1&view=cv&th=1487ba8d5369d
d1d&th=1487b8ddbe1f6807&th=1487b79922fa65a6&th=148
7b66c8c57558e&prf=1&_reqid=1177431&nsc=1&mb=0&rt=j
&search=spam
XHR https://mail.google.com/mail/u/1/?ui=2&ik=815ca75e
b6&rid=mail%3Ao.6845.10.0&view=amd&th=1487a19f4995
9c44&_reqid=1477431&pcd=1&mb=0&rt=j
XHR https://mail.google.com/mail/u/1/channel/bind?VER=
8&at=AF6bupMp7cHtRiva8qL-qnO7WMx7JuGRLw&it=1566&SI
D=8C0BDD2B9AC779AB&RID=13279&AID=25&zx=32aqvflxtfw
5&t=1
XHR https://mail.google.com/mail/u/1/channel/bind?VER=
8&at=AF6bupMp7cHtRiva8qL-qnO7WMx7JuGRLw&it=2187&SI
D=8C0BDD2B9AC779AB&RID=13276&AID=23&zx=uj3ssltgwpo
z&t=1
XHR https://mail.google.com/mail/u/1/channel/bind?VER=
8&at=AF6bupMp7cHtRiva8qL-qnO7WMx7JuGRLw&it=22432&S
ID=8C0BDD2B9AC779AB&RID=13273&AID=23&zx=rw71a356m4
ix&t=1
XHR https://mail.google.com/mail/u/1/channel/bind?VER=
8&at=AF6bupMp7cHtRiva8qL-qnO7WMx7JuGRLw&it=28405&S
ID=8C0BDD2B9AC779AB&RID=13278&AID=25&zx=jo07csavn6
r8&t=1
XHR https://mail.google.com/mail/u/1/channel/bind?VER=
8&at=AF6bupMp7cHtRiva8qL-qnO7WMx7JuGRLw&it=55&SID=
8C0BDD2B9AC779AB&RID=13274&AID=23&zx=83oxmd6ox29k&
t=1
XHR https://mail.google.com/mail/u/1/channel/bind?VER=
8&at=AF6bupMp7cHtRiva8qL-qnO7WMx7JuGRLw&it=59&SID=
8C0BDD2B9AC779AB&RID=13275&AID=23&zx=p4s3zjtkxhre&
t=1
XHR https://mail.google.com/mail/u/1/channel/bind?VER=
8&at=AF6bupMp7cHtRiva8qL-qnO7WMx7JuGRLw&it=7178&SI
D=8C0BDD2B9AC779AB&RID=13277&AID=24&zx=60wx7wqwtid
3&t=1
XHR https://mail.google.com/mail/u/1/?ui=2&ik=815ca75e
b6&view=ad&th=1487a19f49959c44&pws=1&search=inbox&
cw=889&ch=677 @@mail.google.com&view=ad&
XHR https://mail.google.com/mail/u/1/?ui=2&ik=815ca75e
b6&view=ad&th=1487b4e25c2bf432&pws=1&search=inbox&
cw=889&ch=677 @@mail.google.com&view=ad&
googleusercontent.com
image https://ci3.googleusercontent.com/proxy/kgdJdTgeu2
Jw5s5upIQ_DnW8dQz-kKc8HCiA_UR4mWUfixmFlzE08BoJY9PA
6Nqr-t-FqCNmtD3NL2bv-IajkzZqo7ryH84=s0-d-e1-ft#htt
p://www.jumbo.cl/FO_IMGS/img/estructura/fl.gif
image https://ci4.googleusercontent.com/proxy/-__5YZuW7B
C_jGCvKuZWkU3uzhQeybW71TnXxjSUqmOzHlFQ_ie7clAmF9Ff
jmlCvMplDVkngUmZ3Zn_Zzcfd4IQPvY1gA2Ew-K-8hmyPQQE7S
7YdoNsFBto1J2LDcGI-RAU0g5w39o=s0-d-e1-ft#http://ww
w.jumbo.cl/supermercado/mail/sustitucion/huincha_s
ustitucion_recuerda.jpg
image https://ci4.googleusercontent.com/proxy/BkitgRo09u
dvIeecFCVxFP1ZeLNznCX9ed-OK5xk9CoK5RUTe79Nqe7wrfZb
3Xbu8k7rrc2lWiNXoEUJ31ZYNrhhBXoxiZswrkNI7I2Xcciirv
RHBwJbSow=s0-d-e1-ft#http://www.jumbo.cl/supermerc
ado/mail/header_auto/bn_logo_jumbo.jpg
image https://lh3.googleusercontent.com/-A_rZzzVvzOk/AAA
AAAAAAAI/AAAAAAAAAAA/ADR3D12wy_U/s48-c/photo.jpg
image https://lh3.googleusercontent.com/-ie8x0TK4_Vk/AAA
AAAAAAAI/AAAAAAAAAAA/E4CDl2eM8mg/s48-c/photo.jpg
image https://lh3.googleusercontent.com/-rvbPuruB59w/AAA
AAAAAAAI/AAAAAAAAAAA/yCZ4R99re60/s48-c/photo.jpg
image https://lh5.googleusercontent.com/-WC8K5F9eQLw/AAA
AAAAAAAI/AAAAAAAAAAA/ujKIM7vKzs0/s48-c/photo.jpg
image https://mail-attachment.googleusercontent.com/atta
chment/u/1/?ui=2&ik=815ca75eb6&view=att&th=1487a19
f49959c44&attid=0.1&disp=emb&realattid=b13d59d349c
eb7a5_0.1&zw&atsh=1&saduie=AG9B_P8nQnO5fsCm8d4TH0q
2IV4C&sadet=1410827465000&sads=9hERn6JjgGCjnw057h-
vFRrS1vg
image https://mail-attachment.googleusercontent.com/imag
es/cleardot.gif?zx=ut1z4xihuyhu
gstatic.com
image https://csi.gstatic.com/csi?v=3&s=oz&action=null&i
t=wtsrt.203,tbsd_.381,tbnd_.0&srt=203&tbsrt=584&t
ran=15&rt=jsl.421,es.502,ec.528,jl.534,ol.584,fll.
3573
image https://ssl.gstatic.com/gb/images/v1_2e543709.png
image https://ssl.gstatic.com/inputtools/images/flat_pro
perty_icons.png
image https://ssl.gstatic.com/inputtools/images/ita_spri
te_grey2.png
image https://ssl.gstatic.com/inputtools/images/ita_spri
te2.png
image https://ssl.gstatic.com/mail/images/google_logo_68
x24.png
image https://ssl.gstatic.com/mail/sprites/chat-34cfc5a2
66109a1829cf01bdebf98b3b.png
image https://ssl.gstatic.com/mail/sprites/general_white
-2fe5e645306ac40f8f7d625f4404bddc.png
image https://ssl.gstatic.com/mail/sprites/general-51d58
3f1fd064eadd1975a8bdef3ef93.png
image https://ssl.gstatic.com/ui/v1/dialog/close-x.png
image https://ssl.gstatic.com/ui/v1/disclosure/dark-grey
-disclosure-arrow-down.png
image https://ssl.gstatic.com/ui/v1/disclosure/light-gre
y-disclosure-arrow-down.png
image https://ssl.gstatic.com/ui/v1/icons/mail/ads_info_
icon.png
image https://ssl.gstatic.com/ui/v1/icons/mail/contact_s
prite_light.png
image https://ssl.gstatic.com/ui/v1/icons/mail/grippy_la
rge_dark.png
image https://ssl.gstatic.com/ui/v1/icons/mail/im_callph
one_white.png
image https://ssl.gstatic.com/ui/v1/icons/mail/im/presen
ce_greenrobot_away.png
image https://ssl.gstatic.com/ui/v1/icons/mail/images/2/
openhand.cur
image https://ssl.gstatic.com/ui/v1/icons/mail/images/cl
eardot.gif
image https://ssl.gstatic.com/ui/v1/icons/mail/images/sp
inner_18_18.gif
image https://ssl.gstatic.com/ui/v1/icons/mail/no_photo.
png
image https://ssl.gstatic.com/ui/v1/icons/mail/profile_m
ask2.png
image https://ssl.gstatic.com/ui/v1/icons/mail/sprite_im
portance2.png
image https://ssl.gstatic.com/ui/v1/icons/mail/sprite_wh
ite2.png
image https://ssl.gstatic.com/ui/v1/icons/mail/toolbar/t
oggle_sprite_white.png
image https://ssl.gstatic.com/ui/v1/star/star-dark-hover
4.png
image https://ssl.gstatic.com/ui/v1/star/star-dark4.png
image https://ssl.gstatic.com/ui/v1/star/star4.png
image https://ssl.gstatic.com/ui/v1/zippy/arrow_down_whi
te.png
From what I've seen so far, the problem is not the blocking of network filters (which is what the request log is about), it is the enforcing of cosmetic filters: here you showed that the style tag injected by uBlock was nowhere to be found in the DOM. This is not normal, as there are cosmetic filters made specifically for mail.google.com, so the style tag should always be there.
If only I could reproduce on my side I am pretty sure I could figure what is going wrong within minutes. That's the whole problem, I can't reproduce.
Months ago.





Ref: https://twitter.com/jzamoras/status/509755088253255681