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

Website no longer working due to "bad credentials" #70

Open
marcolussetti opened this issue Dec 9, 2023 · 11 comments
Open

Website no longer working due to "bad credentials" #70

marcolussetti opened this issue Dec 9, 2023 · 11 comments
Labels
bug Something isn't working

Comments

@marcolussetti
Copy link

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

@wey-gu
Copy link
Contributor

wey-gu commented Jan 9, 2024

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

nianiaJR added a commit that referenced this issue Jan 9, 2024
@nianiaJR nianiaJR mentioned this issue Jan 9, 2024
3 tasks
nianiaJR added a commit that referenced this issue Jan 9, 2024
wey-gu added a commit that referenced this issue Jan 9, 2024
@marcolussetti
Copy link
Author

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

@Relequestual
Copy link

Looks like the issue has come back.

@QingZ11 QingZ11 added the bug Something isn't working label Jan 16, 2024
@nianiaJR
Copy link
Contributor

Looks like the issue has come back.

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

@nielifeng
Copy link

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
Copy link

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

@wey-gu
Copy link
Contributor

wey-gu commented Jan 18, 2024

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

nothing248 pushed a commit to nothing248/github-statistics that referenced this issue Jan 18, 2024
nothing248 pushed a commit to nothing248/github-statistics that referenced this issue Jan 18, 2024
@jerviscui
Copy link

jerviscui commented Mar 14, 2024

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

Same with me.
image

@nianiaJR
Copy link
Contributor

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

@alwqx
Copy link
Contributor

alwqx commented Apr 29, 2024

Hi all, I fix this problem in pr #74 .

please check and review my work.

@MrSharpp
Copy link

same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants