DarkGuy10 / BotClient

A discord botclient built with Electron, React and discord.js.
MIT License
182 stars 17 forks source link

[BUG] #31

Closed DerSimeon closed 2 years ago

DerSimeon commented 2 years ago

Describe the bug When attempting to view a Big Server you get an Empty Channel List with an error Message in the Console

To Reproduce Steps to reproduce the behavior:

  1. Open a big Server in BotClient
  2. Look into the Console

Expected behavior A visible Channel list

Error Uncaught (in promise) Error: Error invoking remote method 'channels': TypeError: members.values is not a function or its return value is not iterable at EventEmitter.i.invoke (node:electron/js2c/renderer_init:61) at async ChannelNav.fetchChannels (ChannelNav.js:16)

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

DarkGuy10 commented 2 years ago

@FCKJohni Can you run the client from command line and give error logs from there? I'm guessing it's because of a particular type of channel that I've overlooked, or some missing permissions, that are causing channel members to be unfetchable

DerSimeon commented 2 years ago

Tbh I am very confused, it suddenly fixed itself which is very interessting. The Error no longer appears. I will close this Issue for now and maybe it will appear again at some point

DerSimeon commented 2 years ago

nvm, another Error occured when I clicked on some Channels, in the GUI I get nothing but in the console I get: [1] Error occurred in handler for 'messages': DiscordAPIError: Unknown Message [1] at RequestHandler.execute (G:\BotClient\node_modules\discord.js\src\rest\RequestHandler.js:350:13) [1] at processTicksAndRejections (node:internal/process/task_queues:96:5) [1] at async RequestHandler.push (G:\BotClient\node_modules\discord.js\src\rest\RequestHandler.js:51:14) [1] at async MessageManager._fetchId (G:\BotClient\node_modules\discord.js\src\managers\MessageManager.js:219:18) [1] at async Message.fetchReference (G:\BotClient\node_modules\discord.js\src\structures\Message.js:652:21) [1] at async serializeMessage (G:\BotClient\public\serializers\serializeMessage.js:13:36) [1] at async G:\BotClient\public\electron.js:183:48 [1] at async node:electron/js2c/browser_init:197:563 { [1] method: 'get', [1] path: '/channels/948684204785414193/messages/948685335062265887', [1] code: 10008, [1] httpStatus: 404, [1] requestData: { json: undefined, files: [] } [1] }

DarkGuy10 commented 2 years ago

Tbh I am very confused, it suddenly fixed itself which is very interessting. The Error no longer appears. I will close this Issue for now and maybe it will appear again at some point

thats interesting, someone else just had the same issue... I think i have a fairly accurate guess on what's causing this so I'll patch it today

DarkGuy10 commented 2 years ago

nvm, another Error occured when I clicked on some Channels, in the GUI I get nothing but in the console I get: [1] Error occurred in handler for 'messages': DiscordAPIError: Unknown Message [1] at RequestHandler.execute (G:\BotClient\node_modules\discord.js\src\rest\RequestHandler.js:350:13) [1] at processTicksAndRejections (node:internal/process/task_queues:96:5) [1] at async RequestHandler.push (G:\BotClient\node_modules\discord.js\src\rest\RequestHandler.js:51:14) [1] at async MessageManager._fetchId (G:\BotClient\node_modules\discord.js\src\managers\MessageManager.js:219:18) [1] at async Message.fetchReference (G:\BotClient\node_modules\discord.js\src\structures\Message.js:652:21) [1] at async serializeMessage (G:\BotClient\public\serializers\serializeMessage.js:13:36) [1] at async G:\BotClient\public\electron.js:183:48 [1] at async node:electron/js2c/browser_init:197:563 { [1] method: 'get', [1] path: '/channels/948684204785414193/messages/948685335062265887', [1] code: 10008, [1] httpStatus: 404, [1] requestData: { json: undefined, files: [] } [1] }

This one, I've encountered it myself but never able to pinpoint what exactly causes this, maybe cross-posted-messages? anyways, I'll add a catch block while reference fetching to prevent it for now

DarkGuy10 commented 2 years ago

Hopefully v0.8.1 fixes both of these Can you confirm if the second bug still occurs in v0.8.1?

DerSimeon commented 2 years ago

Unfortunately the Update made it even worse, now when I click on a channel that causes the above issue, the BotClient just gets gets completely gray no channels or servers visible and in the console I get this: https://paste.sentinalcoding.eu/ITXGTQQF9H (uploaded to my paste since its pretty long)

DarkGuy10 commented 2 years ago

Hmmm, give me a second, i guess the catch wasn't sufficient [my bad, i wasn't able to duplicate the issue]

DarkGuy10 commented 2 years ago

Unfortunately the Update made it even worse, now when I click on a channel that causes the above issue, the BotClient just gets gets completely gray no channels or servers visible and in the console I get this: https://paste.sentinalcoding.eu/ITXGTQQF9H (uploaded to my paste since its pretty long)

Can you confirm if the bug still happens in v0.8.2?

DerSimeon commented 2 years ago

Perfekt! it fixed it, no errors and all Messages look good!

DarkGuy10 commented 2 years ago

Perfekt! it fixed it, no errors and all Messages look good!

Epic, this issue can be closed then