Questions tagged [websocket]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
2answers
20 views

Ethereum Wallet - Hangs at startup + 403 ws error

I have installed the Ethereum Wallet, Ethereum-Wallet-win64-0-11-1 (zip file), as described in the book. When I start up Ethereum Wallet (testnet Ropsten, syncmode “light”) the wallet seems to load ...
2
votes
1answer
67 views

How to listen to contract events using ethers.js?

I need to listen to the specific contract events and do some task once the event is emitted. I didn't find proper docs on ethers.js documentation. Can anybody tell me how can I keep listening to my ...
0
votes
0answers
25 views

Unable to connect to Geth/web3 from outside AWS using public IP with Websocket

I tried RPC api to connect to Geth/web3 hosted in AWS EC2 using the public IP. But developers have disabled web3 in RPC(HTTP) Web3 api for non local connection. It means that you can only make a web3 ...
0
votes
0answers
9 views

All requests routed to submodule when changing its provider in web3js

Using web3.js 1.2.11, I expect the last part of the following code to route requests from the web3.eth.personal module to the IPC socket, and requests on web3.eth to TCP port 7545. let Web3 = require('...
1
vote
0answers
45 views

Websocket provider reconnects every 1 minute

I'm developing an application on a private Ethereum chain and trying to listen to some events. I wrote a basic indexer script for listening to events and writing them in a database. To listen to the ...
0
votes
0answers
15 views

How can I get all updates for a given transaction hash via websockets?

Given an Ethereum public key, "0x7B10c5AaFa65B8AEd953bE6D593D3D29391592D7", how can I get all available data for transactions sent from the afore mentioned public key after they have been included in ...
1
vote
0answers
9 views

Cannot connect to Azure PoA Websocket

Just like question Connecting to blockchain on azure using web3.js and websocket, I need to use websockets to capture events. I have gotten my http and websocket endpoints from the deployment outputs ...
0
votes
2answers
126 views

What is the websocket URL in Ethereum on Geth?

I've lunched an Ethereum server based on Geth. Now, I need to be notified about all incoming transactions on my generated accounts. In my previous Bitcoin Core server, I had an option in its config ...
2
votes
0answers
29 views

Azure Blockchain Service node properties [closed]

What exactly are Access key 1, Access key 2, Member account, Web socket, DNS, creater account, etc. of a node in Azure Blockchain Service? I am getting confused as to what are these. Also what are the ...
0
votes
0answers
64 views

Timeout when try to connect over websocket in web3.py

I am trying to listen for events emitted by a simple Solidity contract. I am not able to connect using ws though I can commit transactions using http. Here's my code for event listening - import ...
2
votes
0answers
28 views

How to use Truffle HDWallet Provider with WebSocketProvider

Truffle HDWallet Provider works well with HttpProvider, but doesn't work with WebSocketProvider.
1
vote
0answers
48 views

Connection not open on send when subscribing to new block headers

I am running a local ethereum node with the below configuration geth --syncmode "full" --datadir "." --ethash.dagdir "." --cache=4096 --rpc --rpcaddr test.example.com --rpcapi="web3,miner,admin,...
0
votes
0answers
76 views

Why does Infura Ropsten websocket filtering event timeout?

When listening events via Infura Ropsten websocket, web3.py implementation timeout while web3.js succeeds. The demo can be cloned from -- https://github.com/jerryji/ropsten_wss_timeout_demo After ...
0
votes
1answer
152 views

Erc-20 Token Send Transaction

I want some Information about Erc-20 Transactions. I want to transfer Erc-20Token from first wallet to a second wallet, I have Privet Key, But I want to transfer with Api, So How can I transfer the ...
1
vote
1answer
70 views

Generate new address, Send and Get transaction then Check transaction

I'm just starting in the ethereum and trying to build an app using Web3 and Nodejs. I'll need your lights so I can get any idea to know how to resolve those points: I have my own public address and ...
0
votes
1answer
176 views

geth subscribe newHeads not working

I run geth with this command geth --syncmode "fast" --cache 2048 --datadir /data/ethereum --ws --wsaddr 0.0.0.0 --wsorigins '*' --wsapi 'web3,eth,net,db,personal' --rpc --rpcaddr 0.0.0.0 then i ...
0
votes
0answers
107 views

Events using Infura websockets on rinkeby Web3 1.2.1. Returned values aren't valid, did it run Out of Gas?

I am trying to do a simple event listener with NodeJS and Web3 using an Infura endpoint. I have the correct project-id const Web3 = require('web3'); let web3 = new Web3( // Replace YOUR-PROJECT-ID ...
0
votes
2answers
223 views

TimeoutError when using Infura websocket with web3.py

When I run the following code sometimes it executes successfully, but most of the time it raises a concurrent.futures._base.TimeoutError. What can I do to fix this? Here is the code: infura_url_ws = ...
0
votes
1answer
390 views

How to connect with WebSocket with Web3?

Already referred web3 documentations and other Q-A for web socket connection. Currently using infura as provider.
1
vote
1answer
45 views

Subscribe to events using local geth in light mode?

I've followed this guide to subscribe to events. I succesfully subscribed to the new block headers using Infura provider. But when I try to use local geth node syncing in light mode, it connects, but ...
1
vote
0answers
430 views

Problem connecting web3 via websocket to node with nginx

we are trying to connect to a geth node via WebSockets to be able to subscribe to contract events. This node is created with docker and this docker uses nginx as a proxy. We can connect easily with ...
1
vote
0answers
45 views

Infura websocket API timing out on connect

Has anyone ever had issues with the Infura Websocket API suddenly ceasing to respond. I have been using it to subscribe to event logs, but now the connection to the API is timing out.
1
vote
0answers
169 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
338 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
489 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
220 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
1answer
394 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
367 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 ...
3
votes
0answers
418 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 ...
4
votes
0answers
508 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?...
1
vote
0answers
189 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
241 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
2k 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
6k 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
810 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
163 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
154 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....
9
votes
1answer
1k 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 ...
4
votes
7answers
3k views

Is there any websocket ethereum provider?

Is there any websocket ethereum provider? Except etherscan one. Maybe there are paid wss subscriptions?
2
votes
1answer
385 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
248 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 ...
2
votes
1answer
196 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?
1
vote
1answer
98 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 ...
1
vote
1answer
733 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
211 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
1k 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
781 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....
3
votes
2answers
4k 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 ...