-
Notifications
You must be signed in to change notification settings - Fork 725
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
Nethereum.Contracts.EventExtensions.Sort() throws Value cannot be null. (Parameter 'source') #723
Comments
@moccajoghurt many thanks for this, do you know what specific block range you had the issue? If you use the blockchain progress storage, you should be able to identify the block, error and restart from there. The log processor is designed to get a specific log, for example all the transfer events (for all contracts), so you may be encountering a range of blocks with no logs, and hence a null value, which is highly unlikely or you may have a bad response with infura. Also the processor has a retry process (in case of failure). In anyway I am looking into it, as I had tested this crawling / logs for many blocks but this has never occurred. |
@moccajoghurt Ok it seems that this is an intermittent issue with infura as I have reproduced the issue, in random blocks, in which we are not getting any logs as a response. This is an interesting scenario, as it is not expected, so the result is incorrect. As a side effect the logs when getting sorted, as there should be some are being rejected even if this is for 100 block range. |
…ecuting actions #723 There seems to be an issue that Infura is returning null values, when it should be returning some values when processing logs, this implements a simple retry mechanism when null values are returned, although this adds an small retry overload (single request), it should not be an issue as block ranges are defaulted to 100. Included is the resetting of retries, and error handling when calling actions, these should be handled already by users, but this does not updated the progress.
When you run Nethereums log processor for a few minutes, it sometimes crashes with the following exception: System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
Here is a sample that you can run to reproduce the error:
The error is caused inside Nethereum/src/Nethereum.Contracts/Extensions/EventExtensions.cs:
Nethereum/src/Nethereum.Contracts/Extensions/EventExtensions.cs
Line 556 in 35ad7a7
Here is the stack trace:
The text was updated successfully, but these errors were encountered: