Stickerworld icon indicating copy to clipboard operation
Stickerworld copied to clipboard

Larger GIFs and videos break the bot

Open johnparkerg opened this issue 3 years ago • 7 comments

Basically large GIFs and videos are breaking the bot. I'm running in a Linux server that is completely vanilla. I've already tried moving to a new server and resizing the virtual server, but haven't had any luck.

What are the steps to reproduce this issue?

  1. Send a large (>150kb) gif or video
  2. Bot sends "Generating Sticker"

What happens?

Bot never answer, sometimes breaks in the backend

What were you expecting to happen?

Bot sends sticker

Any logs, error output, screenshots etc?

Error: Evaluation failed: s
    at ExecutionContext._evaluateInternal (/root/Stickerworld/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:217:19)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async ExecutionContext.evaluate (/root/Stickerworld/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:106:16)

Any other comments?

@viniuau Originally reported in issue #39

What versions of software are you using?

Operating System and Versión: Ubuntu 18.04

Node Version (node -v): 16.3.0

Stickerworld Version: 2.1.1 running in PM2

johnparkerg avatar Jun 15 '21 15:06 johnparkerg

I've been working on fixing this problem for a few days and between several tests I have detected a bug in the main whatsapp management library, so I have created an issue to try to fix it https://github.com/orkestral/venom/issues/991

kaiserdj avatar Jun 18 '21 23:06 kaiserdj

I've been working on fixing this problem for a few days and between several tests I have detected a bug in the main whatsapp management library, so I have created an issue to try to fix it orkestral/venom#991

Thanks @kaiserdj I will support that issue and try to look further in what you mentioned in the issue.

johnparkerg avatar Jun 19 '21 20:06 johnparkerg

I've been trying to add the FFmpeg fs option in video.js#L31 to limit the video sticker size to 1M but it doesn't seem to be working. I think limiting the video resize to 1M would solve the problem.

johnparkerg avatar Jun 19 '21 22:06 johnparkerg

I already did tests with different sizes and it is not a problem of 1mb, since I modified the code to compress the webp to the maximum, and from a 3mb gif I obtained a 400kb webp. But it kept returning the same error.

kaiserdj avatar Jun 19 '21 23:06 kaiserdj

That is why in the issue that creates in venom I sent them webp files that size less than 1mb, since those should not give errors, but they do.

kaiserdj avatar Jun 19 '21 23:06 kaiserdj

I've managed to avoid the error in most cases by limiting the duration of the output of FFmpeg to 1 second, this is not a solution but it might help us understand why it happens.

johnparkerg avatar Jun 22 '21 01:06 johnparkerg

it doesn't respond when i sent gif image

mevn92 avatar Aug 13 '21 09:08 mevn92