vsTerminus / Discord-NP

Last.FM Now Playing info in your Discord status message
MIT License
43 stars 6 forks source link

error 1005 on submission, not updating status - also possible memory leak? #7

Closed teletrail closed 3 years ago

teletrail commented 7 years ago

hi, I've been using your script for like a month or more, it fills the niche for last fm support in Discord.

however recently I've been getting error output from the terminal? for example:

Mon Aug 28 20:41:38 2017 (on_finish) Websocket Connection Closed with Code 1005 (No Status Received)

is this normal?

also I'm wondering if there might be a memory leak somewhere, since when I run the script for like a day or so, it takes up 99% of CPU resources.

any help would be appreciated, thanks!

seriosbrad commented 6 years ago

I'm getting the same:

Wed Nov 29 17:52:23 2017 - Connected to Discord.
Wed Nov 29 17:52:23 2017 - Status Updated: AC/DC - Give It Up
Wed Nov 29 17:52:23 2017 (on_finish) Websocket Connection Closed with Code 1005 (No Status Received)

Here's the verbose output:

Wed Nov 29 18:06:30 2017 Connecting to wss://gateway.discord.gg?v=6&encoding=json
Wed Nov 29 18:06:30 2017 WebSocket Connection Established.
Wed Nov 29 18:06:30 2017 OP 2 SEQ 0 IDENTIFY
Wed Nov 29 18:06:30 2017 {"d":{"compress":true,"large_threshold":50,"properties":{"$browser":"Discord Now Playing","$device":"Discord Now Playing","$os":"linux","$referrer":"","$referring_domain":""},"token":"***************"},"op":2}
Wed Nov 29 18:06:30 2017 OP 10
Wed Nov 29 18:06:31 2017 OP 0 SEQ 1 READY
Wed Nov 29 18:06:31 2017 - Connected to Discord.
Wed Nov 29 18:06:31 2017 {"d":{"game":{"name":"Metallica - Battery"},"idle_since":null},"op":3}
Wed Nov 29 18:06:31 2017 - Status Updated: Metallica - Battery
Wed Nov 29 18:06:31 2017 (gw_disconnect) Closing Websocket: Status Updated
Wed Nov 29 18:06:31 2017 (on_finish) Websocket Connection Closed with Code 1005 (No Status Received)
Wed Nov 29 18:06:31 2017 Removing Heartbeat Timer
Wed Nov 29 18:06:31 2017 Automatic Reconnect is disabled.

Whatever is going on, it's not updating the status on Discord

toru5 commented 6 years ago

I'm also getting this issue. I'd love to keep using this script--hopefully a fix isn't too hard to implement.

vsTerminus commented 6 years ago

New update has been pushed today.

"Websocket Connection Closed with Code 1005" is normal, as the script functions by connecting, updating the status, and then immediately disconnecting. You should only see that if you have Verbose enabled in the config.

I'll monitor mine for a memory leak over the next few days.

vsTerminus commented 3 years ago

Mojo Discord has had some connection code overhauls and this should be resolved now.