Skip to content

v2.2.3 - Invalid this.cache.delete() invocation - Argument path: Invalid value provided. Expected String, provided (String). #1158

Open
@rafwell

Description

@rafwell

Welcome!

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

What did you do?

Pessoal, estou com esse erro no log, já busquei formas de resolver mas não consegui.
Ele acontece o tempo inteiro, fica difícil até de ver o log com tantos erros repetidos. Porém, tudo que tentei usar até agora funcionou. Estou com os seguintes parametros no meu env

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_SAVE_IS_ON_WHATSAPP=true
DATABASE_SAVE_IS_ON_WHATSAPP_DAYS=7
DATABASE_DELETE_MESSAGE=false

What did you expect?

Esperava entrar no log e ver somente outros alertas ou erros

What did you observe instead of what you expected?

Muitos erros repetidos

Screenshots/Videos

No response

Which version of the API are you using?

v2.2.0

What is your environment?

Docker

Other environment specifications

No response

If applicable, paste the log output

evolution_api    | [Evolution API]    v2.2.0  163   -  Mon Jan 20 2025 15:01:23     ERROR   [unhandledRejection]  [object]   
evolution_api    | PrismaClientValidationError: 
evolution_api    | Invalid `this.cache.delete()` invocation in
evolution_api    | /evolution/dist/main.js:250:24701
evolution_api    | 
evolution_api    |   247 `),r.url&&(n+=`URL:${r.url}
evolution_api    |   248 `),r.wuid||(r.wuid=this.createJid(r.phoneNumber)),n+=`item1.TEL;waid=${r.wuid}:${r.phoneNumber}
evolution_api    |   249 item1.X-ABLabel:Celular
evolution_api    | → 250 END:VCARD`,n};return e.contact.length===1?t.contact={displayName:e.contact[0].fullName,vcard:s(e.contact[0])}:t.contactsArrayMessage={displayName:`${e.contact.length} contacts`,contacts:e.contact.map(r=>({displayName:r.fullName,vcard:s(r)}))},await this.sendMessageWithTyping(e.number,{contacts:e.contact.map(r=>({name:{formatted_name:r.fullName,first_name:r.fullName},phones:[{phone:r.phoneNumber}],urls:[{url:r.url}],emails:[{email:r.email}],org:{company:r.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,s=t.messageType.includes("Message")?t.messageType:t.messageType+"Message",r=t.message[s];return{mediaType:t.messageType,fileName:r?.fileName,caption:r?.caption,size:{fileLength:r?.fileLength,height:r?.fileLength,width:r?.width},mimetype:r?.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 rt=class{constructor(i,e,t,s){this.jid=i;this.exists=e;this.number=t;this.name=s}},ls=class{},us=class{},Mt=class{};var ds=class{},gs=class{},ot=class{};var ms=class{};var hs=class{},ys=class{},fs=class{},ws=class{};var jn=class{},bs=class extends jn{},Ss=class extends bs{},Es=class extends bs{},Is=class{};var Kn=require("baileys"),Re=class{constructor(i){this.cache=i;this.logger=new T("CacheService");i?this.logger.verbose(`cacheservice created using cache engine: ${i.constructor?.name}`):this.logger.verbose("cacheservice disabled")}async get(i){if(this.cache)return this.cache.get(i)}async hGet(i,e){if(!this.cache)return null;try{let t=await this.cache.hGet(i,e);return t?JSON.parse(t,Kn.BufferJSON.reviver):null}catch(t){return this.logger.error(t),null}}async set(i,e,t){this.cache&&this.cache.set(i,e,t)}async hSet(i,e,t){if(this.cache)try{let s=JSON.stringify(t,Kn.BufferJSON.replacer);await this.cache.hSet(i,e,s)}catch(s){this.logger.error(s)}}async has(i){if(this.cache)return this.cache.has(i)}async delete(i){if(this.cache)return this.cache.delete({
evolution_api    |         where: {
evolution_api    |           instanceId: "92503952-3e5e-45f1-9000-8916a8eb3797",
evolution_api    |           key: {
evolution_api    |             path: [
evolution_api    |               "id"
evolution_api    |             ],
evolution_api    |             ~~~~~~
evolution_api    |             equals: "3EB06CDC7D821683111042B00DCAA86BFEFB69D7"
evolution_api    |           }
evolution_api    |         }
evolution_api    |       })
evolution_api    | 
evolution_api    | Argument `path`: Invalid value provided. Expected String, provided (String).
evolution_api    |     at Dn (/evolution/node_modules/@prisma/client/runtime/library.js:114:8082)
evolution_api    |     at Mn.handleRequestError (/evolution/node_modules/@prisma/client/runtime/library.js:121:7396)
evolution_api    |     at Mn.handleAndLogRequestError (/evolution/node_modules/@prisma/client/runtime/library.js:121:7061)
evolution_api    |     at Mn.request (/evolution/node_modules/@prisma/client/runtime/library.js:121:6745)
evolution_api    |     at async l (/evolution/node_modules/@prisma/client/runtime/library.js:130:9633)
evolution_api    |     at async messages.update (/evolution/dist/main.js:250:24665) {
evolution_api    |   clientVersion: '5.21.1'
evolution_api    | } 
evolution_api    | 
e

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