Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'querySelectorAll') #124

Open
lookfirst opened this issue Nov 13, 2022 · 13 comments

Comments

@lookfirst
Copy link
Contributor

lookfirst commented Nov 13, 2022

refined-hacker-news.js:2756 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'querySelectorAll')
    at getGroupedStories (refined-hacker-news.js:2756:32)
    at requestVisitedStories (refined-hacker-news.js:2909:21)
    at hide_read_stories_init (refined-hacker-news.js:2960:5)
    at refined-hacker-news.js:3026:17
    at new Promise (<anonymous>)
    at Object.add (refined-hacker-news.js:3022:12)
    at initialiseAll (refined-hacker-news.js:5131:24)
@plibither8
Copy link
Owner

Thanks @lookfirst, got this error too - looking into it!

@lookfirst
Copy link
Contributor Author

Thank you sir. I'd submit PR's but I honestly can't work in JS... I'm so used to TS... would you be open to a conversion?

@plibither8
Copy link
Owner

@lookfirst sure! I've been contemplating for I don't know how long to do a massive refactor and rewrite the extension in TS. Would LOVE help with that too. Till then if you have capacity to look into this error and try your hand at it, I'd love to help you out! 🙂

@theY4Kman
Copy link
Contributor

It looks like table.itemlist is no longer an appropriate selector to get the <table> holding the stories. There doesn't appear to be any unique identifier on that table at all, any more. I've been testing out #hnmain table:has(.athing) as the selector instead.

@plibither8
Copy link
Owner

Thanks for the headsup @theY4Kman, I'll hopefully get time this weekend to deepdive into the issue, but the scope itself seems pretty large and would require a large-scale refactor... not looking forward. 😔

@lookfirst
Copy link
Contributor Author

lookfirst commented Nov 18, 2022 via email

@lookfirst
Copy link
Contributor Author

Oddly, ran across this whole blog post on :has

https://webkit.org/blog/13096/css-has-pseudo-class/

lookfirst added a commit to lookfirst/refined-hacker-news that referenced this issue Dec 2, 2022
@lookfirst
Copy link
Contributor Author

@plibither8 you forget me? ;-)

@fnordson
Copy link

fnordson commented Dec 24, 2022

I ran into the same issue.
Can someone here tell me if it's what causes the sorting to break because it hasn't been working for quite a while now.
(Firefox 108.0.1 @ windows10)

@lookfirst
Copy link
Contributor Author

The way this extension is coded, it breaks everything.

@compuguy
Copy link

compuguy commented Jul 11, 2023

This still seems to be an issue.

@fnordson
Copy link

I'd guess, this thing is dead.

@lookfirst
Copy link
Contributor Author

The extension mostly works with my PR applied to it. #125

It does seem dead, which is ok. It really does need a full rewrite.

I've been collecting notes on what a future version of this extension would look like, at some point, I'll find the time/motivation to start coding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants