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

[Bug]: Unable to Access Login Page and Enter Credentials #2546

Closed
gorfist opened this issue May 6, 2024 · 6 comments
Closed

[Bug]: Unable to Access Login Page and Enter Credentials #2546

gorfist opened this issue May 6, 2024 · 6 comments
Labels
area: frontend Related to frontend functionality or under the /frontend directory bug Something isn't working

Comments

@gorfist
Copy link

gorfist commented May 6, 2024

What happened?

I am facing an issue with the login page when running the Quivr application locally using Docker Compose. Instead of seeing a functional login page where I can enter my username and password, I am being redirected to a page with the title "Talk to Quivr" and a message stating "Upload users have access to a free and limited demo of Quivr".
Here are the details of the problem:

quivr

I followed the install instructions exactly and when I access the application at http://localhost:3000, I expect to see a login page where I can enter my credentials.
However, I am automatically redirected to a page with the title "Talk to Quivr" and a message about limited demo access for upload users.
I am unable to find any input fields or buttons to enter my username and password on this page.
The console output shows some warnings and errors related to authentication, including 403 Forbidden errors for requests to endpoints like /user, /user/identity, and /user/credits.
There are also validation errors thrown by the UserIdentity model, indicating that the 'id' field is expected to be a valid UUID but is receiving None.

To reproduce this issue:

Clone the Quivr repository and navigate to the project directory.
Update the .env file with the necessary configuration values.
Run docker-compose up to start the application.
Access the application at http://localhost:3000.

I have already tried the following:

Verified that the frontend and backend containers are running without any startup errors.
Double-checked the .env file to ensure the required configuration values are set correctly, especially those related to authentication and Supabase.
Reviewed the console output for any relevant error messages or warnings.

I suspect that there might be an issue with the authentication flow or the routing logic in the frontend application. It seems that the application is not properly redirecting to the login page and is instead showing a different page altogether.
I would greatly appreciate any assistance in identifying the root cause of this issue and providing guidance on how to resolve it. I need to be able to access the login page and enter my credentials to proceed with using the Quivr application.
Please let me know if you require any additional information or if there are any specific files or code snippets that would be helpful for investigating this issue further.
Thank you for your support!

Relevant log output

backend-core  | INFO:     127.0.0.1:46698 - "GET /healthz HTTP/1.1" 200 OK
backend-core  | INFO:     127.0.0.1:47924 - "GET /healthz HTTP/1.1" 200 OK
backend-core  | INFO:     127.0.0.1:39582 - "GET /healthz HTTP/1.1" 200 OK
backend-core  | INFO:     172.18.0.1:45868 - "GET /user HTTP/1.1" 403 Forbidden
backend-core  | INFO:     172.18.0.1:45880 - "GET /user/identity HTTP/1.1" 403 Forbidden
backend-core  | INFO:     172.18.0.1:45880 - "GET /user HTTP/1.1" 403 Forbidden
backend-core  | INFO:     172.18.0.1:45868 - "GET /user/identity HTTP/1.1" 403 Forbidden
backend-core  | INFO:     172.18.0.1:45882 - "GET /user/credits HTTP/1.1" 403 Forbidden

Twitter / LinkedIn details

No response

@gorfist gorfist added the bug Something isn't working label May 6, 2024
@dosubot dosubot bot added the area: frontend Related to frontend functionality or under the /frontend directory label May 6, 2024
Copy link

dosubot bot commented May 6, 2024

The issue you're experiencing with the Quivr application seems to stem from a few key areas:

  1. Authentication Process: The 403 Forbidden errors indicate a problem with authentication. Ensure that the authentication tokens are correctly generated, sent with requests, and that the backend properly validates these tokens. This is crucial for accessing endpoints like /user, /user/identity, and /user/credits.

  2. Frontend Routing Logic: The unexpected redirection suggests there might be an issue with the frontend routing logic, particularly in how the application handles authentication states and redirections. Review the useLogin hook or equivalent logic in your application to ensure it correctly redirects users based on their authentication status.

  3. UserIdentity Model Validation: The errors related to the UserIdentity model expecting a valid UUID but receiving None indicate a problem in the creation or updating of UserIdentity instances. Verify that any operation involving UserIdentity instances includes a valid UUID for the id field.

  4. CORS Settings: Ensure your CORS settings are correctly configured to allow requests from the expected origins, especially in a local development environment. This includes setting allow_credentials=True, allowing all methods and headers.

By addressing these areas, you should be able to resolve the issue and access the login page as expected. If you continue to face difficulties, providing more specific error messages or details about your setup could help in diagnosing the problem further.

Details

Sources


About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

@powderblock
Copy link

Same here

@sxm1129
Copy link

sxm1129 commented May 8, 2024

Re-installed with docker, still the same. My environment is M1 mac

@HenrikBaltazar
Copy link

same issue with Fedora 39 and docker 26.0.1.
installled exactly as README says, @StanGirard is it lacking something besides README?

@StanGirard
Copy link
Collaborator

Last commit fixed it :/

@gorfist gorfist closed this as completed May 11, 2024
@wwjCMP
Copy link

wwjCMP commented May 12, 2024

Last commit fixed it :/

Does the latest version solve this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: frontend Related to frontend functionality or under the /frontend directory bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants