I am running a heroku server and trying to talk to a canister on mainnet.
I am encountering an error quite frequently where I am being told that my time is ahead of the IC network and I am before time expiry. This is the full error I am seeing:
Body: Specified ingress_expiry not within expected range:
Minimum allowed expiry: 2024-08-08 12:06:05.276014545 UTC,
Maximum allowed expiry: 2024-08-08 12:11:35.276014545 UTC,
Provided expiry: 2024-08-08 12:06:00 UTC
I have looked into changing the time/resyncing the time of my heroku server but it seems to be correct and uses AWS to sync the time. So it is likely that my server time is correct.
I have tried using the syncTime function on the agent i am trying to use but it doesn’t seem to change anything.
Not the same error message but, it sounds vaguely similar to the SSG issue I encountered this weekend. @kpeacock said there might be an inssue with syncTime:
The IC seems to be a bit ahead by 6 seconds or so. IIRC, the provided timestamp in the ingress cannot be in the past but can be (up to 5mins) in the future.
Perhaps shift the timestamp in the ingress message by, say, 30secs into the future?
Unfortunately I am not familiar with the js agent (which is probably what you use to create the transactions). Perhaps there’s an option to set the timestamp explicitly? I think in the Rust version of the agent that is possible (but i’m not familiar with that one either )