NirmalScaria / le-git-graph

Browser extension to add git graph to GitHub website.
https://chrome.google.com/webstore/detail/le-git-graph-commits-grap/joggkdfebigddmaagckekihhfncdobff
MIT License
3.48k stars 18 forks source link

TypeError when fetching commits #25

Closed pprkut closed 1 year ago

pprkut commented 1 year ago

I tested the firefox extension with a couple repos, and for some it works quite nice, for some others I get a TypeError:

TypeError: data.data.repository is null

in

fetchCommits.js:119:31

So far I could only reproduce this with some private repositories, so not sure what exactly triggers this :-/

NirmalScaria commented 1 year ago

This was never observed and I am not able to reproduce this. Please add some steps to reproduce the error, or try to provide a reference repo where this error is happening. Still, looking at the error message, this has to be something wrong with the usage of API for fetching commits.

pprkut commented 1 year ago

I'm also getting the same error in chrome, so at least it's not browser specific. Chrome's console gives me:

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'refs')
    at fetchCommitsPage (fetchCommits.js:119:52)
    at async fetchCommits (fetchCommits.js:142:9)
    at async HTMLAnchorElement.openCommitsTab (openCommitsTab.js:45:9)

So far I could reproduce it with every private repo I tried

pprkut commented 1 year ago

https://github.com/move-sysadmin/saltstack-formula-freeradius is a public repo that gives me a slightly similar error:

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'edges')
    at fetchCommitsPage (fetchCommits.js:119:57)
    at async fetchCommits (fetchCommits.js:142:9)
    at async HTMLAnchorElement.openCommitsTab (openCommitsTab.js:45:9)
pprkut commented 1 year ago

I just tested again (firefox reports version 1.0.51) and now all the repos it failed with before are working :)