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

Console Errors #2530

Closed
3 tasks done
yakov116 opened this issue Nov 11, 2019 · 8 comments · Fixed by #2539
Closed
3 tasks done

Console Errors #2530

yakov116 opened this issue Nov 11, 2019 · 8 comments · Fixed by #2539
Labels
bug help wanted small Issues that new contributors can pick up

Comments

@yakov116
Copy link
Member

yakov116 commented Nov 11, 2019

 forked-to
content.js:2856 TypeError: Cannot read property 'addEventListener' of null
    at forked_to_init (content.js:7820)
    at features_run (content.js:2851)
    at content.js:2898
    at content.js:2813
    at onAjaxedPagesRaw (content.js:2808)
 more-dropdown
content.js:2856 TypeError: Cannot read property 'append' of null
    at appendBefore (content.js:3537)
    at createDropdown (content.js:3565)
    at more_dropdown_init (content.js:3578)
    at async features_run (content.js:2851)
 edit-files-faster
content.js:2856 Error: Unable to fetch.
Ensure that your token has access to this repo.
{
	"message": "Not Found",
	"documentation_url": "https://developer.github.com/v3/repos/#get"
}
    at getError (content.js:3063)
    at async chrome-extension:/hlepfoohegkhhmjieoechaddaejaokhf/content.js:3025
    at async fetchFromApi (content.js:3078)
    at async get_default_branch (content.js:3086)
    at async edit_files_faster_init (content.js:6973)
    at async features_run (content.js:2851)
  • Click on the sponsor button in a repo or the watch dropdown
content.js:4502 Uncaught TypeError: Failed to execute 'observe' on 'IntersectionObserver': parameter 1 is not of type 'Element'.
    at HTMLDocument.<anonymous> (content.js:4502)
    at HTMLDocument.listenerFn (content.js:369)
 embed-gist-via-iframe
content.js:2856 TypeError: Cannot read property 'cloneNode' of null
    at embed_gist_via_iframe_init (content.js:8398)
    at features_run (content.js:2851)
    at Object.add (content.js:2896)
@yakov116 yakov116 added the bug label Nov 11, 2019
@busches
Copy link
Member

busches commented Nov 12, 2019

Once this is merged, we can update our dependency: Mottie/github-reserved-names#8. This will fix the first two. The gist error needs a different fix.

@yakov116
Copy link
Member Author

@busches it was

@fregante
Copy link
Member

Fix for the last one: embed-gist-via-iframe needs to be limited to actual gists:

Ok: https://gist.github.com/yakov116/2d81580f7907839f9065e670f0aba64c
Not ok: https://gist.github.com/yakov116

cc @kidonng

@fregante
Copy link
Member

The second one is due to close-out-of-view-modals. It could probably be fixed by excluding "fixed" modals like that one.

@kidonng
Copy link
Member

kidonng commented Nov 12, 2019

Fix for the last one: embed-gist-via-iframe needs to be limited to actual gists:

Ok: https://gist.github.com/yakov116/2d81580f7907839f9065e670f0aba64c
Not ok: https://gist.github.com/yakov116

cc @kidonng

Roger that. Should I create some isSingleGist function like previous isSingleHTMLFile or check target element existence 😅?

@busches
Copy link
Member

busches commented Nov 12, 2019 via email

@fregante fregante added small Issues that new contributors can pick up help wanted labels Nov 21, 2019
@kidonng
Copy link
Member

kidonng commented Dec 3, 2019

Errors on Sponsor pages (e.g. https://github.com/sponsors/sindresorhus), as of 19.12.2 on Firefox:

❌ toggle-files-button features.tsx:77:16
TypeError: "Argument 1 of MutationObserver.observe is not an object."
    observeElement simplified-element-observer.ts:7
    toggle_files_button_init toggle-files-button.tsx:18
    features_run features.tsx:72
    add features.tsx:123
    onAjaxedPages features.tsx:25
    onAjaxedPagesRaw features.tsx:20

❌ hide-zero-packages features.tsx:77:16
TypeError: "undefined has no properties"
    hide_zero_packages_init hide-zero-packages.tsx:6
    features_run features.tsx:72
    add features.tsx:123
    onAjaxedPages features.tsx:25
    onAjaxedPagesRaw features.tsx:20

❌ forked-to features.tsx:77:16
TypeError: "select_dom_default(...)(...) is null"
    forked_to_init forked-to.tsx:47
    features_run features.tsx:72
    add features.tsx:123
    onAjaxedPages features.tsx:25
    onAjaxedPagesRaw features.tsx:20

❌ more-dropdown features.tsx:77:16
TypeError: "parent is null"
    appendBefore dom-utils.ts:34
    createDropdown more-dropdown.tsx:13
    more_dropdown_init more-dropdown.tsx:22
Will fetch https://api.github.com/repos/sponsors/sindresorhus api.ts:57:12

❌ repo-age features.tsx:77:16
Error: "GraphQL:
Could not resolve to a User with the username 'sponsors'."
    RefinedGitHubAPIError api.ts:31
    v4 api.ts:113

❌ edit-files-faster features.tsx:77:16
Error: "Unable to fetch.
Ensure that your token has access to this repo.
{
	"message": "Not Found",
	"documentation_url": "https://developer.github.com/v3/repos/#get"
}"
    RefinedGitHubAPIError api.ts:31
    getError api.ts:133

Consider making a new page rule for /sponsor?

@busches
Copy link
Member

busches commented Dec 3, 2019

We need to bump this dependency and they should go away. #2530 (comment)

Anyone can submit the PR, I've been a bit busy lately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help wanted small Issues that new contributors can pick up
Development

Successfully merging a pull request may close this issue.

4 participants