-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I receive the same data from network twice after connection hang up error! #52
Comments
Please provide full logs so I can see more what is happening. |
It happens very rarely once per few days or even rarer I will try to provide you proper logs, but it can take. |
I think I already see the problem in logs when this Internal server error is called stream is restarted with the initial cursor. |
You need to send the latest cursor you received on reconnect. |
But reconnect is automatic. It's your library which handles it. |
I know I might provided you with logs in poor format. |
@BartolomeoItaliano Three things is required for proper tracking of chain and ensure no duplicated trx is found:
From the logs you have, you seems to have the
subscription($cursor: String!) { searchTransactionsForward(query: "...", cursor: $cursor) ...
|
See the commit function which is called when each data is received and and calls |
One more question, in case I use query with cursor provided like this: How can I provide query with initial cursor when I am restarting whole appllication? |
Ok, here I found some good example: |
You pass it in your initial variables. See https://github.com/dfuse-io/client-js/blob/master/examples/advanced/common/graphql-never-miss-a-beat.ts#L152 |
For people with this problem in the future. https://github.com/dfuse-io/client-js/blob/HEAD/examples/basic/eosio/stream-transfers-graphql.ts Like @maoueh said you need to set initial parameters and then after each message mark their change, otherwise still initial params would be used for reconection: |
Hi!
I have got small dapp which tracks transactions on EOS network and it is very important for me to not receive over your library duplicated data and I am pretty sure I do.
After library hangs connection for a moment with error:
I receive the same data I already received before error being thrown.
This is very dangerous for my app. I plan to receive and send from my contract money in form of EOS and other tokens to users.
Please advice what to do.
The text was updated successfully, but these errors were encountered: