Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [websocket]

The tag has no usage guidance.

1
vote
0answers
18 views

Ocasional connection refused initializing web3

I have an ethereum web application using web3js 1.0.0-beta.34 on a private network. Most of the times everything works fine. Sometimes the connection to the node through a websocket provider fails ...
0
votes
1answer
35 views

Infura Web Sockets doesn't work on Infura

I have a problem with connecting via Websockets to Infura. I am listening on some events from my smart contract, so when some event is dispatched by calling some method from smart contract, I should ...
1
vote
1answer
66 views

Error on WebSocket connection to Infura Ropsten (broken close frame)

I am trying to connect to Ropsten with Web3js (1.0) via Infura using their WebSocket provider but I am getting the following error: WebSocket connection to 'wss://ropsten.infura.io/ws' failed: ...
0
votes
1answer
59 views

geth event newPendingTransactions does not occur

I've got running geth with next command: $ geth --testnet --networkid 3 --verbosity 3 --syncmode light --ipcdisable --ws --wsapi "db,eth,net,web3,personal,txpool,admin,miner" --wsorigins '*' In ...
0
votes
0answers
35 views

Can I use a WebSocket client for multiple abigen watchers?

I have question about abigen and websocket. My code is in Go. I'm sending a bunch of transactions using abigen and I'm using abigen to watch each of the transaction and do something when it's mined. ...
0
votes
1answer
72 views

How to apply EthFilter to specific address?

In web3.js, we can apply event filter something like below: this.event = this.Contract.events.MyEvent({ filter: { address: "0xAccountAddress" }, }) In Web3J, it is translated to EthFilter ...
1
vote
1answer
201 views

Having issue with Infura mainnet web3 connection and getting info

I have been looking at a tutorial from DappUniversity about Web3... on the introductory video, I have completed all stages fine, but when getting to retriving account balance information from the ...
2
votes
0answers
261 views

ping / pong pattern for infura websocket [closed]

Infura websockets disconnect after an hour of in-activity so they suggest you ping / pong the connection at an interval less then an hour. My problem is I'm new to server-side programming and don't ...
3
votes
0answers
301 views

What is the safest way to use WS-RPC server in geth?

In this answer, it is suggested that it is not safe to use --wsorigins="*" for security reasons. What are the security reasons? => How could I make WS-RPC server connection secure in geth? If I use ...
1
vote
0answers
121 views

Cannot Connect to Geth Web Socket from Other PC on LAN

I have a geth node running on one PC, IP 192.168.0.105 and on my main dev machine IP 192.168.0.102, I'm trying to connect to it via web sockets but keep getting connection not open. Both are on the ...
2
votes
1answer
134 views

Connecting to blockchain on azure using web3.js and websocket

right now, I am trying to write a service using web3 which will 'subscribe' to all 'perndingtransactions' on blockchain to perform further actions. web3 documentation says that 'Httpprovider' cant be ...
1
vote
2answers
1k views

TypeError: Cannot set property 'method' of undefined when using WebsocketProvider

I'm using: web3 v0.20.6 web3-providers-ws v1.0.0-beta.34 First question - can web3-providers-ws be used with web3 v0.20.*? Second question (problem) - I get an error when probably trying to send ...
2
votes
3answers
2k views

web3 Websocket connection to infura

I receive this error when I'm trying to connect to the websocket WebSocket connection to 'wss://ropsten.infura.io/ws' failed: Error during WebSocket handshake: Sent non-empty 'Sec-WebSocket-Protocol'...
0
votes
1answer
401 views

“Connection not open” error when subscribing to address with websocket

I'm trying to subscribe to transactions sent to or from a particular ethereum address. I also want to test this in a local private network, which is why I'm not using etherscan or something like that. ...
0
votes
1answer
116 views

Get a large amount of blocks with web3 (nodejs)

I'm writing a nodejs program that gets a large amount of blocks (>100,000) and looks at each transaction inside to filter / analyse the data. I'm currently using web3 (v1) getBlock function: eth....
0
votes
0answers
126 views

Unable to catch contract event using parity websockets

I have a contract deployed on ropsten which emits event when ether amount is deposited in it. I can see the event appearing in etherscan. this.web3Socket = new Web3(new Web3.providers....
4
votes
0answers
810 views

web3 websocket connection prevents node process from exiting

I have a node js process that creates a web3 websocket connection, like so: web3 = new Web3('ws://localhost:7545') When the process completes, it does not exit, but rather hangs forever with no ...
0
votes
0answers
129 views

Web3/Geth Websocket maximum message length?

I am currently using web3 1.0.0-beta34 Ubuntu 16.04.4 LTS in HyperV Geth 1.8.9 stable Geth is running in dev mode and I am connected through websockets. I also have a smart contract deployed and I ...
0
votes
0answers
38 views

Is there any ready guides/github open codes for websocket built in?

I am trying to build something similar to wss://socket.etherdelta.com, are there any ready to go codes (open github repositories)? wss://api.forkdelta.com also as an example.
2
votes
3answers
1k views

Is there any websocket ethereum provider?

Is there any websocket ethereum provider? Except etherscan one. Maybe there are paid wss subscriptions?
0
votes
0answers
21 views

opening port in Geth [duplicate]

How can a open a websocket port in geth that connects to private network not to the main or test net just like in testrpc or ganache? As Ganache doesn't support websocket i want to use geth just like ...
2
votes
1answer
251 views

Healtcheck on Websocket

I've looked through the documentation and haven't found that to be helpful. I would like to know the best way to do a healthcheck on my websocket connection to geth (Yesterday, I found out that I did ...
0
votes
1answer
167 views

Unable to connect to geth

I'm totally new to Ethereum, and want to create some deposit address monitoring system using web socket. Which gets newly generated blocks and scan it for transactions made into it. You can find code ...
1
vote
1answer
127 views

Is there a max number of websocket connections that geth can support?

I realize that it depends on my machine, RAM, etc, but is there a general guide of how many WS connections geth can support?
0
votes
1answer
74 views

API or websocket

I am trying to develop an crypto traking site like coinmarketcap, for market data I am using exchanges API. but I am little bit confuse whether i should use api or websocket? as i don't have much ...
0
votes
1answer
566 views

How to connect to Infura Testnet by using WebsocketProvider?

I want to connect to rinkeby.infura testnet by using WebsocketProvider but the page remains blocked to load. const Web3 = require('web3'); console.log(Web3.givenProvider); var web3 = new Web3( new ...
1
vote
1answer
169 views

Dapp fundamental q about listening solidity events

Sol: I created contract with events that are raised when is called some function. Html fo: Those functions are called via web3.js with abi and address - easy. Backend (no js) asp or php: I am not ...
2
votes
1answer
712 views

Subscribe to events usign geth websocket

I'm trying to subscribe to geth using the websocket api. First step was to start geth: geth --ws --wsport=8456 --wsorigins="*" --fast --cache=512 --rpcport=8455 --rpc --rpcapi="personal,eth,network" ...
1
vote
2answers
511 views

How to expose the underlying web socket connection from the WebSocketProvider?

Using web3.js version 1(beta) and using the WebsocketProvider to make a connection via const Web3 = require('web3') const web3 = new Web3('ws://localhost:8546') const provider = web3.providers....
4
votes
2answers
3k views

connecting geth to web3.js 1.0 via websockets or HTTP

I am building a minimal nodeJS application that should connect via web3.js to my geth node. I am following the official web3.js1.0 documentation and I am using web3 1.0.0-beta.29. I do manage to ...
1
vote
2answers
2k views

TypeError: Web3.providers.WebsocketProvider is not a constructor?

Trying to connect to a geth machine over websocket? JS code. var Web3=require('web3'); var web3 = new Web3(new Web3.providers.WebsocketProvider('ws://10.244.5.43:8546')); console.log(web3....
5
votes
1answer
2k views

Subscription using websocket through Geth

I am trying to build a dapp which will monitor a particular address balance, and update in case someone send fund (ether) to it. Instead of polling using call getBalance, I want to take advantage of ...
2
votes
0answers
497 views

Geth connection rpc vs ws

where I can find same articles or materials to understand differences between rpc and ws connection over geth. From my point of view rpc is part of a websocket connection, so why I have to use ws ...
2
votes
0answers
248 views

Sockets/4 - Connection failed, retrying after 1000ms

After running for a bit I always get this with the latest ethereumwallet --fast and latest ubuntu: [2017-07-01 17:00:30.037] [ERROR] ipcProviderBackend - Send request failed Error: Unable to connect ...
10
votes
2answers
6k views

Geth can't connected to via Websocket

I am trying to connect to Geth via Websockets but unfortunately i am given 403 error. I am using the --ws --wsport XXXX args. Everything is done in a local instance, so that would be surprising if ...