#Problem sending media messages

10 messages · Page 1 of 1 (latest)

violet harbor
#

Im trying to make a simple MERN app and this error pops up when trying to send media message:

I tried to replicate the same scenario as in the Handling Attachments (https://wwebjs.dev/guide/creating-your-bot/handling-attachments.html#sending-files-from-a-url) section but still get this error. What can it possibly be? there is no CORS errors btw

lapis island
#

That error is on the Browser Page, especially on WhatsApp Internal Functions
*match() method matches a string against a regular expression ***
so variable **a ** is not a String

I am checked the base64 image you tried to send.
is not a valid PNG file.
data:image/png;base64,PGh0bWw+DQo8aGVhZD48dGl0bGU+NTA@EdhdGV3YXkgVGltZS1vdXQ8L3RpdGx1PjwvaGVhZD4NCjxib2R5Pg0KPGNlbnRlcj48aDE+NTA@EdhdGV3YXkgVGltZS1vdXQ8L2gxPjwvY2VudGVyPg0KPC91b2R5Pg0KPC9odG1sPg0K

is a HTML

<html> <head><title>50

I think URL you set as image sends you a 50X HTTP code, maybe 502 Bad Gateway
perhaps the URL is protected from a bot and direct link, you need get creative on this reqOptions at MessageMedia.fromUrl(url[, options])

violet harbor
lapis island
#

try use file-type-checker or sharp

waxen haven
#

I tested and it works fine

violet harbor
#

Also can I see how you configured the client?

#

Here is mine

lapis island
violet harbor