You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Ciao-2 are you using reliable provider, may be check provider directly? curl --data '{"jsonrpc":"2.0","method": "eth_getTransactionReceipt", "params": ["YOUR_TX_HASH"], "id": 0}' -H "Content-Type: application/json" localhostOR_YOUR_PROVIDER:8545
This is happening to me as well on 1.7.4. I can do the curl request and it works fine but i get the error above when i try it from web3.js. This is tested on a production server where another application on web3.js 0.xx is working perfectly so it is definitely not the server or the connectivity.
I added some logging statements to "web3-providers-http" and I have tracked down the problem. The xmlhttprequest upload content type is set to: "text/plain;charset=UTF-8" instead of "application/json". I reproduced the error in curl by setting the accept header to that.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.
Is there an existing issue for this?
Current Behavior
Error: Invalid JSON RPC response: ""
web3.eth.getTransactionReceipt(hash).then(req => {
}).catch(e => {
Logger.error(e.message)
})
Expected Behavior
web3.eth.getTransactionReceipt(hash).then(req => {
}).catch(e => {
Logger.error(e.message)
})
Steps to Reproduce
random occurrence
Web3.js Version
1.7.3
Environment
Anything Else?
No response
The text was updated successfully, but these errors were encountered: