question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`edit-readme`, `latest-tag-button`, and `edit-files-faster` console errors with "Error: GitHubURL can only be used on pages with a branch/reference."

See original GitHub issue

Whenever I load any GitHub repository page, I get three errors in the console related to Refined GitHub - Error: GitHubURL can only be used on pages with a branch/reference.

This happens in any repository for me, including this one or my hello-world repository (which does have a test release tag, so it should work). Here are the errors in the logs:

❌ Refined GitHub → edit-readme → Error: GitHubURL can only be used on pages with a branch/reference.
    at GitHubURL.disambiguateReference (refined-github.js:4580)
    at GitHubURL.set pathname [as pathname] (refined-github.js:4600)
    at new GitHubURL (refined-github.js:4562)
    at init (refined-github.js:6865)
    at async runFeature (refined-github.js:1902)
    at async setupPageLoad (refined-github.js:1915) 
Search issue: https://github.com/sindresorhus/refined-github/issues?q=is%3Aissue+GitHubURL%20can%20only%20be%20used%20on%20pages%20with%20a%20branch%2Freference.

Open an issue: https://github.com/sindresorhus/refined-github/issues/new?labels=bug&template=bug_report.md&title=%60edit-readme%60%3A%20GitHubURL%20can%20only%20be%20used%20on%20pages%20with%20a%20branch%2Freference.
		
logError @ refined-github.js:1884
runFeature @ refined-github.js:1904
async function (async)
runFeature @ refined-github.js:1902
setupPageLoad @ refined-github.js:1915
add @ refined-github.js:1949
async function (async)
add @ refined-github.js:1934
(anonymous) @ refined-github.js:6859
(anonymous) @ refined-github.js:9108
(anonymous) @ refined-github.js:9109
refined-github.js:1884


❌ Refined GitHub → latest-tag-button → Error: GitHubURL can only be used on pages with a branch/reference.
    at GitHubURL.disambiguateReference (refined-github.js:4580)
    at GitHubURL.set pathname [as pathname] (refined-github.js:4600)
    at new GitHubURL (refined-github.js:4562)
    at init (refined-github.js:5158)
    at async runFeature (refined-github.js:1902)
    at async setupPageLoad (refined-github.js:1915) 
Search issue: https://github.com/sindresorhus/refined-github/issues?q=is%3Aissue+GitHubURL%20can%20only%20be%20used%20on%20pages%20with%20a%20branch%2Freference.

Open an issue: https://github.com/sindresorhus/refined-github/issues/new?labels=bug&template=bug_report.md&title=%60latest-tag-button%60%3A%20GitHubURL%20can%20only%20be%20used%20on%20pages%20with%20a%20branch%2Freference.
		
logError @ refined-github.js:1884
runFeature @ refined-github.js:1904
async function (async)
runFeature @ refined-github.js:1902
setupPageLoad @ refined-github.js:1915
add @ refined-github.js:1949
async function (async)
add @ refined-github.js:1934
(anonymous) @ refined-github.js:5152
(anonymous) @ refined-github.js:9108
(anonymous) @ refined-github.js:9109
refined-github.js:1884


❌ Refined GitHub → edit-files-faster → Error: GitHubURL can only be used on pages with a branch/reference.
    at GitHubURL.disambiguateReference (refined-github.js:4580)
    at GitHubURL.set pathname [as pathname] (refined-github.js:4600)
    at new GitHubURL (refined-github.js:4562)
    at init (refined-github.js:6312)
    at async runFeature (refined-github.js:1902)
    at async setupPageLoad (refined-github.js:1915)
    at async chrome-extension:/hlepfoohegkhhmjieoechaddaejaokhf/build/refined-github.js:1948 
Search issue: https://github.com/sindresorhus/refined-github/issues?q=is%3Aissue+GitHubURL%20can%20only%20be%20used%20on%20pages%20with%20a%20branch%2Freference.

Open an issue: https://github.com/sindresorhus/refined-github/issues/new?labels=bug&template=bug_report.md&title=%60edit-files-faster%60%3A%20GitHubURL%20can%20only%20be%20used%20on%20pages%20with%20a%20branch%2Freference.

My settings:

I am currently using a token that only has API access without any extra permissions. Here is the list of features (with errors omitted):

↩️ Skipping align-issue-labels
↩️ Skipping clean-dashboard
↩️ Skipping hide-useless-newsfeed-events
↩️ Skipping hide-watch-and-fork-count
↩️ Skipping minimize-upload-bar
↩️ Skipping remove-diff-signs
↩️ Skipping more-dropdown
↩️ Skipping releases-tab
↩️ Skipping remove-projects-tab
↩️ Skipping hide-navigation-hover-highlight
↩️ Skipping deprioritize-marketplace-link
↩️ Skipping hide-own-stars
↩️ Skipping sync-pr-commit-title
↩️ Skipping hide-inactive-deployments
↩️ Skipping hide-issue-list-autocomplete
↩️ Skipping set-default-repositories-type-to-sources
↩️ Skipping bypass-checks
↩️ Skipping clean-conversation-sidebar
↩️ Skipping hide-zero-packages
↩️ Skipping clean-rich-text-editor
↩️ Skipping bugs-tab
↩️ Skipping clear-pr-merge-commit-message
↩️ Skipping clean-repo-filelist-actions
↩️ Skipping clean-conversation-headers
↩️ Skipping clean-repo-sidebar
↩️ Skipping wait-for-attachments
↩️ Skipping no-duplicate-list-update-time
✅ one-key-formatting
✅ selection-in-new-tab
✅ profile-hotkey
✅ close-out-of-view-modals
✅ improve-shortcut-help
✅ esc-to-deselect-line
✅ file-finder-buffer
✅ esc-to-cancel
✅ trending-menu-item
✅ shorten-links
✅ linkify-code
✅ navigate-pages-with-arrow-keys
✅ sort-conversations-by-update-time
✅ sort-milestones-by-closest-due-date
✅ star-repo-hotkey
✅ parse-backticks
✅ sticky-sidebar
✅ show-whitespace
✅ reload-failed-proxied-images
✅ linkify-user-location
✅ user-local-time
✅ stop-pjax-loading-with-esc
✅ rgh-sponsor-button
✅ collapse-markdown-sections
✅ toggle-files-button
✅ ci-link
✅ repo-age

The only visual difference is that the tag compare button does not appear because of that error. One strange thing is that it was working soon after I first installed the extension, but now it is not, even when I create a new profile with the default settings. I did turn off more-dropdown to deal with #4166, but I have turned it back on now in settings (now that it appears to be temporarily disabled for everyone through hotfix.json).

Please let me know if you need any more information, and I will be happy to help.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:6
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
yakov116commented, Mar 30, 2021

Shoot I knew this would happen one day.

1reaction
yakov116commented, Apr 5, 2021

They were never added to the list…

Read more comments on GitHub >

github_iconTop Results From Across the Web

`edit-readme`, `latest-tag-button`, and `edit-files-faster ... - GitHub
Here are the errors in the logs: ❌ Refined GitHub → edit-readme → Error: GitHubURL can only be used on pages with a...
Read more >
Console Errors | WordPress.org
Hi, Im having issues with console errors after installing the plugin. ... Please note I used this plugin for a while and it...
Read more >
sindresorhus/refined-github (Raised $2,687.94) - Issuehunt
`edit-readme`, `latest-tag-button`, and `edit-files-faster` console errors with "Error: GitHubURL can only be used on pages with a branch/reference.".
Read more >
HMC 5250 Console Errors - IBM
The first set consists of standard Operator Error Codes. These are 4-digit 5250 device errors such as 0005 and 0024. No secondary text...
Read more >
Fix JavaScript errors that are reported in the Console
This article walks you through six demo pages to demonstrate resolving JavaScript errors that are reported in the Console.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found