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] Pinecone API-key is incorrectly cached. #2235

Closed
mcpaddy opened this issue Apr 22, 2024 · 6 comments · Fixed by #2681
Closed

[BUG] Pinecone API-key is incorrectly cached. #2235

mcpaddy opened this issue Apr 22, 2024 · 6 comments · Fixed by #2681
Labels
bug Something isn't working in-work Issue in work

Comments

@mcpaddy
Copy link

mcpaddy commented Apr 22, 2024

Problem

When switching between Pinecone Indexes in different projects a 404 error is returned by Pinecone. Even thou the API key has been updated. It seems that Flowise might be caching the API key and not using the new one. This does not always happen; I can reproduce it about 40% of the time in my environment.

I have another user who saw it every time in their environment, which was on Render. The only way around it was to redeploy.

We know the issue is inside Flowise as we tested the API keys and indexes using curl.

We also set the key as an invalid value in Flowise, and the error message should be 401; it was not.

To Reproduce
Please use the Flow I have attached

  1. Create two projects in Pinecone
  2. Create an index in each project
  3. Set the Pinecone Connection Credential and Pinecone Index to be the details for the first project
  4. Click save
  5. Run the Flow, it runs successfully
  6. Update the Pinecone Connection Credential and Pinecone Index to be from the second project
  7. Click save
  8. Run the flow. It fails with a 404 error

Expected Behaviour

When switching to a different Index and Connect Credential, it uses them and not the old one.

Flow
new Chatflow.json

The CSV file for the Flow:

"Question","Answer"
"Is Pinecone the best database?","Yes, it's the best."

Setup

  • Installation: npx flowise start
  • Flowise Version: 1.6.4
  • OS: MacOS 14.4.1
  • Browser: Chrome 124.0.6367.61

Additional context
I work for Pinecone, please let me know if you need more details.

@HenryHengZJ
Copy link
Contributor

@mcpaddy hey sorry for late reply. I found a strange fix by adding a describeIndex, can you try this PR branch - #2369 and see if that works?

@HenryHengZJ
Copy link
Contributor

I was able to replicate from the steps, 404 when we change the credentials, but when I do console log the api key, I can see the new updated API key. And strangely by adding a describeIndex it works, so if you can verify that'd be great

@HenryHengZJ HenryHengZJ added bug Something isn't working in-work Issue in work labels May 8, 2024
@mahzy
Copy link

mahzy commented May 16, 2024

I have the same issue on my end

@mcpaddy
Copy link
Author

mcpaddy commented May 30, 2024

Hello all,

I have reproduced this outside of Flowise, the issue is with our Node.js drive. I will work with the team to get this fixed and will let you know when it's in a release.

@fulgorastral
Copy link

fulgorastral commented Jun 18, 2024

I have the same problem here. @HenryHengZJ how can this "fix by adding a describeIndex" be done? Is it possible to be done without knowning code?

Edit: I redeployed and it is fixed now

@HenryHengZJ HenryHengZJ linked a pull request Jun 19, 2024 that will close this issue
@HenryHengZJ
Copy link
Contributor

@mcpaddy verified that 2.2.2 now works. Updated on this PR - #2681, also verified its not working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working in-work Issue in work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants