Skip to content

clean-repo-tabs: undefined is not an object (evaluating 'tabItem.closest') #5244

Closed

Description

@fregante

Please ensure:

  • The bug is caused by Refined GitHub. It doesn't happen if I disable the extension.

Include in this issue:

  • Screenshots/video/gif demonstrating the bug, if it’s visual
  • Console errors, if any

Description

Could it be because I'm on v21.12.12? Note that the repo lacks tags, releases and CI, so that might be throwing RGH off. You can drop the safari label if you see this error too.

Screen Shot 1

onlyShowInDropdown@safari-web-extension://098AE7A7-4F7A-4910-94B2-9141E9FC9393/build/refined-github.js:4284:15
@safari-web-extension://098AE7A7-4F7A-4910-94B2-9141E9FC9393/build/refined-github.js:10016:59
asyncFunctionResume@[native code]
@[native code]
promiseReactionJobWithoutPromise@[native code]
promiseReactionJob@[native code]

Example URL

https://github.com/guiyep/react-select-virtualized

Browser(s) used

Safari 15.1

Activity

  1. cheap-glitch commented on Dec 23, 2021

    @cheap-glitch
    Contributor

    I'm on 21.12.12 too at the time of writing, but I'm not seeing any errors when visiting the URL.

    Edit: Can't reproduce on latest main either.

  2. added
    safari
    on Dec 23, 2021
  3. kidonng commented on Jan 3, 2022

    @kidonng
    Member

    There's a high chance I encounter 0-3 of the following errors on the example URL:

    ❌ clean-repo-tabs 21.12.21 → TypeError: Cannot read properties of undefined (reading 'closest')
        at onlyShowInDropdown (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/build/refined-github.js:4262)
        at init (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/build/refined-github.js:9923)
        at async runFeature (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/build/refined-github.js:2904)
        at async setupPageLoad (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/build/refined-github.js:2914)
    
    ❌ more-dropdown-links 21.12.21 → TypeError: Cannot read properties of undefined (reading 'append')
        at init (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/build/refined-github.js:4313)
        at async runFeature (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/build/refined-github.js:2904)
        at async setupPageLoad (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/build/refined-github.js:2914)
    
    ❌ clean-repo-tabs 21.12.21 → TypeError: Cannot read properties of undefined (reading 'removeAttribute')
        at onlyShowInDropdown (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/build/refined-github.js:4264)
        at init (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/build/refined-github.js:9937)
        at async runFeature (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/build/refined-github.js:2904)
        at async setupPageLoad (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/build/refined-github.js:2914)
    

    On a private repo, I can reliably trigger the following errors:

    ❌ clean-repo-tabs 21.12.21 → TypeError: Cannot read properties of undefined (reading 'removeAttribute')
        at onlyShowInDropdown (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/build/refined-github.js:4264)
        at init (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/build/refined-github.js:9923)
        at async runFeature (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/build/refined-github.js:2904)
        at async setupPageLoad (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/build/refined-github.js:2914)
    
    ❌ more-dropdown-links 21.12.21 → TypeError: Cannot read properties of undefined (reading 'append')
        at init (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/build/refined-github.js:4313)
        at async runFeature (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/build/refined-github.js:2904)
        at async setupPageLoad (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/build/refined-github.js:2914)
    
    ❌ edit-readme 21.12.21 → TypeError: Cannot read properties of undefined (reading 'textContent')
        at init (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/build/refined-github.js:7442)
        at async runFeature (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/build/refined-github.js:2904)
        at async setupPageLoad (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/build/refined-github.js:2914)
    
  4. removed
    safari
    on Jan 11, 2022
  5. cheap-glitch commented on Jan 22, 2022

    @cheap-glitch
    Contributor

    Just go those errors too on Firefox with latest main:

    ❌ clean-repo-tabs 0.0.0 → TypeError: tabItem is undefined
        onlyShowInDropdown moz-extension://c2ad1c81-15a9-47dc-844b-f4235a6885c1/build/refined-github.js:9478
        init moz-extension://c2ad1c81-15a9-47dc-844b-f4235a6885c1/build/refined-github.js:4355
        runFeature moz-extension://c2ad1c81-15a9-47dc-844b-f4235a6885c1/build/refined-github.js:8005
        setupPageLoad moz-extension://c2ad1c81-15a9-47dc-844b-f4235a6885c1/build/refined-github.js:8021
        add moz-extension://c2ad1c81-15a9-47dc-844b-f4235a6885c1/build/refined-github.js:8078
        tsx moz-extension://c2ad1c81-15a9-47dc-844b-f4235a6885c1/build/refined-github.js:4358
        __webpack_require__ moz-extension://c2ad1c81-15a9-47dc-844b-f4235a6885c1/build/refined-github.js:25925
        <anonymous> moz-extension://c2ad1c81-15a9-47dc-844b-f4235a6885c1/build/refined-github.js:26184
        <anonymous> moz-extension://c2ad1c81-15a9-47dc-844b-f4235a6885c1/build/refined-github.js:26393
        <anonymous> moz-extension://c2ad1c81-15a9-47dc-844b-f4235a6885c1/build/refined-github.js:26395
    refined-github.js:7926:11
    
    ❌ more-dropdown-links 0.0.0 → TypeError: select_dom__WEBPACK_IMPORTED_MODULE_2__["default"](...) is undefined
        init moz-extension://c2ad1c81-15a9-47dc-844b-f4235a6885c1/build/refined-github.js:9495
        runFeature moz-extension://c2ad1c81-15a9-47dc-844b-f4235a6885c1/build/refined-github.js:8005
        setupPageLoad moz-extension://c2ad1c81-15a9-47dc-844b-f4235a6885c1/build/refined-github.js:8021
        add moz-extension://c2ad1c81-15a9-47dc-844b-f4235a6885c1/build/refined-github.js:8078
        tsx moz-extension://c2ad1c81-15a9-47dc-844b-f4235a6885c1/build/refined-github.js:9500
        __webpack_require__ moz-extension://c2ad1c81-15a9-47dc-844b-f4235a6885c1/build/refined-github.js:25925
        <anonymous> moz-extension://c2ad1c81-15a9-47dc-844b-f4235a6885c1/build/refined-github.js:26012
        <anonymous> moz-extension://c2ad1c81-15a9-47dc-844b-f4235a6885c1/build/refined-github.js:26393
        <anonymous> moz-extension://c2ad1c81-15a9-47dc-844b-f4235a6885c1/build/refined-github.js:26395
    refined-github.js:7926:11
    

    It may be caused by the repo header dropdown being lazy-loaded.

  6. BlackOfWorld commented on Feb 3, 2022

    @BlackOfWorld
    ❌ clean-repo-tabs 21.12.21 → TypeError: Cannot read properties of undefined (reading 'closest')
        at onlyShowInDropdown (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/build/refined-github.js:4262)
        at init (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/build/refined-github.js:9923)
        at async runFeature (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/build/refined-github.js:2904)
        at async setupPageLoad (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/build/refined-github.js:2914)
    
    ❌ more-dropdown-links 21.12.21 → TypeError: Cannot read properties of undefined (reading 'append')
        at init (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/build/refined-github.js:4313)
        at async runFeature (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/build/refined-github.js:2904)
        at async setupPageLoad (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/build/refined-github.js:2914)
    

    Same here

  7. cheap-glitch commented on Apr 24, 2022

    @cheap-glitch
    Contributor

    I'm getting this one fairly often nowadays. We need to add an elementReady somewhere…

    ❌ clean-repo-tabs refined-github.js:3859:17
    📕 22.4.21 → TypeError: menuItem is undefined
    	onlyShowInDropdown moz-extension://6ffeab5e-837d-450e-9fa5-fe3ec6a7ee9f/refined-github.js:5250
    	init moz-extension://6ffeab5e-837d-450e-9fa5-fe3ec6a7ee9f/refined-github.js:11189
    	runFeature moz-extension://6ffeab5e-837d-450e-9fa5-fe3ec6a7ee9f/refined-github.js:3902
    
  8. self-assigned this
    on Apr 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions