github-statistics icon indicating copy to clipboard operation
github-statistics copied to clipboard

Website no longer working due to "bad credentials"

Open marcolussetti opened this issue 1 year ago • 13 comments

Please check the FAQ documentation before raising an issue

Describe the bug (required)

The website is not working at all now. When a project is being typed in, nothing happens. When you check the browser console, it gets filled with 401 errors from the GitHub GraphQL API with the response of "Bad credentials"

Your Environments (required)

  • OS: Tested on Firefox and Chromium (Linux)
  • Commit id: N/A (current live version

How To Reproduce(required)

Steps to reproduce the behavior:

  1. Got to https://vesoft-inc.github.io/github-statistics/
  2. Type in any repository
  3. The button never becomes enabled and no data is ever loaded

Expected behavior

Data is loaded, graphs are shown

Additional context

marcolussetti avatar Dec 09 '23 23:12 marcolussetti

@nianiaJR I got a couple of user complain about this lately, could you please help take a look at it when free?

wey-gu avatar Jan 09 '24 02:01 wey-gu

Thank you so much @wey-gu & @nianiaJR !

marcolussetti avatar Jan 09 '24 19:01 marcolussetti

Looks like the issue has come back.

Relequestual avatar Jan 12 '24 13:01 Relequestual

Looks like the issue has come back.

what's the problem? I've tested it in my local env, it looks ok.

nianiaJR avatar Jan 16 '24 06:01 nianiaJR

index.js:286 Uncaught (in promise) Error: GraphQL Error (Code: 401): {"response":{"message":"Bad credentials","documentation_url":"https://docs.github.com/graphql","status":401},"request":{"query":"\n query searchRepository($query: String!){\n search(query: $query, first: 5, type: REPOSITORY) {\n codeCount\n nodes {\n ...on Repository {\n nameWithOwner\n }\n }\n }\n }\n ","variables":{"query":"Ap"}}} at e. (index.js:286:21) at index.js:137:19 at Object.next (index.js:67:14) at a (index.js:19:24)

nielifeng avatar Jan 18 '24 03:01 nielifeng

POST https://api.github.com/graphql 401 (Unauthorized)

nielifeng avatar Jan 18 '24 04:01 nielifeng

I think @nielifeng meant the serving version on github pages, that won't work now with the change removing hardcoded credentials.

To enable that, we could further:

  • provide a configuration interface to enable a user to fill in their own API token
  • or, register it as a github application, and implement oauth2 flow to get github user's token as they need

wey-gu avatar Jan 18 '24 05:01 wey-gu

POST api.github.com/graphql 401 (Unauthorized)

Same with me. image

jerviscui avatar Mar 14 '24 07:03 jerviscui

It's like that you don't have the access to the Github API, have you config your own token here https://github.com/vesoft-inc/github-statistics/blob/master/.env ?

It has been described in the README

nianiaJR avatar Mar 15 '24 06:03 nianiaJR

Hi all, I fix this problem in pr https://github.com/vesoft-inc/github-statistics/pull/74 .

please check and review my work.

alwqx avatar Apr 29 '24 09:04 alwqx

same problem

MrSharpp avatar May 26 '24 06:05 MrSharpp

This looks like a cool project! Comparable to the great https://star-history.com .

It's a pity the public demo doesn't work. Could it be fixed again ?

simonmichael avatar May 17 '25 21:05 simonmichael

The public demo isn't working anymore.

mig82 avatar May 19 '25 19:05 mig82

Still not working

mig82 avatar Jul 22 '25 07:07 mig82