Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WS socket repetitively responds with null responses when subcribed #2359

Closed
quiet-node opened this issue Apr 17, 2024 · 2 comments · Fixed by #2406
Closed

WS socket repetitively responds with null responses when subcribed #2359

quiet-node opened this issue Apr 17, 2024 · 2 comments · Fixed by #2406
Assignees
Labels
bug Something isn't working

Comments

@quiet-node
Copy link
Collaborator

Description

WS socket repetitively responds with null responses when subcribed

Steps to reproduce

  1. Run WS server
  2. Connect to WS server
  3. Observe null responses

Additional context

No response

Hedera network

mainnet, testnet, previewnet, other

Version

latest

Operating system

None

@quiet-node quiet-node added the bug Something isn't working label Apr 17, 2024
@quiet-node quiet-node self-assigned this Apr 17, 2024
@simsonraj
Copy link
Contributor

With WS responses through code, we get null responses & that breaks the flows
Attached is a sample response for eth_getTransactionCount
image (1)

@quiet-node quiet-node linked a pull request Apr 23, 2024 that will close this issue
2 tasks
@simsonraj
Copy link
Contributor

simsonraj commented Apr 24, 2024

Running the below sample script with the Public HashIO endpoint, we get websocket: bad handshake (HTTP status 301 Moved Permanently) error, not sure whats happening, also I dont remember seeing this issue before

package main

import (
"context"
"log"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/ethclient"
)

func main() {
client, err := ethclient.Dial("ws://testnet.hashio.io/ws")
if err != nil {
log.Fatalf("Failed to connect to the Ethereum client: %v", err)
}
txn, _, _ := client.TransactionByHash(context.Background(), common.HexToHash("0x1b8cc543ac8633a6a060629ae176e2817b4792a7841ef38d44ecfb9ec8bfcccc"))
log.Println("Txn: ", txn)
block, _ := client.BlockByNumber(context.Background(), nil)
log.Println("Block: ", block)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
2 participants