wppconnect-team / wppconnect

WPPConnect is an open source project developed by the JavaScript community with the aim of exporting functions from WhatsApp Web to the node, which can be used to support the creation of any interaction, such as customer service, media sending, intelligence recognition based on phrases artificial and many other things, use your imagination
https://wppconnect.io
Other
1.93k stars 340 forks source link

sendMessage non-list contact on whatsapp-web 2.2134.9 #462

Closed antirek closed 3 years ago

antirek commented 3 years ago
"TypeError: this._find is not a function
    at j._serverQuery (https://web.whatsapp.com/bootstrap_qr.abbc2ea8366e2cd9a145.js:55:334921)
    at j._query (https://web.whatsapp.com/bootstrap_qr.abbc2ea8366e2cd9a145.js:55:334450)
    at j.find (https://web.whatsapp.com/bootstrap_qr.abbc2ea8366e2cd9a145.js:55:332582)
    at Object.<anonymous> (/whatsapp_instance/node_modules/@wppconnect-team/wppconnect/dist/lib/wapi/wapi.js:1:66259)
    at Generator.next (<anonymous>)
    at qn (/whatsapp_instance/node_modules/@wppconnect-team/wppconnect/dist/lib/wapi/wapi.js:1:64935)
    at a (/whatsapp_instance/node_modules/@wppconnect-team/wppconnect/dist/lib/wapi/wapi.js:1:65139)
    at V (https://web.whatsapp.com/bootstrap_qr.abbc2ea8366e2cd9a145.js:2:373738)
    at MutationObserver.K (https://web.whatsapp.com/bootstrap_qr.abbc2ea8366e2cd9a145.js:2:373319)"

Untitled

edgardmessias commented 3 years ago

@antirek , it is normal or multidevice version?

antirek commented 3 years ago

@edgardmessias it's normal version

antirek commented 3 years ago

it's a like https://github.com/orkestral/venom/issues/1102

diazzaid commented 3 years ago

it's a like orkestral/venom#1102

i tried and no problem like venom.. and venom has made improvements to the update on version 3.1.4

antirek commented 3 years ago

maybe, you don't see problem? I tried send message to non-list contact and my contact don't receive message, console don't show any error. After this I run wppconnect wiith open browser and send message to non-list contact via WAPI.sendMessage() and I see error in browser console

diazzaid commented 3 years ago

maybe, you don't see problem? I tried send message to non-list contact and my contact don't receive message, console don't show any error. After this I run wppconnect wiith open browser and send message to non-list contact via WAPI.sendMessage() and I see error in browser console

yes I tried to send a message to a number that has not been saved and that is no problem. make sure to use the latest version of the library

makanSukros commented 3 years ago
"TypeError: this._find is not a function
    at j._serverQuery (https://web.whatsapp.com/bootstrap_qr.abbc2ea8366e2cd9a145.js:55:334921)
    at j._query (https://web.whatsapp.com/bootstrap_qr.abbc2ea8366e2cd9a145.js:55:334450)
    at j.find (https://web.whatsapp.com/bootstrap_qr.abbc2ea8366e2cd9a145.js:55:332582)
    at Object.<anonymous> (/whatsapp_instance/node_modules/@wppconnect-team/wppconnect/dist/lib/wapi/wapi.js:1:66259)
    at Generator.next (<anonymous>)
    at qn (/whatsapp_instance/node_modules/@wppconnect-team/wppconnect/dist/lib/wapi/wapi.js:1:64935)
    at a (/whatsapp_instance/node_modules/@wppconnect-team/wppconnect/dist/lib/wapi/wapi.js:1:65139)
    at V (https://web.whatsapp.com/bootstrap_qr.abbc2ea8366e2cd9a145.js:2:373738)
    at MutationObserver.K (https://web.whatsapp.com/bootstrap_qr.abbc2ea8366e2cd9a145.js:2:373319)"

Untitled

This is because whatsapp missing find function on module

makanSukros commented 3 years ago

On other library i solved with added addtional function moduleraid window.Store.Chat._find = e => { const target = window.Store.Chat.get(e) return target ? Promise.resolve(target) : Promise.resolve({ id: e }) }

makanSukros commented 3 years ago

maybe, you don't see problem? I tried send message to non-list contact and my contact don't receive message, console don't show any error. After this I run wppconnect wiith open browser and send message to non-list contact via WAPI.sendMessage() and I see error in browser console

Not all working fine, im from indonesia affected this problem, i think whatsapp partial patching

antirek commented 3 years ago

@diazzaid do you use whatsappVersion option in config? what value? I set to 2.2134.9 - it's fresh whatsapp-web

antirek commented 3 years ago

if you use previous whatsappVersion like 2.2132.6 - all work fine

diazzaid commented 3 years ago

@diazzaid apakah Anda menggunakan opsi whatsappVersion di konfigurasi? nilai apa? Saya set ke 2.2134.9 - ini whatsapp-web baru

i use this code https://github.com/wppconnect-team/wppconnect/tree/master/examples/rest image

antirek commented 3 years ago

oh, it's version from 21 Jul (https://github.com/wppconnect-team/wa-version/releases/tag/v1.1.3) is it work today?

diazzaid commented 3 years ago

oh, ini versi dari 21 Juli ( https://github.com/wppconnect-team/wa-version/releases/tag/v1.1.3 ) apakah itu berfungsi hari ini? yeah it works fine. I don't really understand the whatsapp web version, what is clear is that I only update the library when there is a new update the wpp version used is the latest version 1.8.13

edgardmessias commented 3 years ago

oh, it's version from 21 Jul (https://github.com/wppconnect-team/wa-version/releases/tag/v1.1.3) is it work today?

Yes, this project keep only "working" versions of WhatsApp.

Today I am working on it to solve this problem and another problems.

antirek commented 3 years ago

wa-version was updated to 2.2134.10 and this bug repeat also

antirek commented 3 years ago

@edgardmessias do you have the plan for test and updates for new versions of whatsapp web? current default version 2.2126.14. now in wa-version - 2.2132.9, 2.2136.9 and other if i understand right that whatsapp can disable 2.2126.14 soon and wppconnect must migrate to other wa web version?

edgardmessias commented 3 years ago

Closed with bb13ad2b1331510c2363d0f4e29fc9c51eae49de