Skip to content

fetching the GitHub Education API failed with status 401: Unauthorized #12203

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

Closed
jankeromnes opened this issue Aug 18, 2022 · 2 comments · Fixed by #13082
Closed

fetching the GitHub Education API failed with status 401: Unauthorized #12203

jankeromnes opened this issue Aug 18, 2022 · 2 comments · Fixed by #13082
Assignees
Labels
git provider: github team: webapp Issue belongs to the WebApp team type: bug Something isn't working type: improvement Improves an existing feature or existing code

Comments

@jankeromnes
Copy link
Contributor

Bug description

In most Gitpod installations (every one except production i.e. https://gitpod.io), we see these errors very frequently in the logs:

fetching the GitHub Education API failed with status 401: Unauthorized

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at EligibilityService.<anonymous> (/app/node_modules/@gitpod/server/dist/ee/src/user/eligibility-service.js:88:37)
    at Generator.next (<anonymous>)
    at fulfilled (/app/node_modules/@gitpod/server/dist/ee/src/user/eligibility-service.js:19:58)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

We don't think this error is problematic (it's just that checking the GitHub student status fails), however it's very noisy, and often distracts from "real problems" by acting as a "red herring" (i.e. investigate a new bug, check the logs, see this, report it -- but that wasn't the relevant error message).

We should probably fix it in dev to make our lives easier.

Steps to reproduce

  1. Use any Gitpod preview or staging environment
  2. Check the server logs

Workspace affected

No response

Expected behavior

When checking the student status on GitHub fails, we shouldn't be as loud about it (either log a clear, minimal warning, or don't log anything at all).

Example repository

No response

Anything else?

No response

@jankeromnes jankeromnes added type: bug Something isn't working git provider: github type: improvement Improves an existing feature or existing code team: webapp Issue belongs to the WebApp team labels Aug 18, 2022
@geropl
Copy link
Member

geropl commented Sep 15, 2022

@AlexTugarev I believe you had a commit with a fix somewhere...? Cannot find it anymore.

@AlexTugarev
Copy link
Member

this happens to happen in the isStudent check. AFAIR it was a missing return. commit is gone, but that's a quick fix.

@geropl geropl moved this to Scheduled in 🍎 WebApp Team Sep 19, 2022
@AlexTugarev AlexTugarev self-assigned this Sep 19, 2022
@AlexTugarev AlexTugarev moved this from Scheduled to In Progress in 🍎 WebApp Team Sep 19, 2022
Repository owner moved this from In Progress to Done in 🍎 WebApp Team Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
git provider: github team: webapp Issue belongs to the WebApp team type: bug Something isn't working type: improvement Improves an existing feature or existing code
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants