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.86k stars 328 forks source link

error when send mp4 video file #2347

Open antirek opened 3 days ago

antirek commented 3 days ago

Description

when try send mp4 video file size 2Mb via wppconnect - receive error

when send this file via standard web whatsapp interface - ok

error

{
   name: 'InvalidMediaCheckRepairFailedType',
   message: '{"name":"InvalidMediaCheckRepairFailedType","stack":"InvalidMediaCheckRepairFailedType\\n    at a.d [as constructor] (https://static.whatsapp.net/rsrc.php/v3i1FW4/yv/l/rt/_9wK9CvzQFY.js?_nc_x=Ij3Wp8lg5Kz:33:217)\\n    at new a (https://static.whatsapp.net/rsrc.php/v3i1FW4/yv/l/rt/_9wK9CvzQFY.js?_nc_x=Ij3Wp8lg5Kz:34:1016)\\n    at Object.<anonymous> (https://static.whatsapp.net/rsrc.php/v3i1FW4/yv/l/rt/_9wK9CvzQFY.js?_nc_x=Ij3Wp8lg5Kz:2576:6729)\\n    at Generator.next (<anonymous>)\\n    at h (https://static.whatsapp.net/rsrc.php/v3iTNN4/yZ/l/rt/lGXMNxeIh9MVXgil27PkiKaMMWwcn9VT9vsWqehdEtWw.js?_nc_x=Ij3Wp8lg5Kz:43:125)\\n    at g (https://static.whatsapp.net/rsrc.php/v3iTNN4/yZ/l/rt/lGXMNxeIh9MVXgil27PkiKaMMWwcn9VT9vsWqehdEtWw.js?_nc_x=Ij3Wp8lg5Kz:43:349)"}',
   err: InvalidMediaCheckRepairFailedType: {"name":"InvalidMediaCheckRepairFailedType","stack":"InvalidMediaCheckRepairFailedType\n    at a.d [as constructor] (https://static.whatsapp.net/rsrc.php/v3i1FW4/yv/l/rt/_9wK9CvzQFY.js?_nc_x=Ij3Wp8lg5Kz:33:217)\n    at new a (https://static.whatsapp.net/rsrc.php/v3i1FW4/yv/l/rt/_9wK9CvzQFY.js?_nc_x=Ij3Wp8lg5Kz:34:1016)\n    at Object.<anonymous> (https://static.whatsapp.net/rsrc.php/v3i1FW4/yv/l/rt/_9wK9CvzQFY.js?_nc_x=Ij3Wp8lg5Kz:2576:6729)\n    at Generator.next (<anonymous>)\n    at h (https://static.whatsapp.net/rsrc.php/v3iTNN4/yZ/l/rt/lGXMNxeIh9MVXgil27PkiKaMMWwcn9VT9vsWqehdEtWw.js?_nc_x=Ij3Wp8lg5Kz:43:125)\n    at g (https://static.whatsapp.net/rsrc.php/v3iTNN4/yZ/l/rt/lGXMNxeIh9MVXgil27PkiKaMMWwcn9VT9vsWqehdEtWw.js?_nc_x=Ij3Wp8lg5Kz:43:349)"}
       at /usr/src/app/node_modules/@wppconnect-team/wppconnect/dist/api/helpers/evaluate-and-return.js:107:31
       at step (/usr/src/app/node_modules/@wppconnect-team/wppconnect/dist/api/helpers/evaluate-and-return.js:49:23)
       at Object.next (/usr/src/app/node_modules/@wppconnect-team/wppconnect/dist/api/helpers/evaluate-and-return.js:30:53)
       at fulfilled (/usr/src/app/node_modules/@wppconnect-team/wppconnect/dist/api/helpers/evaluate-and-return.js:21:58)
   JS Stack: InvalidMediaCheckRepairFailedType
       at a.d [as constructor] (https://static.whatsapp.net/rsrc.php/v3i1FW4/yv/l/rt/_9wK9CvzQFY.js?_nc_x=Ij3Wp8lg5Kz:33:217)
       at new a (https://static.whatsapp.net/rsrc.php/v3i1FW4/yv/l/rt/_9wK9CvzQFY.js?_nc_x=Ij3Wp8lg5Kz:34:1016)
       at Object.<anonymous> (https://static.whatsapp.net/rsrc.php/v3i1FW4/yv/l/rt/_9wK9CvzQFY.js?_nc_x=Ij3Wp8lg5Kz:2576:6729)
       at Generator.next (<anonymous>)
       at h (https://static.whatsapp.net/rsrc.php/v3iTNN4/yZ/l/rt/lGXMNxeIh9MVXgil27PkiKaMMWwcn9VT9vsWqehdEtWw.js?_nc_x=Ij3Wp8lg5Kz:43:125)
       at g (https://static.whatsapp.net/rsrc.php/v3iTNN4/yZ/l/rt/lGXMNxeIh9MVXgil27PkiKaMMWwcn9VT9vsWqehdEtWw.js?_nc_x=Ij3Wp8lg5Kz:43:349)
   Function: function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
                                   var result;
                                   var _c;
                                   var to = _b.to, base64 = _b.base64, options = _b.options;
                                   return __generator(this, function (_d) {
                                       switch (_d.label) {
                                           case 0: return [4 /*yield*/, WPP.chat.sendFileMessage(to, base64, options)];
                                           case 1:
                                               result = _d.sent();
                                               _c = {
                                                   ack: result.ack,
                                                   id: result.id
                                               };
                                               return [4 /*yield*/, result.sendMsgResult];
                                           case 2: return [2 /*return*/, (_c.sendMsgResult = _d.sent(),
                                                   _c)];
                                       }
                                   });
                               }); }
  }

Environment

antirek commented 3 days ago

its like #2124