Giter VIP home page Giter VIP logo

Comments (9)

avatarkava avatar avatarkava commented on August 12, 2024

Can confirm it stalls here.

from plugapi.

EranSch avatar EranSch commented on August 12, 2024

Yep. I've been experiencing this one as well.

from plugapi.

EranSch avatar EranSch commented on August 12, 2024

On a whim, I tried moving the reconnect event from setImmediate([...]) to setTimeout([...], 5000) just to see if adding a delay made a difference, no dice there. It seems as though that had no effect.

Hopefully I can get some time to try and actually debug this a little further. Doesn't help that my machine didn't boot after the Yosemite update this morning... 😢 🔫

from plugapi.

ronaldb avatar ronaldb commented on August 12, 2024

@Swingline0 I did the same thing, with the same results. However, initially I made a typo (setTimeOut), which resulted in an exit from the application. Recycling the bot in the script file was already built in.

I now do a process.exit(101) and process.exit(102) for the Socket Server Error and Socket Server Closed events, catch these errorlevels in the shell script, pause a minute and then restart the bot. That seems to work. Which leads me to believe that the slug may be invalid...? It's hard to test this when you don't know if the error is within your local code or within the plug code... 😃

from plugapi.

EranSch avatar EranSch commented on August 12, 2024

Totally, @ronaldb !

I'm using PM2 to run our bot so something similar would be a great temporary solution. Good idear.

This seems like a particularly annoying problem as it occurs so unpredictably. I've added some more logging to try and get a better idea of what the problem might be. Maybe that will reveal something.

from plugapi.

anjanms avatar anjanms commented on August 12, 2024

It's 4am for me, hopefully this makes sense and is helpful somehow.

In an attempt keep the bot running and just create a new PlugAPI instance. I've found the authCode is only updated once. Doing _authCode = ''; before reconnecting, events go through, and everything seems happy.

EDIT: Also, having the bot get the code from the room it's joining (i.e. https://plug.dj/roomslug) instead of https://plug.dj, doesn't fire a leave event. Making it look like the bot refreshed the page.

from plugapi.

anjanms avatar anjanms commented on August 12, 2024

That fixed it for me. Using the latest unmodified plugAPI:

15 Nov 13:28:11 [WARNING]  [PlugAPI]  [Socket Server] Closed with code 1000
15 Nov 13:28:11 [INFO]     [PlugAPI]  [Socket Server] Reconnecting
15 Nov 13:28:13 [SUCCESS]  [PlugAPI]  [Socket Server] Connected
Joined :eggplant:
ansj-s test
15 Nov 13:41:36 [WARNING]  [PlugAPI]  [Socket Server] Closed with code 1000
15 Nov 13:41:36 [INFO]     [PlugAPI]  [Socket Server] Reconnecting
15 Nov 13:41:38 [SUCCESS]  [PlugAPI]  [Socket Server] Connected
Joined :eggplant:
ansj-s asdf

from plugapi.

TATDK avatar TATDK commented on August 12, 2024

That sounds great, because this was a big issue before we can release a new version of plugAPI to npm.

Now all that's left should be to add the missing methods.

from plugapi.

avatarkava avatar avatarkava commented on August 12, 2024

Yup confirmed fixed as well.

from plugapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.