Skip to content

[BUG] Erro ao enviar mensagem - "Unknown argument lid. Did you mean id?" #2053

@TML-CODES

Description

@TML-CODES

Welcome!

  • Yes, I have searched for similar issues on GitHub and found none.

What did you do?

Nessa nova versão (v2.3.4), ao tentar enviar mensagem por uma instância já conectada via baileys (eu já tinha ela desde a versão v2.2.2), estou recebendo o seguinte erro:

Invalid this.cache.delete() invocation in\n/evolution/dist/main.js:242:7350\n\n 239 ),i.url&&(n+=URL:${i.url}\n 240 ),i.wuid||(i.wuid=G(i.phoneNumber)),n+=item1.TEL;waid=${i.wuid}:${i.phoneNumber}\n 241 item1.X-ABLabel:Celular\n→ 242 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 y(t.toString())}}async deleteMessage(){throw new y("Method not available on WhatsApp Business API")}async mediaSticker(){throw new y("Method not available on WhatsApp Business API")}async pollMessage(){throw new y("Method not available on WhatsApp Business API")}async statusMessage(){throw new y("Method not available on WhatsApp Business API")}async reloadConnection(){throw new y("Method not available on WhatsApp Business API")}async whatsappNumber(){throw new y("Method not available on WhatsApp Business API")}async markMessageAsRead(){throw new y("Method not available on WhatsApp Business API")}async archiveChat(){throw new y("Method not available on WhatsApp Business API")}async markChatUnread(){throw new y("Method not available on WhatsApp Business API")}async fetchProfile(){throw new y("Method not available on WhatsApp Business API")}async offerCall(){throw new y("Method not available on WhatsApp Business API")}async sendPresence(){throw new y("Method not available on WhatsApp Business API")}async setPresence(){throw new y("Method not available on WhatsApp Business API")}async fetchPrivacySettings(){throw new y("Method not available on WhatsApp Business API")}async updatePrivacySettings(){throw new y("Method not available on WhatsApp Business API")}async fetchBusinessProfile(){throw new y("Method not available on WhatsApp Business API")}async updateProfileName(){throw new y("Method not available on WhatsApp Business API")}async updateProfileStatus(){throw new y("Method not available on WhatsApp Business API")}async updateProfilePicture(){throw new y("Method not available on WhatsApp Business API")}async removeProfilePicture(){throw new y("Method not available on WhatsApp Business API")}async blockUser(){throw new y("Method not available on WhatsApp Business API")}async updateMessage(){throw new y("Method not available on WhatsApp Business API")}async createGroup(){throw new y("Method not available on WhatsApp Business API")}async updateGroupPicture(){throw new y("Method not available on WhatsApp Business API")}async updateGroupSubject(){throw new y("Method not available on WhatsApp Business API")}async updateGroupDescription(){throw new y("Method not available on WhatsApp Business API")}async findGroup(){throw new y("Method not available on WhatsApp Business API")}async fetchAllGroups(){throw new y("Method not available on WhatsApp Business API")}async inviteCode(){throw new y("Method not available on WhatsApp Business API")}async inviteInfo(){throw new y("Method not available on WhatsApp Business API")}async sendInvite(){throw new y("Method not available on WhatsApp Business API")}async acceptInviteCode(){throw new y("Method not available on WhatsApp Business API")}async revokeInviteCode(){throw new y("Method not available on WhatsApp Business API")}async findParticipants(){throw new y("Method not available on WhatsApp Business API")}async updateGParticipant(){throw new y("Method not available on WhatsApp Business API")}async updateGSetting(){throw new y("Method not available on WhatsApp Business API")}async toggleEphemeral(){throw new y("Method not available on WhatsApp Business API")}async leaveGroup(){throw new y("Method not available on WhatsApp Business API")}async fetchLabels(){throw new y("Method not available on WhatsApp Business API")}async handleLabel(){throw new y("Method not available on WhatsApp Business API")}async receiveMobileCode(){throw new y("Method not available on WhatsApp Business API")}async fakeCall(){throw new y("Method not available on WhatsApp Business API")}};var Ke=class{constructor(s,e,t,o,i){this.jid=s;this.exists=e;this.number=t;this.name=o;this.lid=i}},ks=class{},Ls=class{},et=class{};var Bs=class{},Us=class{},At=class{};var $s=class{};var Ws=class{},Js=class{},Fs=class{},Gs=class{};var kn=class{},qs=class extends kn{},Hs=class extends qs{},Vs=class extends qs{},Ks=class{};var Ln=require("baileys"),Le=class{constructor(s){this.cache=s;this.logger=new v("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,Ln.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,Ln.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({\n create: {\n remoteJid: "55219{OCULTADO}@s.whatsapp.net",\n jidOptions: "55219{OCULTADO}@s.whatsapp.net,5521{OCULTADO}@s.whatsapp.net",\n lid: "120529700823277@lid",\n ~~~\n ? id?: String,\n ? createdAt?: DateTime,\n ? updatedAt?: DateTime\n },\n update: {\n jidOptions: "55219{OCULTADO}@s.whatsapp.net,5521{OCULTADO}@s.whatsapp.net",\n lid: "120529700823277@lid"\n },\n where: {\n remoteJid: "55219{OCULTADO}@s.whatsapp.net"\n }\n })\n\nUnknown argument lid. Did you mean id? Available options are marked with ?.

What did you expect?

Que a mensagem seja enviada para o número de destino corretamente.

What did you observe instead of what you expected?

Todas minhas variaveis de cache estão desativadas (com valor "false") e mesmo assim esse erro parece ser em uma etapa de cache...

Screenshots/Videos

No response

Which version of the API are you using?

v2.3.4

What is your environment?

Linux

Other environment specifications

Oracle VM - OCI Ampere A1 Compute (processador Arm) com Easypanel sobre o Ubuntu.

If applicable, paste the log output

No response

Additional Notes

No response

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