shuppet / raku-api-discord

Raku module for interacting with the Discord API.
https://shuppet.com
BSD 3-Clause "New" or "Revised" License
30 stars 3 forks source link

Module does not work with 2019.03.01 #31

Closed Skarsnik closed 5 years ago

Skarsnik commented 5 years ago

I just try running the echo example to see if it was from my own script, but the example fails to work (sending a message back) and discord heartbeat is never replied after the first one.

kawaii commented 5 years ago

Hi Skarsnik!

Can you double check the output of perl6 --version please? Here's what I get:

$ perl6 --version
This is Rakudo Star version 2019.03.1 built on MoarVM version 2019.03
implementing Perl 6.d.

I'm using the RC2 release of Rakudo Star 2019.03 from here, though I'm not sure if it makes much difference, either way - the examples all seem to work fine for me. :(

image

Skarsnik commented 5 years ago

skarsnik@DESKTOP-UIA12T1:/mnt/f/Project/Gobbla$ ../Perl6/benchmark/rakudo-2019.03.1/install/bin/perl6 --version This is Rakudo version 2019.03.1 built on MoarVM version 2019.03 implementing Perl 6.d.

skarsnik@DESKTOP-UIA12T1:/mnt/f/Project/Gobbla$ ../Perl6/benchmark/rakudo-2019.03.1/install/bin/perl6 ../Perl6/p6-api-dscord/examples/echo-server.p6 « ♥ » ♥ « ♥ « ♥ Heartbeat wasn't acknowledged! ☹ Attempting to reconnect... Resuming session 96c4fe251c3bffd186b462ae8b7ee8d0 at sequence 2

kawaii commented 5 years ago

Looks like you could be suffering as a result of https://github.com/croservices/cro-websocket/issues/15, which is something we're still unable to fix or debug ourselves. We sometimes run into this issue a lot (for hours and hours on end) and other days the library will work flawlessly (with no difference in network connection, environment and compiler version). :(

Edit: You can try running with CRO_TRACE=1 prefixed to your command, to see some more useful debug information about the raw connection to the API.

Skarsnik commented 5 years ago

Duh, as you say, it works this evening ><

kawaii commented 5 years ago

I bugged @Altai-man about it earlier today and he said he'll try and think of a proposal to fix the underlying issue in Cro::WebSocket, so hopefully in a coming release we might see it resolved (or even a hot-patch would be nice :wink:).

Altai-man commented 5 years ago

@kawaii I have looked at the state of the things briefly tonight and reproduced both issues mentioned in the ticket with https://gist.github.com/Altai-man/33b94415598ffca6114f7f16c53aa93b I'll try to get down these two I am sure about.

Please, write if one of these happens to be similar to the persistent issue you are having with this module.

kawaii commented 5 years ago

Looks like this is probably resolved by now, please open a new issue if the problem occurs in the future.

Skarsnik commented 5 years ago

I updated Cro and so far so good :)