Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

IotaAPI.getTransfers() always throws ArgumentException for specific (seed, index) combinations #90

Open
vuapo-eth opened this issue Feb 15, 2018 · 2 comments

Comments

@vuapo-eth
Copy link

vuapo-eth commented Feb 15, 2018

When calling this method:

api.getTransfers(seed, 2, index, index+1, false);

I frequently receive this exception:

jota.error.ArgumentException: [{"error":"Could not complete request","duration":43}]
    at jota.IotaAPICore.wrapCheckedException(IotaAPICore.java:71)
    at jota.IotaAPICore.getTrytes(IotaAPICore.java:292)
    at jota.IotaAPI.findTransactionsObjectsByHashes(IotaAPI.java:268)
    at jota.IotaAPI.findTransactionObjectsByAddresses(IotaAPI.java:297)
    at jota.IotaAPI.bundlesFromAddresses(IotaAPI.java:132)
    at jota.IotaAPI.getTransfers(IotaAPI.java:116)

Furthermore, this exception only happens for very specific (seed, index) combinations. So it works for the paramers (seed = 'PDIZO...', index = 29), but not for (seed = 'PDIZO...', index = 30). I can call the latter one a hundred times, yet the exception will continue to be thrown every single time. I have tried connecting to different nodes, but this did not help either.

For obvious reason, I will not post any explicit seed in here. If, however, any developer of this repository wants to replicate the error, I will happily provide you with an example seed with a rather low balance.

Also, I'm using the latest snapshot of v0.9.11, not sure whether that's the issue. I'm 80% sure it already happened to me when using v0.9.6.

@runplay
Copy link

runplay commented Apr 24, 2018

Whether this is a bug depends on how many transfers are on the Address (index) you are querying.

if calling seed = 'PDIZO...', index = 30
but there are only 20 transfers on the address, then ArgumentException is correct, in the same way Java will always return indexOutOfBoundException if your calling list.get(20) and the list only consists of 10 items.

Probably not a bug, more feedback/info needed.

Addition: yes a snapshot will affect this as all transfers will have been removed from that address leaving just the balance on the address.

@ezienecker
Copy link
Contributor

@mikrohash is this issue still relevant? Can you provide a sample? meanwhile the code base is a bit different.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants