Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

crash due to this log #2288

Closed
philsong opened this issue Mar 9, 2024 · 6 comments
Closed

crash due to this log #2288

philsong opened this issue Mar 9, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@philsong
Copy link

philsong commented Mar 9, 2024

I found that someone report this issue before, but that bug was closed.

I check the code in connection.ts, line 6124:

and I found your guys wrote a log "// TODO: Maybe add an 'errored' state or a retry limit?".....

please tell us how to fix, because it will enter dead cycyle and eat all of memory and make the machine crash...

} catch (e) { if (e instanceof Error) { console.error(${unsubscribeMethod} error:, e.message); } if (!isCurrentConnectionStillActive()) { return; } // TODO: Maybe add an 'errored' state or a retry limit? this._setSubscription(hash, { ...subscription, state: 'subscribed', }); await this._updateSubscriptions(); return; }

logs below:

accountUnsubscribe error: write EPIPE
accountUnsubscribe error: Tried to call a JSON-RPC method accountUnsubscribe but the socket was not CONNECTING or OPEN (readyState was 2)
accountUnsubscribe error: Tried to call a JSON-RPC method accountUnsubscribe but the socket was not CONNECTING or OPEN (readyState was 2)
accountUnsubscribe error: Tried to call a JSON-RPC method accountUnsubscribe but the socket was not CONNECTING or OPEN (readyState was 2)
accountUnsubscribe error: Tried to call a JSON-RPC method accountUnsubscribe but the socket was not CONNECTING or OPEN (readyState was 2)
accountUnsubscribe error: Tried to call a JSON-RPC method accountUnsubscribe but the socket was not CONNECTING or OPEN (readyState was 2)
accountUnsubscribe error: Tried to call a JSON-RPC method accountUnsubscribe but the socket was not CONNECTING or OPEN (readyState was 2)
accountUnsubscribe error: Tried to call a JSON-RPC method accountUnsubscribe but the socket was not CONNECTING or OPEN (readyState was 2)
accountUnsubscribe error: Tried to call a JSON-RPC method accountUnsubscribe but the socket was not CONNECTING or OPEN (readyState was 2)
accountUnsubscribe error: Tried to call a JSON-RPC method accountUnsubscribe but the socket was not CONNECTING or OPEN (readyState was 2)
accountUnsubscribe error: Tried to call a JSON-RPC method accountUnsubscribe but the socket was not CONNECTING or OPEN (readyState was 2)
accountUnsubscribe error: Tried to call a JSON-RPC method accountUnsubscribe but the socket was not CONNECTING or OPEN (readyState was 2)
accountUnsubscribe error: Tried to call a JSON-RPC method accountUnsubscribe but the socket was not CONNECTING or OPEN (readyState was 2)
accountUnsubscribe error: Tried to call a JSON-RPC method accountUnsubscribe but the socket was not CONNECTING or OPEN (readyState was 2)

@philsong philsong added the bug Something isn't working label Mar 9, 2024
@lithdew
Copy link

lithdew commented Mar 12, 2024

I guess isCurrentConnectionStillActive could be amended to also check the readyState of the underlying WebSocket instance to see if it is WebSocket.CONNECTED.

@steveluscher
Copy link
Contributor

steveluscher commented Mar 13, 2024

What version of @solana/web3.js are you running? Something similar was fixed in 1.73.3. Read this for details. #1106

The important question is, what version of rpc-websockets is installed?

@philsong
Copy link
Author

What version of @solana/web3.js are you running? Something similar was fixed in 1.73.3. Read this for details. #1106

The important question is, what version of rpc-websockets is installed?

"@solana/web3.js": "1.87.6"

@philsong
Copy link
Author

"rpc-websockets": "^7.5.1",

@philsong
Copy link
Author

thanks! I got the reason, it seems that the a lib refer a old version!

Copy link
Contributor

Because there has been no activity on this issue for 7 days since it was closed, it has been automatically locked. Please open a new issue if it requires a follow up.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants