sindresorhus/refined-github

Hide errors when logged out #4287

stdedos posted onGitHub

❌ Refined GitHub β†’ set-default-repositories-type-to-sources β†’

TypeError: Failed to execute 'observe' on 'MutationObserver': parameter 1 is not of type 'Node'.
    at refined-github.js:3850
    at new Promise (<anonymous>)
    at oneMutation (refined-github.js:3846)
    at onProfileDropdownLoad (refined-github.js:4636)
    at async chrome-extension:/hlepfoohegkhhmjieoechaddaejaokhf/build/refined-github.js:6004
    at async runFeature (refined-github.js:1936)
    at async setupPageLoad (refined-github.js:1949)
    at async chrome-extension:/hlepfoohegkhhmjieoechaddaejaokhf/build/refined-github.js:1982 

Search issue: https://github.com/sindresorhus/refined-github/issues?q=is%3Aissue+Failed%20to%20execute%20'observe'%20on%20'MutationObserver'%3A%20parameter%201%20is%20not%20of%20type%20'Node'.

Open an issue: https://github.com/sindresorhus/refined-github/issues/new?labels=bug&template=bug_report.md&title=%60set-default-repositories-type-to-sources%60%3A%20Failed%20to%20execute%20'observe'%20on%20'MutationObserver'%3A%20parameter%201%20is%20not%20of%20type%20'Node'.

As noted on RG itself - RG is only expected to work when you're logged in to Github


If you're seeing "RG is only expected to work when you're logged in to Github", it means you're not logged in, so this error is to be expected.

posted by fregante almost 4 years ago

Can't the stacktrace be suppressed exactly because this is the case that I am not signed in? πŸ˜•

posted by stdedos almost 4 years ago

This https://github.com/sindresorhus/refined-github/blob/0ffe00109d95eaa95af967ddd031b9d793231b41/source/features/index.tsx#L96-L98 looks like a very big hammer, instead of a fine-grained solution (i.e. whatever is refined-github.js:3850's problem, silence/re-arrange that one).

But if you feel that this was the correct way to do it, feel free to ignore my very-big-chop concerns. πŸ˜€

posted by stdedos almost 4 years ago

whatever is refined-github.js:3850's problem, silence/re-arrange that one.

As the message says, Refined GitHub is only expected to work when you’re logged in to GitHub, which means we are definitely not going to cater to logged out users and come up with fine-grained solutions for this specific issue.

Either we show the issues or we don't. Anything else means spending time on logged out users, time which doesn't exist πŸ˜…

posted by fregante almost 4 years ago

Fund this Issue

$0.00
Funded

Pull requests