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
327 stars 120 forks source link

Can not send large video file #2048

Closed ariona closed 6 days ago

ariona commented 6 days ago

WA-JS Version

3.4.0

WhatsApp Version

2.3000.1014456890

Browser Version

126.0.6478.63

Operation System

OS X Sonoma

Steps to reproduce

Try to send 6M of video file.

What is expected?

Video is sent

What is actually happening?

Process terminated with error:

core.js:2 Uncaught (in promise) RangeError: Maximum call stack size exceeded
    at RegExp.test (<anonymous>)
    at t.isBase64 (core.js:2:300863)
    at t.convertToFile (core.js:2:296974)
    at t.sendFileMessage (core.js:2:176998)

Any additional comments?

No response

ariona commented 6 days ago

My bad, solve the issue, by adding data:application/mimetype;base64,[base64 data] before base64 data