Skip to content

Mensagens não são enviadas pela API (this.cache.delete()) #1852

@austriansnow

Description

@austriansnow

Bem-vido!

  • Sim, pesquisei problemas semelhantes no GitHub e não encontrei nenhum.

O que você fez?

Olá, boa tarde. Estou rodando a Evolution API v.2.3.1 em um Docker LXC no Proxmox, em um servidor hospedado na própria casa com cloudflared tunnel para acesso externo. Já tinha testado esse mesmo SETUP em uma antiga empresa e tinha dado certo, entretanto, dessa vez quando fui enviar uma mensagem apareceu um log gigantesco que consta nos abaixos dessa mensagem, com o problema de this.cache.delete(). A mensagem não envia de forma nenhuma.

Tentei refazer o banco de dados, subir a aplicação novamente, outras versões - mais antigas e mais novas -, outras imagens do Chatwoot e nada...

Tentei ver nos outros ISSUES aqui, e percebi que um outro rapaz teve um problema semelhante. Entretanto, parece que mesmo com o Pull ainda há essa incompatibilidade.

O que você esperava?

Esperava que a mensagem fosse enviada para o contato do meu whatsapp.

O que vc observou ao invés do que esperava?

Um gigantesco log de erro, com primeira linha sendo: this.cache.deleted.

Capturas de Tela/Vídeos

Image

Qual versão da API você está usando?

Evolution API v.2.3.1

Qual é o seu ambiente?

Docker

Outras expecificações do ambiente

  • Software:
  • Proxmox, Cloudflared tunnel (Zero Trust)
  • Hardware:
  • Memória: 8gb de ram DDR3
  • Processador: Intel i3 de 4 geração.
  • Armazenamento: 500GB SSD;
  • Placa de vídeo: Intel UHD Graphics

Se aplicável, cole a saída do log

[Evolution API] v2.3.1 159 - Mon Aug 18 2025 13:54:11 VERBOSE [ChatwootService] [string] onSendMessageError {"name":"PrismaClientValidationError","clientVersion":"6.11.1"}
[Evolution API] v2.3.1 159 - Mon Aug 18 2025 13:54:11 ERROR [ChatwootService] [object]
PrismaClientValidationError:
Invalid this.cache.delete() invocation in
/evolution/dist/main.js:227:7625

224 ),i.url&&(n+=URL:${i.url}
225 ),i.wuid||(i.wuid=J(i.phoneNumber)),n+=item1.TEL;waid=${i.wuid}:${i.phoneNumber}
226 item1.X-ABLabel:Celular
→ 227 END:VCARD,n};return e.contact.length===1?t.contact={displayName:e.contact[0].fullName,vcard:o(e.contact[0])}:t.contactsArrayMessage={displayName:${e.contact.length} contacts,contacts:e.contact.map(i=>({displayName:i.fullName,vcard:o(i)}))},await this.sendMessageWithTyping(e.number,{contacts:e.contact.map(i=>({name:{formatted_name:i.fullName,first_name:i.fullName},phones:[{phone:i.phoneNumber}],urls:[{url:i.url}],emails:[{email:i.email}],org:{company:i.organization}})),message:t},{delay:e?.delay,presence:"composing",quoted:e?.quoted,linkPreview:e?.linkPreview,mentionsEveryOne:e?.mentionsEveryOne,mentioned:e?.mentioned})}async reactionMessage(e){return await this.sendMessageWithTyping(e.key.remoteJid,{reactionMessage:{key:e.key,text:e.reaction}})}async getBase64FromMediaMessage(e){try{let t=e.message,o=t.messageType.includes("Message")?t.messageType:t.messageType+"Message",i=t.message[o];return{mediaType:t.messageType,fileName:i?.fileName,caption:i?.caption,size:{fileLength:i?.fileLength,height:i?.fileLength,width:i?.width},mimetype:i?.mime_type,base64:t.message.base64}}catch(t){throw this.logger.error(t),new f(t.toString())}}async deleteMessage(){throw new f("Method not available on WhatsApp Business API")}async mediaSticker(){throw new f("Method not available on WhatsApp Business API")}async pollMessage(){throw new f("Method not available on WhatsApp Business API")}async statusMessage(){throw new f("Method not available on WhatsApp Business API")}async reloadConnection(){throw new f("Method not available on WhatsApp Business API")}async whatsappNumber(){throw new f("Method not available on WhatsApp Business API")}async markMessageAsRead(){throw new f("Method not available on WhatsApp Business API")}async archiveChat(){throw new f("Method not available on WhatsApp Business API")}async markChatUnread(){throw new f("Method not available on WhatsApp Business API")}async fetchProfile(){throw new f("Method not available on WhatsApp Business API")}async offerCall(){throw new f("Method not available on WhatsApp Business API")}async sendPresence(){throw new f("Method not available on WhatsApp Business API")}async setPresence(){throw new f("Method not available on WhatsApp Business API")}async fetchPrivacySettings(){throw new f("Method not available on WhatsApp Business API")}async updatePrivacySettings(){throw new f("Method not available on WhatsApp Business API")}async fetchBusinessProfile(){throw new f("Method not available on WhatsApp Business API")}async updateProfileName(){throw new f("Method not available on WhatsApp Business API")}async updateProfileStatus(){throw new f("Method not available on WhatsApp Business API")}async updateProfilePicture(){throw new f("Method not available on WhatsApp Business API")}async removeProfilePicture(){throw new f("Method not available on WhatsApp Business API")}async blockUser(){throw new f("Method not available on WhatsApp Business API")}async updateMessage(){throw new f("Method not available on WhatsApp Business API")}async createGroup(){throw new f("Method not available on WhatsApp Business API")}async updateGroupPicture(){throw new f("Method not available on WhatsApp Business API")}async updateGroupSubject(){throw new f("Method not available on WhatsApp Business API")}async updateGroupDescription(){throw new f("Method not available on WhatsApp Business API")}async findGroup(){throw new f("Method not available on WhatsApp Business API")}async fetchAllGroups(){throw new f("Method not available on WhatsApp Business API")}async inviteCode(){throw new f("Method not available on WhatsApp Business API")}async inviteInfo(){throw new f("Method not available on WhatsApp Business API")}async sendInvite(){throw new f("Method not available on WhatsApp Business API")}async acceptInviteCode(){throw new f("Method not available on WhatsApp Business API")}async revokeInviteCode(){throw new f("Method not available on WhatsApp Business API")}async findParticipants(){throw new f("Method not available on WhatsApp Business API")}async updateGParticipant(){throw new f("Method not available on WhatsApp Business API")}async updateGSetting(){throw new f("Method not available on WhatsApp Business API")}async toggleEphemeral(){throw new f("Method not available on WhatsApp Business API")}async leaveGroup(){throw new f("Method not available on WhatsApp Business API")}async fetchLabels(){throw new f("Method not available on WhatsApp Business API")}async handleLabel(){throw new f("Method not available on WhatsApp Business API")}async receiveMobileCode(){throw new f("Method not available on WhatsApp Business API")}async fakeCall(){throw new f("Method not available on WhatsApp Business API")}};var We=class{constructor(s,e,t,o,i){this.jid=s;this.exists=e;this.number=t;this.name=o;this.lid=i}},Is=class{},Ts=class{},Ye=class{};var Cs=class{},vs=class{},wt=class{};var As=class{};var Ms=class{},Rs=class{},Ns=class{},Ds=class{};var Sn=class{},Ps=class extends Sn{},_s=class extends Ps{},Os=class extends Ps{},xs=class{};var bn=require("baileys"),Oe=class{constructor(s){this.cache=s;this.logger=new M("CacheService");s?this.logger.verbose(cacheservice created using cache engine: ${s.constructor?.name}`):this.logger.verbose("cacheservice disabled")}async get(s){if(this.cache)return this.cache.get(s)}async hGet(s,e){if(!this.cache)return null;try{let t=await this.cache.hGet(s,e);return t?JSON.parse(t,bn.BufferJSON.reviver):null}catch(t){return this.logger.error(t),null}}async set(s,e,t){this.cache&&this.cache.set(s,e,t)}async hSet(s,e,t){if(this.cache)try{let o=JSON.stringify(t,bn.BufferJSON.replacer);await this.cache.hSet(s,e,o)}catch(o){this.logger.error(o)}}async has(s){if(this.cache)return this.cache.has(s)}async delete(s){if(this.cache)return this.cache.delete({
where: {
OR: [
{
jidOptions: {
contains: "5535999324491@s.whatsapp.net"
}
},
{
jidOptions: {
contains: "553599324491@s.whatsapp.net"
}
}
],
updatedAt: {
gte: new Date("Invalid Date")
~~~~~~~~~~~~~~~~~~~~~~~~
}
}
})

Invalid value for argument gte: Provided Date object is invalid. Expected Date.
at kn (/evolution/node_modules/@prisma/client/runtime/library.js:29:1363)
at e.throwValidationError (/evolution/node_modules/@prisma/client/runtime/library.js:29:10051)
at Ia (/evolution/node_modules/@prisma/client/runtime/library.js:29:7488)
at ka (/evolution/node_modules/@prisma/client/runtime/library.js:29:8741)
at Ia (/evolution/node_modules/@prisma/client/runtime/library.js:29:8272)
at ka (/evolution/node_modules/@prisma/client/runtime/library.js:29:8741)
at Ia (/evolution/node_modules/@prisma/client/runtime/library.js:29:8272)
at ka (/evolution/node_modules/@prisma/client/runtime/library.js:29:8741)
at bt (/evolution/node_modules/@prisma/client/runtime/library.js:29:5845)
at Nn (/evolution/node_modules/@prisma/client/runtime/library.js:29:5747) {
clientVersion: '6.11.1'
}

Notas Adicionais

Estou usando a imagem: sendingtk/v3.12.6 do chatwoot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions