Giter Club home page Giter Club logo

Comments (8)

bennycode avatar bennycode commented on August 15, 2024 1

Great. Good luck with your deadlines. 🍀

from coinbase-pro-node.

bennycode avatar bennycode commented on August 15, 2024

Hey, can you show me your code? I will try to reproduce this problem on my machine.

from coinbase-pro-node.

baloian avatar baloian commented on August 15, 2024

Please have look at the source code. In this latest version I unsubscribe and subscribe again when it closes and opens. I have been testing this and see how it goes.

Thanks for helping me out.

from coinbase-pro-node.

bennycode avatar bennycode commented on August 15, 2024

Ok, I already see some issues here:

  1. You cannot use this.client.ws.unsubscribe when receiving a WebSocketEvent.ON_CLOSE event because the WebSocket is closed so the unsubscribe message cannot be send through the WebSocket anymore
  2. You still do await this.client.ws.connect but connect is not a Promise anymore since v1.6.0
  3. You don't have to call client.ws.subscribe([this.channel]) after this.client.ws.connect because you are doing this already in your WebSocketEvent.ON_OPEN handler
  4. I am not sure if this.client.ws.subscribe is necessary on every WebSocketEvent.ON_OPEN, I would guess you only need to do it for the very first ON_OPEN, can you confirm?

from coinbase-pro-node.

baloian avatar baloian commented on August 15, 2024

I had the issue even before adding 1. , 3. and 4. One commit before the latest commit.

from coinbase-pro-node.

baloian avatar baloian commented on August 15, 2024

I updated the code based on 2. and cleaned up 1., 3. and 4.. Let me run again and see how it goes. I also want to do some debugging so I can give you reason(s) why it happens.

Edited:
While I was writing this comment it happened again and I had to restart the program. I tend to thing that this is mostly Coinbase Pro server issue, but I don't know yet.

from coinbase-pro-node.

bennycode avatar bennycode commented on August 15, 2024

Hey @baloian, thanks for your intensive testing. You can test against the official coinbase-pro library. It is deprecated but should still be able to connect to the WebSocket. If the problem also shows up with their library, then it tends to be a server issue.

from coinbase-pro-node.

baloian avatar baloian commented on August 15, 2024

That is a good idea. I will come back to testing in 2 weeks probably as I have some deadlines on my work.

from coinbase-pro-node.

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.