Skip to content

rgh-netiquette: Cannot read properties of undefined (reading 'getAttribute') #8296

Closed

Description

@evan361425

Description

Even closing all features, i got:

TypeError: Cannot read properties of undefined (reading 'getAttribute')
    at getCloseDate (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/assets/features/netiquette.js:24:38)
    at wasClosedLongAgo (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/assets/features/netiquette.js:47:22)
    at init (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/assets/features/rgh-netiquette.js:52:7)
    at chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/assets/feature-manager.js:167:26
    at chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/assets/helpers/async-for-each.js:6:52
    at Array.map (<anonymous>)
    at asyncForEach (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/assets/helpers/async-for-each.js:6:34)
    at chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/assets/feature-manager.js:166:9
    at async Promise.all (index 0)
    at async asyncForEach (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/assets/helpers/async-for-each.js:6:2)

Image

How to replicate the issue + URL

#4166

Extension version

25.2.17

Browser(s) used

Chrome Version 133.0.6943.99 (Official Build) (arm64)

Token ⚠️

  • I set a token in the options page. I understand that some features require a token to work.

Activity

  1. kovsu commented on Feb 20, 2025

    @kovsu
    Member
    [data-testid="state-reason-link"]:is(
    	[href*="reason%3Acompleted"],
    	[href*="reason%3Anot-planned"]
    )

    We need to wait the dom be loaded now. 🥲

  2. fregante commented on Feb 20, 2025

    @fregante
    Member

    Is that in wasClosedLongAgo?

    I suppose the check can be moved into the observer (addConversationBanner)

  3. kovsu commented on Feb 24, 2025

    @kovsu
    Member

    In fregante/sandbox#8, every features for netiquette work fine. Less comments may don't be affected.

  4. matthewhively commented on Mar 27, 2025

    @matthewhively

    I also received this error on page: ktheory/dalli-elasticache#54

  5. kovsu commented on Mar 28, 2025

    @kovsu
    Member

    @matthewhively Your error is about netiquette not rgh-netiquette

  6. removed
    smallIssues that new contributors can pick up
    on Mar 31, 2025
  7. fregante commented on Mar 31, 2025

    @fregante
    Member

    The error is the same: getLastCloseEvent is called too early and it cannot find the closing event.

    wasClosedLongAgo needs a minor rework in order to await the React view. Adding delay(1000) works but obviously not good.

    jump-to-conversation-close-event is also affected.

    I see a few options:

    • rework the features to observe the close event, and then act on it (might need a nested observer though)
    • make wasClosedLongAgo resolve only once the React view is at least partially loaded
    • use the API in wasClosedLongAgo

    The netiquette features can use the API, it's the easiest

    jump-to-conversation-close-event still needs to find the exact element on the page to work, so the first solution is best

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions