wppconnect-team / wa-js

WPPConnect/WA-JS is an open-source project with the aim of exporting functions from WhatsApp Web
https://wppconnect.io/wa-js/
Apache License 2.0
392 stars 126 forks source link

Images are not sent #1768

Closed jchiavellibr closed 5 months ago

jchiavellibr commented 5 months ago

WA-JS Version

2.28.1

WhatsApp Version

2.2412.50

Browser Version

Brave 1.64.109 / Chromium 123.0.6312.58

Operation System

Windows 11

Steps to reproduce

Paste images from clipboard or upload from computer.

What is expected?

Images must be sent when pasting or uploading from the computer

What is actually happening?

When pasting images from the clipboard into a conversation or uploading from your computer, the images are not sent. When you disable library injection, images are sent normally. image

Any additional comments?

No response

icleitoncosta commented 5 months ago

Hi, I tried to reproduce your error here, but without success. I used the same version, injected, logged in, pasted image, sent by selecting through the menu, sent via WPP, and no error was presented. Could you provide more details on how you are injecting, or if this error was a temporary one?

jchiavellibr commented 5 months ago

I discovered that the problem only happens in groups, and is not restricted to images, but to messages as well.

I'm using the library in an extension, and I inject it as follows:

[parasite.js] ... async function load() { setTimeout(async ()=>{ await import("./wppconnect-wa.js"); await import("../main.js"); } , 1000); } ...

No errors are shown in the console when the problem happens. The library is loading normally: image

In the previous version of lib, the problem did not occur. To generate a new version of the extension, I just replaced the "wppconnect-wa.js" file with the new one (2.28.1) and recompiled the project.

icleitoncosta commented 5 months ago

Alright, we've seen more issues like this before, and they were resolved by updating the project dependencies. Please use the latest version (3.1.0).

https://github.com/wppconnect-team/wa-js/releases/tag/v3.1.0

jchiavellibr commented 5 months ago

Version 3.1.0 fixed the issue. Thank you very much!