Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identify with disallowed intents doesn't gracefully close the websocket thread #154

Open
Daniel-Worrall opened this issue Apr 28, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@Daniel-Worrall
Copy link
Member

Summary

When running a bot without allowing privileged intents, the thread that sends heartbeats to the gateway doesn't close.

bot.run

[ERROR : websocket @ 2022-04-28 20:20:04.201] The websocket connection has closed: (no information)
[ERROR : websocket @ 2022-04-28 20:20:04.201] Websocket close frame received!
[ERROR : websocket @ 2022-04-28 20:20:04.201] Code: 4014
[ERROR : websocket @ 2022-04-28 20:20:04.201] Message: Disallowed intent(s).
[ERROR : websocket @ 2022-04-28 20:20:04.201] You attempted to identify with privileged intents that your bot is not authorized to use
Please enable the privileged intents on the bot page of your application on the discord developer page.
Read more here https://discord.com/developers/docs/topics/gateway#privileged-intents
[WARN : websocket @ 2022-04-28 20:20:04.201] The WS loop exited! Not sure if this is a good thing
=> #<Thread:0x000056211b580b00 /home/d/git/ruby/discordrb/lib/discordrb/gateway.rb:166 dead>
[ERROR : heartbeat @ 2022-04-28 20:20:45.269] An error occurred while heartbeating!
[ERROR : heartbeat @ 2022-04-28 20:20:45.269] Exception: #<RuntimeError: Tried to send something to the websocket while not being connected!>
[ERROR : heartbeat @ 2022-04-28 20:20:45.269] /home/d/git/ruby/discordrb/lib/discordrb/gateway.rb:831:in `send'
[ERROR : heartbeat @ 2022-04-28 20:20:45.269] /home/d/git/ruby/discordrb/lib/discordrb/gateway.rb:426:in `send_packet'
[ERROR : heartbeat @ 2022-04-28 20:20:45.269] /home/d/git/ruby/discordrb/lib/discordrb/gateway.rb:275:in `send_heartbeat'
[ERROR : heartbeat @ 2022-04-28 20:20:45.269] /home/d/git/ruby/discordrb/lib/discordrb/gateway.rb:268:in `heartbeat'
[ERROR : heartbeat @ 2022-04-28 20:20:45.269] /home/d/git/ruby/discordrb/lib/discordrb/gateway.rb:456:in `block (2 levels) in setup_heartbeats'
[ERROR : heartbeat @ 2022-04-28 20:20:45.269] /home/d/git/ruby/discordrb/lib/discordrb/gateway.rb:450:in `loop'
[ERROR : heartbeat @ 2022-04-28 20:20:45.269] /home/d/git/ruby/discordrb/lib/discordrb/gateway.rb:450:in `block in setup_heartbeats'
[WARN : heartbeat @ 2022-04-28 20:21:26.561] Last heartbeat was not acked, so this is a zombie connection! Reconnecting
... more zombie logs

Environment

Ruby version: ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [x86_64-linux]

Discordrb version: main, e384e4a

@Daniel-Worrall Daniel-Worrall added the bug Something isn't working label Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant