FKLC / WhatsAppToDiscord

WhatsAppToDiscord is a Discord bot that uses WhatsApp Web as a bridge between Discord and WhatsApp.
https://fklc.github.io/WhatsAppToDiscord/
MIT License
239 stars 67 forks source link

Crashes when audio is received or sent #132

Closed S0FLGotTaken closed 1 year ago

S0FLGotTaken commented 1 year ago

Whenever I receive or send an audio in whatsapp, the .exe crashes.

FKLC commented 1 year ago

Could you send your logs?

S0FLGotTaken commented 1 year ago

Could you send your logs? Where are those?

FKLC commented 1 year ago

It is in the same folder as your bot. Check the folder you run the executable from and you'll find logs.txt file.

S0FLGotTaken commented 1 year ago

I'm not really comfortable with sharing my phone number. Is there anything specific you want from logs?

FKLC commented 1 year ago

Yeah, can you crash the bot purposefully then find a line similar to the following {"level":30,"time":1679515369266,"pid":10012,"hostname":"","version":"v0.9.1","msg":"Exiting!"}, then send the line showing the error, it should look similar to {"level":50,"time":1679515369266,"pid":10012,"hostname":"","":"v0.9.1","err":{"type":"TypeError","message":"Cannot read properties of undefined (reading 'channels')","stack":"TypeError: Cannot read properties of undefined (reading 'channels')\n at Object.repairChannels (path\\WhatsAppToDiscord\\src\\utils.js:209:17)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async path\\WhatsAppToDiscord\\src\\index.js:41:3"},"msg":"Cannot read properties of undefined (reading 'channels')"} It should be at most few lines, so you can actually go over those lines and remove your number.

S0FLGotTaken commented 1 year ago

So um the log has 2400 lines and many many instances of the word "error" and "Exiting!"

FKLC commented 1 year ago

Okay, I just deleted your comment because it still phone numbers in it, but honestly, I don't know the reason for this problem. Did you check if you are still having the same problem with the latest release? I saw that you were using version 9.0.1, I recently pushed a new version, see if that works.

FKLC commented 1 year ago

Okay, I found the reason and working on it.

S0FLGotTaken commented 1 year ago

Oh, good. Thank you!

FKLC commented 1 year ago

following in #134