codecov / feedback

A place to discuss feedback about the pull request and web product experience.
37 stars 7 forks source link

[Self-hosted] UnauthorizedGuestAccess error after updating from 24.8.1 to 24.9.3/24.10.1/24.11.1 #536

Open nikosatwork opened 1 month ago

nikosatwork commented 1 month ago

Describe the bug Not able to 'Login via GitHub Enterprise' after upgrading to 24.9.3, 24.10.1 or 24.11.1 from 24.8.1

Exception UnauthorizedGuestAccess: Unauthorized

in graphql_api/types/query/query.py#L51

Environment (please complete the following information):

To Reproduce Steps to reproduce the behavior:

  1. Upgrade to 24.9.3, 24.10.1 or 24.11.1
  2. Hit 'Login via GitHub Enterprise' in the home screen
  3. Always get redirected back to the home screen & not able to proceed

Expected behavior Login successfuly

Additional context

Note we have tried setting both guest_access: true & guest_access: false

UPDATE: This is happening only when guest_access: false

This is urgent as we need to update to the newer version because of https://github.com/codecov/feedback/issues/523

nikosatwork commented 1 month ago

cc @drazisil-codecov

drazisil-codecov commented 1 month ago

@nikosatwork ,

I don'think the settings system that well, but is IS_ENTERPRISE set in the environment anywhere? What if you try adding it?

nikosatwork commented 1 month ago

I think setting guest_access: true fixed it, but I don't understand the logic

drazisil-codecov commented 1 month ago

I think setting guest_access: true fixed it, but I don't understand the logic

This is the feature that was created for a company who had "public" projects on their private instance. It's what controls if you can see projects on Codecov when you are not signed in.

It was probably set to false by default, since that was the setting it needed to be before when the company was on hosted cloud.

(Being vague due to not sure if the company has legally given us permission to name them as a customer, and this is open comms)

drazisil-codecov commented 1 month ago

https://github.com/codecov/feedback/issues/523#issuecomment-2429227631

In 24.10.1 I get Anauthorized if just having 'Activation Status: False' and visiting a private repo in Codecov

Image

Which should be

Image

Am I missing something perhaps? guest_access: true by the way

Thanks!

eliatcodecov commented 3 weeks ago

Assigning to @RulaKhaled to investigate to see if we can determine if any underlying bug is present and fix it. Can coordinate with @drazisil-codecov as she has context on this issue.

RulaKhaled commented 2 days ago

@nikosatwork After upgrading to the latest version, is this still an issue?

Not the activation issue, but the login issue

spalmurray-codecov commented 2 days ago

This could be related to a change we made on API recently - cc @suejung-sentry

spalmurray-codecov commented 2 days ago

Oh wait that change (https://github.com/codecov/codecov-api/pull/910) hasn't been merged yet

nikosatwork commented 22 hours ago

Hi @RulaKhaled

@nikosatwork After upgrading to the latest version, is this still an issue?

Still the same issue on version 24.11.1 when guest_access: false