-
Couldn't load subscription status.
- Fork 4.6k
Description
Bem-vido!
- Sim, pesquisei problemas semelhantes no GitHub e não encontrei nenhum.
O que você fez?
O que foi feito?
- Efetuei o build do ambiente utilizando o arquivo
docker-compose.yaml. - O build foi concluído com sucesso e todos os containers foram iniciados corretamente.
- Acessei a interface de gerenciamento pelo endereço http://localhost:8080/manager/.
- Ao tentar criar uma instância, recebi o seguinte erro HTTP na response:
"The columnwavoipTokendoes not exist in the current database."
Contexto
Este problema ocorreu em um ambiente configurado com os seguintes componentes:
- Banco de dados: MySQL (utilizando a imagem
percona/percona-server:8.0) com a base de dados nomeadaevolution. - Serviços adicionais: Redis e Evolution API (versão v2.2.3).
docker-compose.yaml
services:
mysql:
container_name: mysql
image: percona/percona-server:8.0
networks:
- evolution-net
restart: always
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=evolution
- TZ=America/Bahia
volumes:
- mysql_data:/var/lib/mysql
expose:
- "3306"
redis:
image: redis:latest
restart: always
networks:
- evolution-net
- default
container_name: redis
command: >
redis-server --port 6379 --appendonly yes
volumes:
- evolution_redis:/data
ports:
- "6379:6379"
evolution-api:
container_name: evolution_api
image: atendai/evolution-api:v2.2.3
restart: always
ports:
- "8080:8080"
volumes:
- evolution_instances:/evolution/instances
networks:
- evolution-net
env_file:
- .env
volumes:
mysql_data:
evolution_redis:
evolution_instances:
networks:
evolution-net:
name: evolution-net
driver: bridge.env
SERVER_TYPE=http
SERVER_PORT=8080
SERVER_URL=http://localhost:8080
DEL_INSTANCE=true
CORS_ORIGIN=*
CORS_METHODS=GET,POST,PUT,DELETE
CORS_CREDENTIALS=true
DATABASE_ENABLED=true
DATABASE_PROVIDER=mysql
DATABASE_CONNECTION_URI='mysql://root:root@mysql:3306/evolution?schema=public'
DATABASE_CONNECTION_CLIENT_NAME=evolution_exchange
DATABASE_SAVE_DATA_INSTANCE=true
DATABASE_SAVE_DATA_NEW_MESSAGE=true
DATABASE_SAVE_MESSAGE_UPDATE=true
DATABASE_SAVE_DATA_CONTACTS=true
DATABASE_SAVE_DATA_CHATS=true
DATABASE_SAVE_DATA_LABELS=true
DATABASE_SAVE_DATA_HISTORIC=true
DATABASE_SAVE_IS_ON_WHATSAPP=true
DATABASE_SAVE_IS_ON_WHATSAPP_DAYS=7
DATABASE_DELETE_MESSAGE=true
CONFIG_SESSION_PHONE_CLIENT=Evolution API
CONFIG_SESSION_PHONE_NAME=Chrome
WA_BUSINESS_TOKEN_WEBHOOK=evolution
WA_BUSINESS_URL=https://graph.facebook.com
WA_BUSINESS_VERSION=v20.0
WA_BUSINESS_LANGUAGE=en_US
WEBHOOK_GLOBAL_ENABLED=false
WEBHOOK_GLOBAL_URL=''
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=
PUSHER_ENABLED=false
PUSHER_GLOBAL_ENABLED=false
PUSHER_GLOBAL_APP_ID=
PUSHER_GLOBAL_KEY=
PUSHER_GLOBAL_SECRET=
PUSHER_GLOBAL_CLUSTER=
PUSHER_GLOBAL_USE_TLS=true
PUSHER_EVENTS_APPLICATION_STARTUP=true
PUSHER_EVENTS_QRCODE_UPDATED=true
PUSHER_EVENTS_MESSAGES_SET=true
PUSHER_EVENTS_MESSAGES_UPSERT=true
PUSHER_EVENTS_MESSAGES_EDITED=true
PUSHER_EVENTS_MESSAGES_UPDATE=true
PUSHER_EVENTS_MESSAGES_DELETE=true
PUSHER_EVENTS_SEND_MESSAGE=true
PUSHER_EVENTS_CONTACTS_SET=true
PUSHER_EVENTS_CONTACTS_UPSERT=true
PUSHER_EVENTS_CONTACTS_UPDATE=true
PUSHER_EVENTS_PRESENCE_UPDATE=true
PUSHER_EVENTS_CHATS_SET=true
PUSHER_EVENTS_CHATS_UPSERT=true
PUSHER_EVENTS_CHATS_UPDATE=true
PUSHER_EVENTS_CHATS_DELETE=true
PUSHER_EVENTS_GROUPS_UPSERT=true
PUSHER_EVENTS_GROUPS_UPDATE=true
PUSHER_EVENTS_GROUP_PARTICIPANTS_UPDATE=true
PUSHER_EVENTS_CONNECTION_UPDATE=true
PUSHER_EVENTS_LABELS_EDIT=true
PUSHER_EVENTS_LABELS_ASSOCIATION=true
PUSHER_EVENTS_CALL=true
PUSHER_EVENTS_TYPEBOT_START=false
PUSHER_EVENTS_TYPEBOT_CHANGE_STATUS=false
CACHE_REDIS_ENABLED=true
CACHE_REDIS_URI=redis://redis:6379/6
CACHE_REDIS_PREFIX_KEY=evolution
CACHE_REDIS_SAVE_INSTANCES=false
CACHE_LOCAL_ENABLED=false
CACHE_REDIS_TTL=604800
AUTHENTICATION_API_KEY=429683C4C977415CAAFCCE10F7D57E11
AUTHENTICATION_EXPOSE_IN_FETCH_INSTANCES=true
LANGUAGE=enPossível Causa
O erro "The column wavoipToken does not exist in the current database" sugere que o sistema está tentando acessar a coluna wavoipToken que não foi criada no esquema atual da base de dados evolution. As possíveis causas podem incluir:
- Migrações pendentes: Pode ser que uma migração que adiciona a coluna
wavoipTokennão tenha sido executada. - Script de atualização incompleto: O script responsável pela alteração da estrutura do banco de dados talvez não inclua a criação desta coluna.
- Diferença entre ambientes: O ambiente de desenvolvimento pode estar desatualizado em relação ao ambiente de produção, ou vice-versa.
O que você esperava?
Eu esperava que a instância fosse criada com sucesso, sem que ocorresse nenhum erro. Em outras palavras, que a coluna wavoipToken já existisse no banco de dados, permitindo assim o processo de criação da instância de forma correta e sem interrupções.
O que vc observou ao invés do que esperava?
Em vez de encontrar a coluna wavoipToken no banco de dados, observei que ela não foi criada, o que ocasionou a falha na criação da instância.
Capturas de Tela/Vídeos
No response
Qual versão da API você está usando?
2.2.3
Qual é o seu ambiente?
Mac
Outras expecificações do ambiente
No response
Se aplicável, cole a saída do log
"
Invalid S.integrationSession.update() invocation in
/evolution/dist/main.js:161:10171
158 ));let g="";d.bold&&(g+="*"),d.italic&&(g+="_"),d.underline&&(g+="~");let m=${g}${u}${g.split("").reverse().join("")};return d.url&&(m=d.children[0]?.text?[${m}]
159 (${d.url}):${d.url}),m}async function l(d,u,g,m,h,y,w,S){for(let E of m){if(E.type==="text"){let b="";for(let C of E.content.richText){for(let N of C.children)b+=w(N);b+=
160 }if(b=b.replace(/\*\*/g,"").replace(/__/,"").replace(/~~/,"").replace(/\n$/,""),b=b.replace(/\n$/,""),b.includes("[list]")){let C={number:s.split("@")[0],title:"",description:"",buttonText:"",footerText:"",sections:[]},N=b.match(/\[title\]([\s\S]*?)(?=\[description\])/),_=b.match(/\[description\]([\s\S]*?)(?=\[buttonText\])/),x=b.match(/\[buttonText\]([\s\S]*?)(?=\[footerText\])/),L=b.match(/\[footerText\]([\s\S]*?)(?=\[menu\])/);N&&(C.title=N[1].trim()),_&&(C.description=_[1].trim()),x&&(C.buttonText=x[1].trim()),L&&(C.footerText=L[1].trim());let W=b.match(/\[menu\]([\s\S]*?)\[\/menu\]/)?.[1];if(W){let G=W.match(/\[section\]([\s\S]*?)(?=\[section\]|\[\/section\]|\[\/menu\])/g);G&&G.forEach(K=>{let V=K.match(/title: (.*?)(?:\n|$)/)?.[1]?.trim(),$=K.match(/\[row\]([\s\S]*?)(?=\[row\]|\[\/row\]|\[\/section\]|\[\/menu\])/g),X={title:V,rows:$?.map(Cn=>({title:Cn.match(/title: (.*?)(?:\n|$)/)?.[1]?.trim(),description:Cn.match(/description: (.*?)(?:\n|$)/)?.[1]?.trim(),rowId:Cn.match(/rowId: (.*?)(?:\n|$)/)?.[1]?.trim()}))||[]};C.sections.push(X)})}await d.listMessage(C)}else if(b.includes("[buttons]")){let C={number:s.split("@")[0],thumbnailUrl:void 0,title:"",description:"",footer:"",buttons:[]},N=b.match(/\[thumbnailUrl\]([\s\S]*?)(?=\[title\])/),_=b.match(/\[title\]([\s\S]*?)(?=\[description\])/),x=b.match(/\[description\]([\s\S]*?)(?=\[footer\])/),L=b.match(/\[footer\]([\s\S]*?)(?=\[(?:reply|pix|copy|call|url))/);_&&(C.title=_[1].trim()),N&&(C.thumbnailUrl=N[1].trim()),x&&(C.description=x[1].trim()),L&&(C.footer=L[1].trim());let W={reply:/\[reply\]([\s\S]*?)(?=\[(?:reply|pix|copy|call|url)|$)/g,pix:/\[pix\]([\s\S]*?)(?=\[(?:reply|pix|copy|call|url)|$)/g,copy:/\[copy\]([\s\S]*?)(?=\[(?:reply|pix|copy|call|url)|$)/g,call:/\[call\]([\s\S]*?)(?=\[(?:reply|pix|copy|call|url)|$)/g,url:/\[url\]([\s\S]*?)(?=\[(?:reply|pix|copy|call|url)|$)/g};for(let[G,K]of Object.entries(W)){let V;for(;(V=K.exec(b))!==null;){let $=V[1].trim(),X={type:G};switch(G){case"pix":X.currency=$.match(/currency: (.*?)(?:\n|$)/)?.[1]?.trim(),X.name=$.match(/name: (.*?)(?:\n|$)/)?.[1]?.trim(),X.keyType=$.match(/keyType: (.*?)(?:\n|$)/)?.[1]?.trim(),X.key=$.match(/key: (.*?)(?:\n|$)/)?.[1]?.trim();break;case"reply":X.displayText=$.match(/displayText: (.*?)(?:\n|$)/)?.[1]?.trim(),X.id=$.match(/id: (.*?)(?:\n|$)/)?.[1]?.trim();break;case"copy":X.displayText=$.match(/displayText: (.*?)(?:\n|$)/)?.[1]?.trim(),X.copyCode=$.match(/copyCode: (.*?)(?:\n|$)/)?.[1]?.trim();break;case"call":X.displayText=$.match(/displayText: (.*?)(?:\n|$)/)?.[1]?.trim(),X.phoneNumber=$.match(/phone: (.*?)(?:\n|$)/)?.[1]?.trim();break;case"url":X.displayText=$.match(/displayText: (.*?)(?:\n|$)/)?.[1]?.trim(),X.url=$.match(/url: (.*?)(?:\n|$)/)?.[1]?.trim();break}Object.keys(X).length>1&&C.buttons.push(X)}}await d.buttonMessage(C)}else await d.textMessage({number:s.split("@")[0],delay:g?.delayMessage||1e3,text:b},!1);H("/message/sendText")}E.type==="image"&&(await d.mediaMessage({number:s.split("@")[0],delay:g?.delayMessage||1e3,mediatype:"image",media:E.content.url},null,!1),H("/message/sendMedia")),E.type==="video"&&(await d.mediaMessage({number:s.split("@")[0],delay:g?.delayMessage||1e3,mediatype:"video",media:E.content.url},null,!1),H("/message/sendMedia")),E.type==="audio"&&(await d.audioWhatsapp({number:s.split("@")[0],delay:g?.delayMessage||1e3,encoding:!0,audio:E.content.url},!1),H("/message/sendWhatsAppAudio"));let I=a(y,E.id);I&&await new Promise(b=>setTimeout(b,I*1e3))}if(console.log("input",h),h){if(h.type==="choice input"){let E="",I=h.items;for(let b of I)E+=\u25B6\uFE0F ${b.content}
→ 161 ;if(E=E.replace(/\n$/,""),E.includes("[list]")){let b={number:s.split("@")[0],title:"",description:"",buttonText:"",footerText:"",sections:[]},C=E.match(/\[title\]([\s\S]*?)(?=\[description\])/),N=E.match(/\[description\]([\s\S]*?)(?=\[buttonText\])/),_=E.match(/\[buttonText\]([\s\S]*?)(?=\[footerText\])/),x=E.match(/\[footerText\]([\s\S]*?)(?=\[menu\])/);C&&(b.title=C[1].trim()),N&&(b.description=N[1].trim()),_&&(b.buttonText=_[1].trim()),x&&(b.footerText=x[1].trim());let L=E.match(/\[menu\]([\s\S]*?)\[\/menu\]/)?.[1];if(L){let W=L.match(/\[section\]([\s\S]*?)(?=\[section\]|\[\/section\]|\[\/menu\])/g);W&&W.forEach(G=>{let K=G.match(/title: (.*?)(?:\n|$)/)?.[1]?.trim(),V=G.match(/\[row\]([\s\S]*?)(?=\[row\]|\[\/row\]|\[\/section\]|\[\/menu\])/g),$={title:K,rows:V?.map(X=>({title:X.match(/title: (.*?)(?:\n|$)/)?.[1]?.trim(),description:X.match(/description: (.*?)(?:\n|$)/)?.[1]?.trim(),rowId:X.match(/rowId: (.*?)(?:\n|$)/)?.[1]?.trim()}))||[]};b.sections.push($)})}await d.listMessage(b)}else if(E.includes("[buttons]")){let b={number:s.split("@")[0],thumbnailUrl:void 0,title:"",description:"",footer:"",buttons:[]},C=E.match(/\[thumbnailUrl\]([\s\S]*?)(?=\[title\])/),N=E.match(/\[title\]([\s\S]*?)(?=\[description\])/),_=E.match(/\[description\]([\s\S]*?)(?=\[footer\])/),x=E.match(/\[footer\]([\s\S]*?)(?=\[(?:reply|pix|copy|call|url))/);N&&(b.title=N[1].trim()),C&&(b.thumbnailUrl=C[1].trim()),_&&(b.description=_[1].trim()),x&&(b.footer=x[1].trim());let L={reply:/\[reply\]([\s\S]*?)(?=\[(?:reply|pix|copy|call|url)|$)/g,pix:/\[pix\]([\s\S]*?)(?=\[(?:reply|pix|copy|call|url)|$)/g,copy:/\[copy\]([\s\S]*?)(?=\[(?:reply|pix|copy|call|url)|$)/g,call:/\[call\]([\s\S]*?)(?=\[(?:reply|pix|copy|call|url)|$)/g,url:/\[url\]([\s\S]*?)(?=\[(?:reply|pix|copy|call|url)|$)/g};for(let[W,G]of Object.entries(L)){let K;for(;(K=G.exec(E))!==null;){let V=K[1].trim(),$={type:W};switch(W){case"pix":$.currency=V.match(/currency: (.*?)(?:\n|$)/)?.[1]?.trim(),$.name=V.match(/name: (.*?)(?:\n|$)/)?.[1]?.trim(),$.keyType=V.match(/keyType: (.*?)(?:\n|$)/)?.[1]?.trim(),$.key=V.match(/key: (.*?)(?:\n|$)/)?.[1]?.trim();break;case"reply":$.displayText=V.match(/displayText: (.*?)(?:\n|$)/)?.[1]?.trim(),$.id=V.match(/id: (.*?)(?:\n|$)/)?.[1]?.trim();break;case"copy":$.displayText=V.match(/displayText: (.*?)(?:\n|$)/)?.[1]?.trim(),$.copyCode=V.match(/copyCode: (.*?)(?:\n|$)/)?.[1]?.trim();break;case"call":$.displayText=V.match(/displayText: (.*?)(?:\n|$)/)?.[1]?.trim(),$.phoneNumber=V.match(/phone: (.*?)(?:\n|$)/)?.[1]?.trim();break;case"url":$.displayText=V.match(/displayText: (.*?)(?:\n|$)/)?.[1]?.trim(),$.url=V.match(/url: (.*?)(?:\n|$)/)?.[1]?.trim();break}Object.keys($).length>1&&b.buttons.push($)}}await d.buttonMessage(b)}else await d.textMessage({number:s.split("@")[0],delay:g?.delayMessage||1e3,text:E},!1);H("/message/sendText")}await S.integrationSession.update( The column wavoipToken` does not exist in the current database."
Notas Adicionais
Acredito que falte a migration sql assim como há uma no prisma/postgresql-migrations/20250116001415_add_wavoip_token_to_settings_table/migration.sql do repositório.