open-wa / wa-automate-nodejs

💬 🤖 The most reliable tool for chatbots with advanced features. Be sure to 🌟 this repository for updates!
https://docs.openwa.dev/
Other
3.15k stars 601 forks source link

MediaFileEmpty #3010

Open manteguinha opened 1 year ago

manteguinha commented 1 year ago

Are you using the latest version of the library?

What type of session are you experiencing this issue on?

Multi-device and I have set multiDevice to true in my config OR am using the --multi-device flag

What type of host account are you experiencing this issue on?

Business account

Mode

My own code

Current Behavior

No response

Expected Behavior

No response

Steps To Reproduce

When using either of the 2 I get the error. I only tested these 2 methods, I don't know if the error occurs in any other.

client.sendFileFromUrl(chatId, LINK_PIC_HERE, "img.jpg", 'description', id) client.sendImage(chatId, LINK_PIC_HERE, "img.jpg", 'description', id)

create() code OR full CLI command + CONFIG

No response

DEBUG INFO

│     WA_VERSION      │                                                                 '2.2247.7'                                                                 │
│       PAGE_UA       │ 'WhatsApp/2.2147.16 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36' │
│ WA_AUTOMATE_VERSION │                                                                  '4.55.0'                                                                  │
│   BROWSER_VERSION   │                                                       'HeadlessChrome/108.0.5359.98'                                                       │
│         OS          │                                                                'Linux 5.15'                                                                │
│      START_TS       │                                                               1673275933857                                                                │
│      RAM_INFO       │                                                     'Total: 25.15 GB | Free: 21.92 GB'                                                     │
│    PPTR_VERSION     │                                                                  '19.5.0'

Environment

- OS: Ubuntu
- Node: v18.13.0
- npm: 8.19.3

Screenshots/Logs

image

Anything else?

No response

smashah commented 1 year ago

@manteguinha please provide a test value for LINK_PIC_HERE that results in this error

manteguinha commented 1 year ago

@manteguinha please provide a test value for LINK_PIC_HERE that results in this error

with any image or file link the error occurs, but in the tests I did I used getProfilePicFromServer to get the profile picture link, in the browser the picture opens perfectly, but to download the error appears.

TramontaG commented 1 year ago

I'm facing the same issue. Even with local files this doesnt work.

client.sendFile( requester.chatId, './media/img/Kaguya.png', 'image.png', caption );

Got me Error: Evaluation failed: Error: MediaFileEmpty

manteguinha commented 1 year ago

I tested it on an Intel processor with Chrome and it worked, so apparently the problem is because of the arm processor or the chromium.

riccihenrique commented 1 year ago

Hey guys, I solve this problem using Docker with Docker Compose.

I had problems with native compose install in arm, so I used those commands to make the install. Works for me.