question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RPC requests are getting cancelled

See original GitHub issue

Wallet version or commit SHA: dev branch (c8585ba)

Environment: Win 10 Home (64 bit) Version 1803 Build 17134.112

Prerequisites:

  • At least one wallet imported to the app

Reproduction steps:

  1. Start Neon Wallet
  2. Click on “Login using a saved wallet” button
  3. Select your wallet, enter your passphrase and click on “Login” button
  4. Wait for some time having your wallet running in the background

I’ve observed that sometimes RPC requests are cancelled by Neon Wallet. This is going to cause issues with missing balances for specific assets. For example - 10 requests are triggered to fetch balances for 10 assets, 2 of them are cancelled - user is going to miss balances for 2 assets.

I’m guessing that this is probably caused because of longer response times from RPC nodes. I know that there is 5000ms timeout defined while sending a transaction. Does it also apply to requests for fetching blocks and balances of assets from RPC nodes? If yes then maybe we should increase that timeout (neo.org nodes are quite slow while it comes to response times and they time out very often) and in addition to that retry cancelled requests for getting block height and fetching balances?

Screenshots/Video: xhr_cancel

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
comountainclimbercommented, Sep 5, 2018

@drptbl thats not true anymore… there have been several changes over the past few weeks and making one call is now one of them leveraging neo-js api.nep5.getTokenBalances instead of one call per token

1reaction
DalderupMauricecommented, Aug 25, 2018

This timeout was increased to 30000 in version 3.10.0. Worth giving it another shot? (after upgrading neon-js) @drptbl

Read more comments on GitHub >

github_iconTop Results From Across the Web

gRPC: Random CANCELLED exception on RPC calls
gRPC creates a cancellable context for each inbound RPC. When that RPC completes (basically, when the server responds with a onCompleted()/ ...
Read more >
Cancelling service calls (RPC) to the server side from ...
I have a long-running service call to the server side from GWT. Something like: service.getUpdate(AsyncCallBack callback), which takes a long time to
Read more >
json-rpc should spec how to communicate a canceled ...
The spec for cancelling requests doesn't specify how the server indicates to the client that a response reflects a canceled request.
Read more >
RpcCancelThread function (rpcdce.h) - Win32 apps
The RpcCancelThread function cannot be used to cancel a call that has issued a static callback. Do not cancel remote procedure calls that...
Read more >
Can you Cancel a REST HTTP Request? - YouTube
In this video, I discuss why it is not possible to cancel stateless HTTP requests. in the context of vanilla HTTP, microservices, gRPC...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found