uBlockOrigin / uBlock-issues

This is the community-maintained issue tracker for uBlock Origin
https://github.com/gorhill/uBlock
922 stars 77 forks source link

Site problem with the new google-ima shim script #2265

Open mapx- opened 2 years ago

mapx- commented 2 years ago

Discussed in https://github.com/uBlockOrigin/uBlock-issues/discussions/2264

Originally posted by **vlaszlo** September 13, 2022 STR (using the most current Firefox nightly, if it matters): 1. Create a new profile, install 1.44.3b3. 2. Important: Purge and update filter lists. 3. On [EHF TV](https://ehftv.com/player/vod/metz-handball-v-storhamar-handball-elite-match-highlights-r1?entryId=0_6lco8i4c&competitions=EHF%20Champions%20League%20Women&categories=Highlights), click through 2 or 3 videos, you don't actually have to watch them to the end. Notice they are functioning normally. 4. Install 1.44.3b4. 5. Go to [EHF TV](https://ehftv.com/player/vod/metz-handball-v-storhamar-handball-elite-match-highlights-r1?entryId=0_6lco8i4c&competitions=EHF%20Champions%20League%20Women&categories=Highlights), try to watch a few videos again. They now either don't load at all, or they play with sound but no picture. If I interpret the logger right, the google-ima script is blocked with beta3, while it's replaced with the shim in beta4. Allowing the connection to imasdk.googleapis.com makes the videos work normally again in beta4, too. Now the question: Filter issue (an exception needs to be added) or uBlock issue (the shim script needs to be improved)?
stephenhawk8054 commented 1 year ago

Looks like after google-ima script redirection starts to apply in 1.45, more reports of video's breakages appear than I expected.

gorhill commented 1 year ago

Ok let's remove the redirect-rule filter. We will try to use the filter only when video breakage is reported when ima3 is blocked (there are many exceptions for this, I though a neutered script would help).

gorhill commented 1 year ago

https://github.com/uBlockOrigin/uAssets/commit/1a3871bc904972e6c089668f80f8eef98b3ff2e6

gorhill commented 1 year ago

So we will try to fix breakage as a result of blocking ima3 by using the redirect rule, and if this does not work, we will then use an exception filter (as was the case before ima3). When the redirect rule does not work, I will try to find out if the ima3 neutered script can be improved.

stephenhawk8054 commented 1 year ago

@gorhill I'm not sure if google-ima has updated or not. In this case: https://github.com/uBlockOrigin/uAssets/issues/13393#issuecomment-1139089175 , when I switched from allowing to redirection via

@@||components2.rcsobjects.it/rcs_adv/v1/distro/dfp/common/prebid$script,domain=oggi.it
@@||imasdk.googleapis.com/js/sdkloader/ima3.js$script,domain=oggi.it,badfilter
||imasdk.googleapis.com/js/sdkloader/ima3.js$script,domain=oggi.it,redirect-rule=google-ima.js

video is still broken and there are errors reported that google.ima.OmidVerificationVendor and t.omidAccessModeRules are undefined. So I set

oggi.it##+js(set, google.ima.OmidVerificationVendor, {})
oggi.it##+js(set, Object.prototype.omidAccessModeRules, {})

then the video works.

The ima script has

w("google.ima.OmidVerificationVendor", {
    COMSCORE: 7,
    DOUBLEVERIFY: 3,
    GOOGLE: 9,
    INTEGRAL_AD_SCIENCE: 4,
    MEETRICS: 8,
    MOAT: 2,
    NIELSEN: 6,
    PIXELATE: 5,
    OTHER: 1,
    7: "COMSCORE",
    3: "DOUBLEVERIFY",
    9: "GOOGLE",
    4: "INTEGRAL_AD_SCIENCE",
    8: "MEETRICS",
    2: "MOAT",
    6: "NIELSEN",
    5: "PIXELATE",
    1: "OTHER"
});

and this.omidAccessModeRules = {};.


Same situation with https://github.com/uBlockOrigin/uAssets/issues/16309

@@||components2.rcsobjects.it/rcs_adv/*/distro/dfp/common/prebid$script,domain=video.gazzetta.it
||imasdk.googleapis.com/js/sdkloader/ima3.js$script,domain=video.gazzetta.it,redirect-rule=google-ima.js
video.gazzetta.it##+js(set, google.ima.OmidVerificationVendor, {})
video.gazzetta.it##+js(set, Object.prototype.omidAccessModeRules, {})
MasterKia commented 1 year ago

When the redirect rule does not work, I will try to find out if the ima3 neutered script can be improved.

@gorhill With: ||imasdk.googleapis.com/js/sdkloader/ima3.js^$redirect-rule=google-ima.js

When clicking on any video here: https://gem.cbc.ca/push

I get in console:

TypeError: this is undefined
    value NextJS
    _dispatch https://imasdk.googleapis.com/js/sdkloader/ima3.js:323
    requestAds https://imasdk.googleapis.com/js/sdkloader/ima3.js:364
    promise callback*requestAds https://imasdk.googleapis.com/js/sdkloader/ima3.js:361
    NextJS 73
[ima3.js:325:19](https://imasdk.googleapis.com/js/sdkloader/ima3.js)
    _dispatch https://imasdk.googleapis.com/js/sdkloader/ima3.js:325
    requestAds https://imasdk.googleapis.com/js/sdkloader/ima3.js:364
    (Async: promise callback)
    requestAds https://imasdk.googleapis.com/js/sdkloader/ima3.js:361

https://github.com/uBlockOrigin/uAssets/issues/17367

stephenhawk8054 commented 1 year ago

There are 2 sites that need ##+js(set, google.ima.settings.setDisableFlashAds, noopFunc)

https://github.com/uBlockOrigin/uAssets/issues/14656 https://github.com/uBlockOrigin/uAssets/issues/19045

gorhill commented 1 year ago

https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/history:

3.214.1 | 6/12/2018 | Removes ImaSdkSettings.setDisableFlashAds() and ImaSdkSettings.getDisableFlashAds(). Flash support has been sunset in the HTML5 SDK as of 5/15/18.

https://github.com/gorhill/uBlock/commit/cdf385f5f46e2d82763da13a1c734ab3fd38d26d

stephenhawk8054 commented 1 year ago

Confirm it works 👍

MasterKia commented 1 year ago

Issue on: https://www.kraloyun.com/Oyun/Bubble-Shooter-Pro-2

Details: https://github.com/AdguardTeam/Scriptlets/issues/353