Database Provider Invalid
Welcome!
- [X] Yes, I have searched for similar issues on GitHub and found none.
What did you do?
I'm trying to install Evolution v2 (ever using v1.8) but tried evertthing but always with the same error: evoltuion database provider invalid (even thoug I tried to install mongo together), what to do?
What did you expect?
To install v2, if anybody could send me a composer ready
What did you observe instead of what you expected?
Error
Screenshots/Videos
No response
Which version of the API are you using?
v 2.1.1
What is your environment?
Docker
Other environment specifications
No response
If applicable, paste the log output
No response
Additional Notes
No response
The Evo v2 works only with PostgreSQL or MySQL, use Redis for cache. Here a compose for this
version: "3.7"
services:
postgres-teste:
image: postgres
environment:
POSTGRES_PASSWORD: "postgres2024!"
evolution_v2_teste:
image: atendai/evolution-api:v2.1.0
ports:
- 8081:8080
environment:
- SERVER_URL=http://ip:8081
- DEL_INSTANCE=false
- PROVIDER_ENABLED=false
- PROVIDER_HOST=127.0.0.1
- PROVIDER_PORT=5656
- PROVIDER_PREFIX=evolution_v2
- DATABASE_ENABLED=true
- DATABASE_PROVIDER=postgresql
- DATABASE_CONNECTION_URI=postgresql://postgres:postgres2024!@postgres-teste:5432/postgres
- DATABASE_SAVE_DATA_INSTANCE=true
- DATABASE_SAVE_DATA_NEW_MESSAGE=false
- DATABASE_SAVE_MESSAGE_UPDATE=false
- DATABASE_SAVE_DATA_CONTACTS=false
- DATABASE_SAVE_DATA_CHATS=false
- DATABASE_SAVE_DATA_LABELS=false
- DATABASE_SAVE_DATA_HISTORIC=false
- DATABASE_CONNECTION_CLIENT_NAME=evolution_v2
- RABBITMQ_ENABLED=false
- RABBITMQ_URI=amqp://admin:admin@rabbitmq:5672/default
- RABBITMQ_EXCHANGE_NAME=evolution_v2
- RABBITMQ_GLOBAL_ENABLED=false
- RABBITMQ_EVENTS_APPLICATION_STARTUP=false
- RABBITMQ_EVENTS_INSTANCE_CREATE=false
- RABBITMQ_EVENTS_INSTANCE_DELETE=false
- RABBITMQ_EVENTS_QRCODE_UPDATED=false
- RABBITMQ_EVENTS_MESSAGES_SET=false
- RABBITMQ_EVENTS_MESSAGES_UPSERT=true
- RABBITMQ_EVENTS_MESSAGES_EDITED=false
- RABBITMQ_EVENTS_MESSAGES_UPDATE=false
- RABBITMQ_EVENTS_MESSAGES_DELETE=false
- RABBITMQ_EVENTS_SEND_MESSAGE=false
- RABBITMQ_EVENTS_CONTACTS_SET=false
- RABBITMQ_EVENTS_CONTACTS_UPSERT=false
- RABBITMQ_EVENTS_CONTACTS_UPDATE=false
- RABBITMQ_EVENTS_PRESENCE_UPDATE=false
- RABBITMQ_EVENTS_CHATS_SET=false
- RABBITMQ_EVENTS_CHATS_UPSERT=false
- RABBITMQ_EVENTS_CHATS_UPDATE=false
- RABBITMQ_EVENTS_CHATS_DELETE=false
- RABBITMQ_EVENTS_GROUPS_UPSERT=false
- RABBITMQ_EVENTS_GROUP_UPDATE=false
- RABBITMQ_EVENTS_GROUP_PARTICIPANTS_UPDATE=false
- RABBITMQ_EVENTS_CONNECTION_UPDATE=true
- RABBITMQ_EVENTS_CALL=false
- RABBITMQ_EVENTS_TYPEBOT_START=false
- RABBITMQ_EVENTS_TYPEBOT_CHANGE_STATUS=false
- SQS_ENABLED=false
- SQS_ACCESS_KEY_ID=
- SQS_SECRET_ACCESS_KEY=
- SQS_ACCOUNT_ID=
- SQS_REGION=
- WEBSOCKET_ENABLED=false
- WEBSOCKET_GLOBAL_EVENTS=false
- WA_BUSINESS_TOKEN_WEBHOOK=evolution
- WA_BUSINESS_URL=https://graph.facebook.com
- WA_BUSINESS_VERSION=v20.0
- WA_BUSINESS_LANGUAGE=pt_BR
- WEBHOOK_GLOBAL_URL=''
- WEBHOOK_GLOBAL_ENABLED=false
- WEBHOOK_GLOBAL_WEBHOOK_BY_EVENTS=false
- WEBHOOK_EVENTS_APPLICATION_STARTUP=false
- WEBHOOK_EVENTS_QRCODE_UPDATED=true
- WEBHOOK_EVENTS_MESSAGES_SET=true
- WEBHOOK_EVENTS_MESSAGES_UPSERT=true
- WEBHOOK_EVENTS_MESSAGES_EDITED=true
- WEBHOOK_EVENTS_MESSAGES_UPDATE=true
- WEBHOOK_EVENTS_MESSAGES_DELETE=true
- WEBHOOK_EVENTS_SEND_MESSAGE=true
- WEBHOOK_EVENTS_CONTACTS_SET=true
- WEBHOOK_EVENTS_CONTACTS_UPSERT=true
- WEBHOOK_EVENTS_CONTACTS_UPDATE=true
- WEBHOOK_EVENTS_PRESENCE_UPDATE=true
- WEBHOOK_EVENTS_CHATS_SET=true
- WEBHOOK_EVENTS_CHATS_UPSERT=true
- WEBHOOK_EVENTS_CHATS_UPDATE=true
- WEBHOOK_EVENTS_CHATS_DELETE=true
- WEBHOOK_EVENTS_GROUPS_UPSERT=true
- WEBHOOK_EVENTS_GROUPS_UPDATE=true
- WEBHOOK_EVENTS_GROUP_PARTICIPANTS_UPDATE=true
- WEBHOOK_EVENTS_CONNECTION_UPDATE=true
- WEBHOOK_EVENTS_LABELS_EDIT=true
- WEBHOOK_EVENTS_LABELS_ASSOCIATION=true
- WEBHOOK_EVENTS_CALL=true
- WEBHOOK_EVENTS_TYPEBOT_START=false
- WEBHOOK_EVENTS_TYPEBOT_CHANGE_STATUS=false
- WEBHOOK_EVENTS_ERRORS=false
- WEBHOOK_EVENTS_ERRORS_WEBHOOK=
- CONFIG_SESSION_PHONE_CLIENT=Whatsapp
- CONFIG_SESSION_PHONE_NAME=Chrome
- CONFIG_SESSION_PHONE_VERSION=2.3000.1015901307
- QRCODE_LIMIT=30
- OPENAI_ENABLED=false
- DIFY_ENABLED=false
- TYPEBOT_ENABLED=true
- TYPEBOT_API_VERSION=latest
- CHATWOOT_ENABLED=false
- CHATWOOT_MESSAGE_READ=true
- CHATWOOT_MESSAGE_DELETE=true
- CHATWOOT_IMPORT_DATABASE_CONNECTION_URI=postgresql://postgres:PASSWORD@postgres:5432/chatwoot?sslmode=disable
- CHATWOOT_IMPORT_PLACEHOLDER_MEDIA_MESSAGE=true
- CACHE_REDIS_ENABLED=true
- CACHE_REDIS_URI=redis://redis:6379/1
- CACHE_REDIS_PREFIX_KEY=evolution_v2_testes
- CACHE_REDIS_SAVE_INSTANCES=true
- CACHE_LOCAL_ENABLED=false
- S3_ENABLED=false
- S3_ACCESS_KEY=
- S3_SECRET_KEY=
- S3_BUCKET=evolution
- S3_PORT=443
- S3_ENDPOINT=files.site.com
- S3_USE_SSL=true
- AUTHENTICATION_API_KEY=918f5b02-766e-4107-9c96-9451f251cfde
- AUTHENTICATION_EXPOSE_IN_FETCH_INSTANCES=true
- LANGUAGE=en
I have the same problem. I was running version 1.8 with postgres, when I changed to 2.1.2 it did not find postgres
The name of my postgres installation is "Postgres" with a uppercase letter and my database is "evolutionapi"
I have the same problem. I was running version 1.8 with postgres, when I changed to 2.1.2 it did not find postgres
The name of my postgres installation is "Postgres" with a uppercase letter and my database is "evolutionapi"
Thanks so much Bráulio! I'll try it
I have the same problem. I was running version 1.8 with postgres, when I changed to 2.1.2 it did not find postgres
The name of my postgres installation is "Postgres" with a uppercase letter and my database is "evolutionapi"
Thanks so much Bráulio! I'll try it
Roberto, I wrote this post because i am with the same problem. Doesn't work.
For others with the same problem:
Stop using: atendai/evolution-api:latest Start using: atendai/evolution-api:v1.8.2
So your docker wont pull the latest version every update, and will keep it on LTS version
Ps: This will make ur api stop throwing the error Database provider invalid too, cz this version do not expect a DATABASE_PROVIDER on docker env
The error:
Database provider invalid is because u are not setting DATABASE_PROVIDER with the database name u want to use, like
DATABASE_PROVIDER=postgresql
For others with the same problem:
Stop using: atendai/evolution-api:latest Start using: atendai/evolution-api:v1.8.2
So your docker wont pull the latest version every update, and will keep it on LTS version
Ps: This will make ur api stop throwing the error Database provider invalid too, cz this version do not expect a
DATABASE_PROVIDERon docker env
I'm already using v1.8.2, but I'd like to use v2.2
The error: Database provider invalid is because u are not setting DATABASE_PROVIDER with the database name u want to use, like
DATABASE_PROVIDER=postgresql
Yes, I added the variable to my .env but it didn't work.
The error: Database provider invalid is because u are not setting DATABASE_PROVIDER with the database name u want to use, like
DATABASE_PROVIDER=postgresql
I also tried typing my database in the variable and it still gives me the same error.
The error: Database provider invalid is because u are not setting DATABASE_PROVIDER with the database name u want to use, like
DATABASE_PROVIDER=postgresqlI also tried typing my database in the variable and it still gives me the same error.
u gotta set DATABASE_PROVIDER as postgresql (not the name of ur database, use the name of the bd like mysql/postgresql, etc)
The base problem is: If ur evo api auto updated to a newer version, u prob gonna have to change a lot of variables, cause some change from version to version, like: Database provider is not required for version 1.8.2 but it is for 2.0+
The error: Database provider invalid is because u are not setting DATABASE_PROVIDER with the database name u want to use, like
DATABASE_PROVIDER=postgresqlYes, I added the variable to my .env but it didn't work.
The database name is postgresql, not postgre I supose
For others with the same problem: Stop using: atendai/evolution-api:latest Start using: atendai/evolution-api:v1.8.2 So your docker wont pull the latest version every update, and will keep it on LTS version Ps: This will make ur api stop throwing the error Database provider invalid too, cz this version do not expect a
DATABASE_PROVIDERon docker envI'm already using v1.8.2, but I'd like to use v2.2
so u gotta change some stuff in ur .env, I kinda dont know the correct variables for v2+ But I know that if u set ur database provider as postgresql it should work
Check if ur docker img is really set to 1.8,2 or to latest:
This is what my docker image is set on my easypanel:
And using this docker image, my .env is setted like this for the DATABASE conf on .env:
I didn't update, I installed version 2 directly. I typed "postgresql" and it didn't work. I ended up giving up. lol
Aqui obtive o mesmo problemas com 2.2.0 e latest, resolvido fazendo downgrade para 1.8.2.
Aqui obtive o mesmo problemas com 2.2.0 e latest, resolvido fazendo downgrade para 1.8.2.
Boa! Foi o que eu disse pro pessoal ali, manter a versao 1.8.2 pois o env aparenta ser diferente. E garantir que a img do docker nao está como latest, pois se estiver ela irá dar pull da mais nova sempre que rodar novamente.
Acredito que os problemas que a maioria teve com database invalid é por questão de como subiram a aplicação, usando a imagem docker é tranquilamente facil de arrumar isso passando corretamente nas variaveis de ambiente. Ocorre que muitas pessoas acabam passando o URI de forma incorreta ou não mantendo o postgres e o evolution na mesma rede e isso pode trazer diversos problemas pra o evolution achar o banco de dados. A versão 1.8.2 utiliza nativamente o mongoDB. Logo se ao atualizar da 1.8.2 diretamente para a v2 irá ter um problema, pois a v2 aceita postgres ou mysql (dê preferencia ao postgres). Se mais alguém ainda está com esse problema, por favor informe aqui. Estarei disponível pra ajudar. No grupo do discord do evolution damos esse tipo de suporte
Acredito que os problemas que a maioria teve com database invalid é por questão de como subiram a aplicação, usando a imagem docker é tranquilamente facil de arrumar isso passando corretamente nas variaveis de ambiente. Ocorre que muitas pessoas acabam passando o URI de forma incorreta ou não mantendo o postgres e o evolution na mesma rede e isso pode trazer diversos problemas pra o evolution achar o banco de dados. A versão 1.8.2 utiliza nativamente o mongoDB. Logo se ao atualizar da 1.8.2 diretamente para a v2 irá ter um problema, pois a v2 aceita postgres ou mysql (dê preferencia ao postgres). Se mais alguém ainda está com esse problema, por favor informe aqui. Estarei disponível pra ajudar. No grupo do discord do evolution damos esse tipo de suporte
Exactly, my problem occurred due to a new version that no longer supports mongodb.
Acredito que os problemas que a maioria teve com database invalid é por questão de como subiram a aplicação, usando a imagem docker é tranquilamente facil de arrumar isso passando corretamente nas variaveis de ambiente. Ocorre que muitas pessoas acabam passando o URI de forma incorreta ou não mantendo o postgres e o evolution na mesma rede e isso pode trazer diversos problemas pra o evolution achar o banco de dados. A versão 1.8.2 utiliza nativamente o mongoDB. Logo se ao atualizar da 1.8.2 diretamente para a v2 irá ter um problema, pois a v2 aceita postgres ou mysql (dê preferencia ao postgres). Se mais alguém ainda está com esse problema, por favor informe aqui. Estarei disponível pra ajudar. No grupo do discord do evolution damos esse tipo de suporte
Eu nao consegui ainda....minha configuracao é a seguinte:
- Utilizo Unraid como servidor.
- Meus dockers estao na mesma rede.
- A configuracao do docker evolution é essa:
O arquivo .env da configuracao é esse:
` AUTHENTICATION_TYPE=apikey AUTHENTICATION_API_KEY=minha_senha AUTHENTICATION_EXPOSE_IN_FETCH_INSTANCES=true LANGUAGE=en SERVER_URL=https://evolutionapi.meu-site.com.br
CORS_ORIGIN=* CORS_METHODS=POST,GET,PUT,DELETE CORS_CREDENTIALS=true
LOG_LEVEL=ERROR,WARN,DEBUG,INFO,LOG,VERBOSE,DARK,WEBHOOKS LOG_COLOR=true LOG_BAILEYS=error
DEL_INSTANCE=false DEL_TEMP_INSTANCES=true
DATABASE_ENABLED=true DATABASE_PROVIDER=postgresql DATABASE_CONNECTION_URI=postgresql://meu-usuario:minha-senha@Postgres:5432/evolutionapi?schema=public DATABASE_CONNECTION_CLIENT_NAME=evolution_v2
DATABASE_SAVE_DATA_INSTANCE=true DATABASE_SAVE_DATA_NEW_MESSAGE=false DATABASE_SAVE_MESSAGE_UPDATE=false DATABASE_SAVE_DATA_CONTACTS=false DATABASE_SAVE_DATA_CHATS=false DATABASE_SAVE_DATA_LABELS=false DATABASE_SAVE_DATA_HISTORIC=false
WEBSOCKET_ENABLED=true WEBSOCKET_GLOBAL_EVENTS=true
CONFIG_SESSION_PHONE_CLIENT=EvolutionAPI CONFIG_SESSION_PHONE_NAME=Chrome
QRCODE_LIMIT=30 QRCODE_COLOR='#198754'
CACHE_REDIS_ENABLED=true CACHE_REDIS_URI=redis://Redis:6379 CACHE_REDIS_PREFIX_KEY=evolutionapi CACHE_REDIS_TTL=604800 CACHE_REDIS_SAVE_INSTANCES=false CACHE_LOCAL_ENABLED=false CACHE_LOCAL_TTL=604800 `
O erro apresentado é esse:
Same problem, but as you can see there is a extra whitespace on Provider Invalid. This happends because it could not detect the provider. So the DATABASE_PROVIDER is NULL. What I did is to pass on the docker compose all the explicit variables.
I had this problem because I use to use the .env file with the docker commmand enviroment: env-file=.env.
Can you guide me? I don't use a docker file, because I use Unraid, but you can set several variables in it as shown in the previous photos. What should I do?
Same problem, but as you can see there is a extra whitespace on Provider Invalid. This happends because it could not detect the provider. So the DATABASE_PROVIDER is NULL. What I did is to pass on the docker compose all the explicit variables.
I had this problem because I use to use the .env file with the docker commmand enviroment: env-file=.env.
I tested it manually as you said and it worked. But in Unraid I need to add the variables one by one, and there are many.
Do you know why it doesn't read the .env?
Alguem conseguiu resolver o problema ? Eu sei que o problema esta relacionado ao arquivo .env O docker nao esta conseguindo ler ele. Achei que era problema de permissao, mas nao funcionou. Alguem sabe resolver essa questao .env?
Has anyone managed to solve the problem? I know the issue is related to the .env file. Docker is not able to read it. I thought it was a permission issue, but it didn't work. Does anyone know how to resolve this .env issue?
Eu estava usando o fork para clonar o diretório, apenas fiz o downgrade para o 1.8.2 e funcionou! Exclui o container de novo, e copia todas as variaveis de ambiente do seu banco de dados, e coloca antes do deploy do evo. Qualquer coisa me grita aqui
Alguem conseguiu resolver o problema ? Eu sei que o problema esta relacionado ao arquivo .env O docker nao esta conseguindo ler ele. Achei que era problema de permissao, mas nao funcionou. Alguem sabe resolver essa questao .env?
Has anyone managed to solve the problem? I know the issue is related to the .env file. Docker is not able to read it. I thought it was a permission issue, but it didn't work. Does anyone know how to resolve this .env issue?
Eu estava usando o fork para clonar o diretório, apenas fiz o downgrade para o 1.8.2 e funcionou! Exclui o container de novo, e copia todas as variaveis de ambiente do seu banco de dados, e coloca antes do deploy do evo. Qualquer coisa me grita aqui
Alguem conseguiu resolver o problema ? Eu sei que o problema esta relacionado ao arquivo .env O docker nao esta conseguindo ler ele. Achei que era problema de permissao, mas nao funcionou. Alguem sabe resolver essa questao .env? Has anyone managed to solve the problem? I know the issue is related to the .env file. Docker is not able to read it. I thought it was a permission issue, but it didn't work. Does anyone know how to resolve this .env issue?
Eu não entendi quase nada kkkkk.
Você fez isso pra poder voltar pra versão anterior e ficar na versão anterior (v1), ou você fez isso pra poder atualizar novamente para a versão atual (v2).
Sobre excluir o contêiner eu entendi, mas não entendi sobre como copiar as variáveis de ambientes do banco de dados, já que não estou utilizando nenhum banco de dados ainda.
Como seria colocar antes do deploy?
Eu estava usando o fork para clonar o diretório, apenas fiz o downgrade para o 1.8.2 e funcionou! Exclui o container de novo, e copia todas as variaveis de ambiente do seu banco de dados, e coloca antes do deploy do evo. Qualquer coisa me grita aqui
Alguem conseguiu resolver o problema ? Eu sei que o problema esta relacionado ao arquivo .env O docker nao esta conseguindo ler ele. Achei que era problema de permissao, mas nao funcionou. Alguem sabe resolver essa questao .env? Has anyone managed to solve the problem? I know the issue is related to the .env file. Docker is not able to read it. I thought it was a permission issue, but it didn't work. Does anyone know how to resolve this .env issue?
Eu não entendi quase nada kkkkk.
Você fez isso pra poder voltar pra versão anterior e ficar na versão anterior (v1), ou você fez isso pra poder atualizar novamente para a versão atual (v2).
Sobre excluir o contêiner eu entendi, mas não entendi sobre como copiar as variáveis de ambientes do banco de dados, já que não estou utilizando nenhum banco de dados ainda.
Como seria colocar antes do deploy?
Tu vai ver que boa parte dos problemas você vai resolver não hospedando na sua maquina, estou usando o meu docker em uma vps, então ao invés de usar a versão mais atualizada fiz o docker baixar uma mais antiga (v1.8.4), e eu editei as variáveis de ambiente antes de pedir pro docker ler e instalar a aplicação. Se tu entrar no github da Evolution, tem uma pasta la dentro "Docker/swarm" tem um arquivo .yaml "evolution_api_v2.yaml", nele você edita as variaveis. Explicaram nesse vídeo https://www.youtube.com/watch?v=mE2ptYT0MPY
Eu estou o mesmo problema, no caso eu estou tentando atualizar a evolution pra v2.2.0. Atualmente eu uso uma versão muito antiga que é a 1.5.4 eu estou usando o mongoDB, mas conforme os comentários acima vocês comentaram que o mongoDB talvez não seja mais compatível com essa nova versão. Aí minha pergunta é a seguinte, se caso eu queira atualizar a minha evolution e mudar o banco pra postgresql eu vou perder todas as minhas instancias que estão conectadas? teria alguma outra solução pra isso caso eu não precise conectar todas essas instancias novamente? obs: tenho mais de 80 instancias conectadas atualmente. Se alguem puder tirar essa dúvida pra mim agradeço.
a ultima versão da v1 vai ser a 1.8.4, se por acaso ter alguma correção, será no mesma versão. Agora na v2 a mais recente é a 2.2.1, tudo que for antes disso não sofrerá alteração ou correção.
Usar as variáveis presentes nessa documentação: https://doc.evolution-api.com/v2/en/requirements/database#environment-variables-configuration
Resolveu o meu problema
Lembrando que se você estiver usando docker precisa chamar o container e não localhost
DATABASE_CONNECTION_URI='postgresql://POSTGRES_USER:&POSTGRES_PASSWORD@POSTGRES_CONTAINER_NAME:5432/POSTGRES_DB?schema=public'
Estou usando EvolutionApi V2.1.1
The name of my postgres installation is "Postgres" with a uppercase letter and my database is "evolutionapi"


