Skip to content

subscribeBlocks & subscribeMempool Not Working #2146

Open
@dhwndud408

Description

@dhwndud408

Hi! dev teams.

I am making code with your api.
Here is my computer info.
Mac OS Sonoma14.4
Node 18.19.1
NPM 10.2.4
API version: 8.2.0

Here is the typescript code

import * as stacks from '@stacks/blockchain-api-client';
const socketUrl = "https://api.mainnet.hiro.so";
const socket = new stacks.StacksApiSocketClient({ url: socketUrl });

let client = await stacks.connectWebSocketClient('wss://api.mainnet.hiro.so/');


sub = await socket.subscribeBlocks((event) => {
   console.log(event)
}
sub = await socket.subscribeBlocks((event) => {
console.log(event)
}

After about 6 hours, the websocket stops.

I also see the this report.
#1885

The admin said it was resolved on above link, but it seems the issue has resurfaced with the Nakamoto update.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions