Timestamp failed to pass the watermark after retrying the configured 3 times

Hi, @kpeacock!

After upgrading agent-js to v1.2 we started to observe the following error during ICP token balance fetching:

Timestamp failed to pass the watermark after retrying the configured 3 times. We cannot guarantee the integrity of the response since it could be a replay attack.

All the other tokens work fine - we’re able to fetch the balance without this error most of the time, but sometimes it appears for other tokens as well. Seems like the probability for this error to appear is something like 95% for ICP and 10% for other tokens.

Maybe, something is wrong with our latency expectations. How do we fix that?

Thanks in advance!

1 Like

Interesting! It may have something to do with the volume of transactions coming through the ICP canister. This is great feedback, and there are a few ways we can handle this.

Things you can do right now

  1. You could wait a second and retry the query if it fails watermarking
  2. You could set a higher retry time count

Things I can do:

  1. Add additional / exponential delay to the retries
  2. Test against the ICP ledger on mainnet and set a more reliable default
1 Like

Thanks! We will try this first thing tomorrow and report back to you.

I don’t know if it helps, but maybe you could reproduce this issue setting the browser into throttling mode.

Yes, retrying more times helps.
Set to 10 just to be sure.


Here’s a PR - I’d appreciate your feedback on the design and naming!

1 Like

I just faced it took in Oisy Wallet. Any progress on the fix?