Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Parity client does not trigger pendingTransactions event on Web socket RPC connection. #7152

Closed
artemii235 opened this issue Nov 27, 2017 · 1 comment
Labels
M6-rpcapi 📣 RPC API. Z7-duplicate 🖨 Issue is a duplicate. Closer should comment with a link to the duplicate.
Milestone

Comments

@artemii235
Copy link

Before filing a new issue, please provide the following information.

I'm running:

  • Which Parity version?: Docker v1.8.3 - Ropsten network
  • Which operating system?: Docker: v1.8.3
  • How installed?: Docker
  • Are you fully synchronized?: yes
  • Did you try to restart the node?: yes

Your issue description goes here below. Try to include actual vs. expected behavior and steps to reproduce the issue.
steps to reproduce

  1. docker pull parity/parity:v1.8.3
  2. docker run -it parity/parity:v1.8.3 --no-ui -p 8546:8546 --chain="ropsten" --ws-origins="all" --ws-interface="all"
  3. Wait until client syncs.
  4. Attach web3 pendingTransactions event handler:
const webSocketProvider = new Web3.providers.WebsocketProvider('ws://localhost:8546');`
const web3 = new Web3(webSocketProvider);`
web3.eth.subscribe('pendingTransactions', (error, result) => {
      console.log('error received');
      console.log(error);
      console.log('result received');
      console.log(result);
});

Actual output produced

error received
Error: Returned error: This request is not implemented yet. Please create an issue on Github repo.
    at Object.ErrorResponse (/usr/src/app/node_modules/web3-core-helpers/src/errors.js:29:16)
    at Object.<anonymous> (/usr/src/app/node_modules/web3-core-requestmanager/src/index.js:137:36)
    at /usr/src/app/node_modules/web3-providers-ws/src/index.js:76:44
    at Array.forEach (<anonymous>)
    at W3CWebSocket.WebsocketProvider.connection.onmessage (/usr/src/app/node_modules/web3-providers-ws/src/index.js:53:36)
    at W3CWebSocket._dispatchEvent [as dispatchEvent] (/usr/src/app/node_modules/yaeti/lib/EventTarget.js:107:17)
    at W3CWebSocket.onMessage (/usr/src/app/node_modules/websocket/lib/W3CWebSocket.js:234:14)
    at WebSocketConnection.<anonymous> (/usr/src/app/node_modules/websocket/lib/W3CWebSocket.js:205:19)
    at emitOne (events.js:115:13)
    at WebSocketConnection.emit (events.js:210:7)
    at WebSocketConnection.processFrame (/usr/src/app/node_modules/websocket/lib/WebSocketConnection.js:547:26)
    at /usr/src/app/node_modules/websocket/lib/WebSocketConnection.js:321:40
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)
result received
null

Expected output
Pending transaction data according to web3.js subscribe API: https://web3js.readthedocs.io/en/1.0/web3-eth-subscribe.html#subscribe-pendingtransactions
This issue is also mentioned in Web3 project: web3/web3.js#992

P.S. fixing this will improve UX of Dapps relying on Parity client, allowing to display pending transactions immediately just like on etherscan. Also this event works fine with Geth.

@artemii235
Copy link
Author

I have found that this issue is duplicate of #6426, I'm closing this. Will wait for this event to be implemented in next versions.

@5chdn 5chdn added M6-rpcapi 📣 RPC API. Z7-duplicate 🖨 Issue is a duplicate. Closer should comment with a link to the duplicate. labels Nov 28, 2017
@5chdn 5chdn added this to the 1.9 milestone Nov 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
M6-rpcapi 📣 RPC API. Z7-duplicate 🖨 Issue is a duplicate. Closer should comment with a link to the duplicate.
Projects
None yet
Development

No branches or pull requests

2 participants