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]: Can't add new Brain -- UI doesn't display brain choice #2322

Closed
Croccodoyle opened this issue Mar 8, 2024 · 4 comments
Closed

[Bug]: Can't add new Brain -- UI doesn't display brain choice #2322

Croccodoyle opened this issue Mar 8, 2024 · 4 comments
Labels
area: frontend Related to frontend functionality or under the /frontend directory bug Something isn't working Stale

Comments

@Croccodoyle
Copy link

What happened?

No choice of brain available on Chrome Version 122.0.6261.112 (Official Build) (arm64) or Safari Version 17.3.1 (19617.2.4.11.12).... Running on Sonoma 14.3.1
Screenshot 2024-03-08 at 18 01 37

Relevant log output

i18next: languageChanged en
4884-fc0a6fc783565dbd.js:1 i18next: initialized Object
:5050/user:1 
        
        
       Failed to load resource: the server responded with a status of 403 (Forbidden)
_vercel/insights/script.js:1 
        
        
       Failed to load resource: the server responded with a status of 404 (Not Found)
:3000/:1 Refused to execute script from 'http://localhost:3000/_vercel/insights/script.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
:5050/user:1 
        
        
       Failed to load resource: the server responded with a status of 403 (Forbidden)
:5050/user:1 
        
        
       Failed to load resource: the server responded with a status of 403 (Forbidden)
:5050/user:1 
        
        
       Failed to load resource: the server responded with a status of 403 (Forbidden)
1250-f2578602441d42c3.js:1 No analytics found

Twitter / LinkedIn details

No response

@Croccodoyle Croccodoyle added the bug Something isn't working label Mar 8, 2024
Copy link

dosubot bot commented Mar 8, 2024

Hey there, @Croccodoyle! Great to see you diving into the depths of quivr again. What's cooking in your Brain kitchen today? 🧠🍳

Based on the error logs you've provided, it seems like there might be an issue with the server's authorization process. The 403 (Forbidden) status code typically indicates that the server understands the request but refuses to authorize it. This could be due to a few reasons:

  1. Authentication/Authorization Issue: The user account used for login might not have the correct roles or permissions, or the login process did not complete successfully. This could be due to changes in the authentication flow or issues with session management.

  2. Frontend-Backend Contract Violation: If there have been recent changes to the backend API that the frontend relies on (for example, changes in the API endpoint, request payload, or required headers for the "add brain" functionality), and the frontend has not been updated accordingly, this could lead to a 403 response.

  3. CORS Policy: While less likely to directly cause a 403 error, if there are Cross-Origin Resource Sharing (CORS) policy misconfigurations, it could potentially lead to issues with requests being blocked or failing in unexpected ways.

  4. Browser-Specific Issues: Since you mentioned this issue occurs on both Chrome and Safari, it's less likely to be a browser-specific issue and more likely related to the application's code or server configuration.

Given the context and the nature of the error, the first step should be to verify the user's permissions and ensure that the login process is completing successfully with the correct session information. Following that, reviewing any recent changes to the backend API and ensuring the frontend is aligned with those changes would be crucial. Lastly, checking the browser console for additional errors and reviewing the network requests for failed requests can provide more insight into the issue.

As for the expected behavior of the "Add New Brain" functionality, it should present the user with a form to input a "Brain name" and "Description", set the visibility of the brain to either "Private" or "Public", and provide confirmation messages upon successful creation or error during the creation process. It also allows for the configuration of brain parameters, inviting new users to the brain, and managing the brain's visibility status. This is based on the localization keys and values provided in the frontend/public/locales/en/brain.json file.

I hope this helps in identifying the potential causes of the issue. If you need further assistance, please provide more details about the steps you took before encountering the error, any changes made to the codebase or server configuration, and any additional error messages or logs.

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.

If you want to continue the conversation, start your reply with @dosu-bot.

@dosubot dosubot bot added the area: frontend Related to frontend functionality or under the /frontend directory label Mar 8, 2024
@stef-bloom
Copy link

Sorry, had posted this in a dup (#2332)

I ran into the same thing: no options to choose from when trying to create a new brain, despite running migrations.
I was able to fix it by editing some db tables that were missing entries.
I may have forgotte a step ( I threw a lot of spaghetti at the wall), but this might point you in the right direction.

As a side note, I occasionally run into issues with the scripts, where supabase throws an error "[bla bla] script is too long [bla bla]" or it throws some other error that stops execution mid-script. I think that's what happened here for me. Something died mid-script before getting ot the good parts.

As a sanity check, I created a brand new db with all the scripts (and ran the too long init script in two halves).
When I compared the two dbs, the (older) one, which was not giving me brain options was missing entries in these tables:

integrations (empty, no rows)
notifications (empty, no rows)
onboardings (-> make sure there is a record for the user/tester uuid that is logged in)
To fix the issue try the following:

in supabase SQL Editor, RUN (from the seed file):
-- the "id" vals here are not related to any uuids, so they should work as is
-- ensure that the field "tags" in "integrations" is not NULL (see screenshot); if it's not an empty set (brackets), you'll get an application error
INSERT INTO "public"."integrations" ("created_at", "integration_name", "integration_logo_url", "connection_settings", "id", "description", "integration_type", "max_files", "information", "tags", "allow_model_change", "integration_display_name") VALUES
('2024-03-06 21:21:07.251232+00', 'doc', 'https://quivr-cms.s3.eu-west-3.amazonaws.com/225911_200_46634039e4.png', NULL, 'b37a2275-61b3-460b-b4ab-94dfdf3642fb', 'Default description', 'custom', 5000, NULL, '{}', true, 'Brain');

INSERT INTO "public"."notifications" ("id", "datetime", "chat_id", "message", "action", "status") VALUES
('e6755dde-932e-48d1-a949-4a3357ead3ca', '2024-02-21 02:17:47.998437', 'ec676cad-3c44-4da0-8090-dca235627ebb', NULL, 'UPLOAD', 'Pending');

Screenshot 2024-03-17 085919

@Th0h0
Copy link

Th0h0 commented Jun 14, 2024

@dosu-bot @dosu Hey, can you see that message?

Copy link
Contributor

Thanks for your contributions, we'll be closing this issue as it has gone stale. Feel free to reopen if you'd like to continue the discussion.

@github-actions github-actions bot added the Stale label Sep 12, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 17, 2024
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 Stale
Projects
None yet
Development

No branches or pull requests

3 participants