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] Credentials could not be decrypted #896

Closed
alissonryan opened this issue Sep 8, 2023 · 5 comments
Closed

[BUG] Credentials could not be decrypted #896

alissonryan opened this issue Sep 8, 2023 · 5 comments

Comments

@alissonryan
Copy link

alissonryan commented Sep 8, 2023

Describe the bug
Right after I updated the flowise image, this error started to occur.

I've tried everything, looked in the documentation too and nothing.
I deleted the encryption.key, created a new one, even deleted the docker image and also the Flowise folder and the same error continued.

I really don't know what else to do. Not even ChatGPT can help me anymore.

Docker compose logs

ubuntu@typebot-alisson:~/Flowise/docker$ sudo docker compose logs -f
docker-flowise-1 | 2023-09-08 19:36:14 [INFO]: Starting Flowise...
docker-flowise-1 | 2023-09-08 19:36:14 [INFO]: ⚡️ [server]: Flowise Server is listening at 3002
docker-flowise-1 | 2023-09-08 19:36:14 [INFO]: 📦 [server]: Data Source has been initialized!
docker-flowise-1 | 2023-09-08 19:36:27 [INFO]: ❌ DELETE /api/v1/chatmessage/ec17aa9c-8ed1-4d50-ba83-96a1021f8004
docker-flowise-1 | 2023-09-08 19:36:32 [INFO]: ⬆️ POST /api/v1/chatmessage/ec17aa9c-8ed1-4d50-ba83-96a1021f8004
docker-flowise-1 | 2023-09-08 19:36:32 [INFO]: ⬆️ POST /api/v1/internal-prediction/ec17aa9c-8ed1-4d50-ba83-96a1021f8004
docker-flowise-1 | SyntaxError: Unexpected end of JSON input
docker-flowise-1 | at JSON.parse ()
docker-flowise-1 | at decryptCredentialData (/usr/local/lib/node_modules/flowise/node_modules/flowise-components/dist/src/utils.js:440:21)
docker-flowise-1 | at async getCredentialData (/usr/local/lib/node_modules/flowise/node_modules/flowise-components/dist/src/utils.js:463:41)
docker-flowise-1 | at async OpenAIEmbedding_Embeddings.init (/usr/local/lib/node_modules/flowise/node_modules/flowise-components/dist/nodes/embeddings/OpenAIEmbedding/OpenAIEmbedding.js:57:32)
docker-flowise-1 | at async buildLangchain (/usr/local/lib/node_modules/flowise/dist/utils/index.js:221:50)
docker-flowise-1 | at async App.processPrediction (/usr/local/lib/node_modules/flowise/dist/index.js:765:40)
docker-flowise-1 | at async /usr/local/lib/node_modules/flowise/dist/index.js:558:13
docker-flowise-1 | 2023-09-08 19:36:32 [ERROR]: Error: Credentials could not be decrypted.
docker-flowise-1 | Error: Error: Credentials could not be decrypted.
docker-flowise-1 | at getCredentialData (/usr/local/lib/node_modules/flowise/node_modules/flowise-components/dist/src/utils.js:467:15)
docker-flowise-1 | at async OpenAIEmbedding_Embeddings.init (/usr/local/lib/node_modules/flowise/node_modules/flowise-components/dist/nodes/embeddings/OpenAIEmbedding/OpenAIEmbedding.js:57:32)
docker-flowise-1 | at async buildLangchain (/usr/local/lib/node_modules/flowise/dist/utils/index.js:221:50)
docker-flowise-1 | at async App.processPrediction (/usr/local/lib/node_modules/flowise/dist/index.js:765:40)
docker-flowise-1 | at async /usr/local/lib/node_modules/flowise/dist/index.js:558:13
docker-flowise-1 | 2023-09-08 19:36:32 [ERROR]: [server]: Error: Error: Error: Credentials could not be decrypted.
docker-flowise-1 | Error: Error: Error: Credentials could not be decrypted.
docker-flowise-1 | at buildLangchain (/usr/local/lib/node_modules/flowise/dist/utils/index.js:231:19)
docker-flowise-1 | at async App.processPrediction (/usr/local/lib/node_modules/flowise/dist/index.js:765:40)
docker-flowise-1 | at async /usr/local/lib/node_modules/flowise/dist/index.js:558:13

My .env Variable

DATABASE_PATH=/root/.flowise
APIKEY_PATH=/root/.flowise
SECRETKEY_PATH=/home/ubuntu/Flowise/docker/secrets/
LOG_PATH=/root/.flowise/logs

Setup

  • Installation: docker
  • Flowise Version 1.3.4
  • OS: Ubuntu 22.04 VM Oracle ARM
  • Browser: chrome
@HenryHengZJ
Copy link
Contributor

just confirming are you using the steps here for your docker setup? are you running locally or deployed on cloud?

@alissonryan
Copy link
Author

Yes, I followed this same tutorial in conjunction with the deployment via AWS, just changing some commands to run on the Oracle Cloud ARM VM.

I was already running flowise even before version 1.3.0 and running some applications with it. But after I updated to this latest version 1.3.4 it started giving this key error.

As I said, I followed all the tutorials, looked here in the repository for answers and spent a few hours in partnership with ChatGPT to help me solve it and I couldn't.

I tried to delete the docker image and also delete the folder, but when I reinstalled the files they were there as if I hadn't deleted them and so I was back in the same place.

A shame, because I was using flowise a lot and even selling applications to my clients.

@rkeshwani
Copy link
Contributor

rkeshwani commented Sep 9, 2023

I've seen these issues before but only saw the issue happening to the openai credentials. So to solve this I simply recreated them. After this I didn't see the issue again. Note: I was not running the docker version, just running locally.

@alissonryan
Copy link
Author

Update:

I created a new encryption.key, put the passphrase in the .env file and then deleted all the API keys that had balance and recreated new ones.

With that, it worked again!

@HenryHengZJ
Copy link
Contributor

Added #939 to allow users to specify their own encryption key, this should resolve all errors regarding the credential path

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

3 participants