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

Error with Google Cloud Storage integration - 'Invalid Folder Name' #991

Open
maxibarrios0822 opened this issue Jan 7, 2025 · 8 comments

Comments

@maxibarrios0822
Copy link

Hello everyone,

I have already deployed the backend and frontend of LLM Graph Builder in GCP (and using Gemini), with each running in a separate Cloud Run instance. I have set the proper permissions for Service Accounts and Credentials (OAuth 2.0).

I have tested uploading files using local storage and Wikipedia, but I am encountering an issue when processing files using GCS.

The error message is "Invalid Folder Name," even though the GCS project ID, bucket, and folder name I am using are correctly set. I have tried using an empty 'Folder Name,' both with and without the '/' character, but the problem persists. I am using the latest main branch.

The logs of this error are not being displayed in Cloud Logging, including both backend and frontend logs.

We suspect that the issue might be located in frontend/src/components/DataSources/GCS/GCSModal.tsx or in the backend APIs it calls. However, we are unable to effectively debug the problem due to the lack of logs."

The rest of the framework works fine (using local storage, Gemini, Q&A chat window).

Thank you very much !

@kartikpersistent
Copy link
Collaborator

kartikpersistent commented Jan 8, 2025

Hi @maxibarrios0822 For GCS integration, you need to mention the Google OAuth client ID in the frontend env and GCS_FILE_CACHE value to True in the backend ENV

@maxibarrios0822
Copy link
Author

Hi @kartikpersistent , thanks for the answer. I deployed the backend with GCS_FILE_CACHE=True but still have the problem. The frontend was previously configured with the Google OAuth Cliend ID and is apparently working.

The problem persist (Invalid Folder Name), any idea ?

I am thinking if the configuration of the OAuth Credentials in GCP are ok or not (and the error is not being logged, so that's why it's failing but not showed). I am setting the OAuth credentials as: "Authorized JavaScript origins" -> myfrontendendpoint
"Authorized redirect URIs" -> myfrontendendpoint/extract

@jexp
Copy link
Contributor

jexp commented Jan 10, 2025

GCS_FILE_CACHE is unrelated, this is used to temporarily store files that have been uploaded from local.

We've not seen that folder error before for import from GCS, make sure your project has google drive permissions in general.

@maxibarrios0822
Copy link
Author

Hi @jexp , thanks for the answer !

Why Google Drive permissions? I want to use GCS not Google Drive.

@kartikpersistent
Copy link
Collaborator

Hi @maxibarrios0822 please run the gcloud application login command and check whether the GCS bucket that is accessed is public

@maxibarrios0822
Copy link
Author

Hi @kartikpersistent !

The GCS bucket must be necessary public? I want to keep it private because of sensitive/private information of my project. Is that possible ?

@kartikpersistent
Copy link
Collaborator

no I guess we process only public buckets as of my knowledge

@aashipandya
Copy link
Collaborator

Hi @maxibarrios0822 ,
If you are trying code on local, and want to upload a local file in GCS bucket then make sure that you have google default credentials set in your local via gcloud auth application-default set-quota-project <project-name> , GCS_FILE_CACHE backend env variable value is True and BUCKET_UPLOAD value in /llm-graph-builder/backend/src/shared/constants.py file is set to your bucket name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants