Flowise icon indicating copy to clipboard operation
Flowise copied to clipboard

Error: credentialsService.createCredential - Malformed UTF-8 data

Open saikumar-digi opened this issue 1 year ago • 5 comments

Sometimes when we click on edit createCredential that time I get 500 internal server error with Error: credentialsService.createCredential - Malformed UTF-8 data i connected Mysql Data base locally its working I'm using GCP DB there I'm getting this error

saikumar-digi avatar May 23 '24 07:05 saikumar-digi

Same i getting the error by using postgresql as the DB. Error : Status: 500 Error: credentialsService.createCredential - Malformed UTF-8 data

arthaadiadayamadani avatar Jul 04 '24 09:07 arthaadiadayamadani

Same here, I am also using GCP with PostgreSQL, in the credentials I get this error: Status: 500 Error: credentialsService.createCredential - Malformed UTF-8 data And if this error occurs in the credential, in Chatflow I get this error: Error: Error: Credentials could not be decrypted.

H1bertto avatar Aug 26 '24 19:08 H1bertto

same here, but for openai.

arakakihenrique avatar Sep 02 '24 21:09 arakakihenrique

I also have the same problem

sjoel99 avatar Sep 27 '24 12:09 sjoel99

Same issue here using version 2.0.1 image Can't find a root cause. I created two identical credentials on the same day and i'm getting error with one (after a few hours of creation) and success with the other

yuralves avatar Sep 27 '24 12:09 yuralves

Same problem here, creating an OpenAI credential with Supabase backend.

frankyw avatar Oct 11 '24 01:10 frankyw

same problem, PostgreSQL on cloud run. Any solution?

sandroelmo avatar Oct 26 '24 23:10 sandroelmo

bump - this is major - also breaking all our worfklows seemingly randomly.

As an update - I do have FLOWISE_SECRETKEY_OVERWRITE set on my container deployment. I also ran a local test doing the same, and had the same result.

The issue occurs when the container in question, which has ephemeral storage, is restarted, even with FLOWISE_SECRETKEY_OVERWRITE set.

It seems this env might not being respected correctly?

josh-at-straker avatar Nov 29 '24 08:11 josh-at-straker

Same here this is the error log Flowise version 2.2.4

Error: Malformed UTF-8 data
    at Object.stringify (/usr/local/lib/node_modules/flowise/node_modules/crypto-js/core.js:523:24)
    at WordArray.init.toString (/usr/local/lib/node_modules/flowise/node_modules/crypto-js/core.js:278:38)
    at decryptCredentialData (/usr/local/lib/node_modules/flowise/node_modules/flowise-components/dist/src/utils.js:532:41)
    at async getCredentialData (/usr/local/lib/node_modules/flowise/node_modules/flowise-components/dist/src/utils.js:558:41)
    at async OpenAIEmbedding_Embeddings.init (/usr/local/lib/node_modules/flowise/node_modules/flowise-components/dist/nodes/embeddings/OpenAIEmbedding/OpenAIEmbedding.js:83:32)
    at async buildFlow (/usr/local/lib/node_modules/flowise/dist/utils/index.js:442:36)
    at async utilBuildChatflow (/usr/local/lib/node_modules/flowise/dist/utils/buildChatflow.js:250:36)
    at async createAndStreamInternalPrediction (/usr/local/lib/node_modules/flowise/dist/controllers/internal-predictions/index.js:33:29)
2025-01-16 01:08:08 [ERROR]: Error: Credentials could not be decrypted.
Error: Error: Credentials could not be decrypted.
    at getCredentialData (/usr/local/lib/node_modules/flowise/node_modules/flowise-components/dist/src/utils.js:562:15)
    at async OpenAIEmbedding_Embeddings.init (/usr/local/lib/node_modules/flowise/node_modules/flowise-components/dist/nodes/embeddings/OpenAIEmbedding/OpenAIEmbedding.js:83:32)
    at async buildFlow (/usr/local/lib/node_modules/flowise/dist/utils/index.js:442:36)
    at async utilBuildChatflow (/usr/local/lib/node_modules/flowise/dist/utils/buildChatflow.js:250:36)
    at async createAndStreamInternalPrediction (/usr/local/lib/node_modules/flowise/dist/controllers/internal-predictions/index.js:33:29)
2025-01-16 01:08:08 [ERROR]: [server]: Error: Error: Error: Credentials could not be decrypted.
Error: Error: Error: Credentials could not be decrypted.
    at buildFlow (/usr/local/lib/node_modules/flowise/dist/utils/index.js:491:19)
    at async utilBuildChatflow (/usr/local/lib/node_modules/flowise/dist/utils/buildChatflow.js:250:36)
    at async createAndStreamInternalPrediction (/usr/local/lib/node_modules/flowise/dist/controllers/internal-predictions/index.js:33:29)

Image

riosje avatar Jan 16 '25 14:01 riosje

I found that I had to set SECRETKEY_PATH as well as FLOWISE_SECRETKEY_OVERWRITE to fix this, when deployed as a container. I set it as SECRETKEY_PATH=/root/.flowise as per the README here https://github.com/FlowiseAI/Flowise/tree/main/docker

mahgo avatar Feb 14 '25 06:02 mahgo

I found that I had to set SECRETKEY_PATH as well as FLOWISE_SECRETKEY_OVERWRITE to fix this, when deployed as a container. I set it as SECRETKEY_PATH=/root/.flowise as per the README here https://github.com/FlowiseAI/Flowise/tree/main/docker

OMG a week of my work to the trash!

ValenBcn avatar Feb 24 '25 13:02 ValenBcn

I found that I had to set SECRETKEY_PATH as well as FLOWISE_SECRETKEY_OVERWRITE to fix this, when deployed as a container. I set it as SECRETKEY_PATH=/root/.flowise as per the README here https://github.com/FlowiseAI/Flowise/tree/main/docker

But this is for local databases, not online mysql or postgres databases, right? Do those parameters have to be set as variables, or added in the docker file? Thanks!

SleepingSmel avatar Mar 13 '25 16:03 SleepingSmel

Error: Malformed UTF-8 data Q: what the fix for this

localLoopers avatar Jun 07 '25 22:06 localLoopers

Error: Datos UTF-8 mal formados P: cuál es la solución para esto

Tengo el mismo error

juancarlossch avatar Jul 02 '25 18:07 juancarlossch

Right now, the only option is to delete/re-create credentials every time. I think this can be solved in the implementation provide an option to store var env in the DB instead, well this should be encrypted though.

bitsnaps avatar Aug 28 '25 10:08 bitsnaps