# Error 404 - ingress\_expiry not within expected range

**URL:** <https://forum.dfinity.org/t/error-404-ingress-expiry-not-within-expected-range/19803>\
**Category:** Developers\
**Created:** [May 5, 2023, 7:05pm UTC](https://forum.dfinity.org/t/error-404-ingress-expiry-not-within-expected-range/19803 "2023-05-05T19:05:31Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![juanpablodr](https://avatars.discourse-cdn.com/v4/letter/j/3da27b/32.png) [@juanpablodr](https://forum.dfinity.org/u/juanpablodr)\
**Post date:** [May 5, 2023, 7:05pm UTC](https://forum.dfinity.org/t/error-404-ingress-expiry-not-within-expected-range/19803/1 "2023-05-05T19:05:31Z")

</div>

Hi everyone. I’ve deployed a static page in the IC network, and it’s working fine from my PC, but in my phone i’m getting a 400 error → “Specified ingress\_expiry not within expected range”.  
I know that the time in my phone is wrong. (some minutes behind).

Does anybody know if that could be the cause? ( wrong time in device ).

Thanks in advance.

This is the error:

I get a 502 error on GET on the CANISTER [ID+.icp0.io](http://ID+.icp0.io)  
followed by:

Error: Server returned an error:  
Code: 400 ()  
Body: Specified ingress\_expiry not within expected range:  
Minimum allowed expiry: 2023-05-05 18:44:13.779647122 UTC  
Maximum allowed expiry: 2023-05-05 18:49:43.779647122 UTC  
Provided expiry: 2023-05-05 18:50:54.017 UTC  
Local replica time: 2023-05-05 18:44:13.779647633 UTC

```
at M.query (index.js:230:19)
at async actor.js:155:19
at async Oe (utils.ts:110:13)
at async Gr.assetRequestHandler (index.ts:84:19)
at async Gr.perform (index.ts:36:19)

```

---

<div class="post-metadata">

**Author:** ![domwoe](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/domwoe/32/5165_2.png) [@domwoe](https://forum.dfinity.org/u/domwoe)\
**Post date:** [May 5, 2023, 7:35pm UTC](https://forum.dfinity.org/t/error-404-ingress-expiry-not-within-expected-range/19803/2 "2023-05-05T19:35:33Z")

</div>

Hi @juanpablodr,

yes, that explains the issue. Ingress messages have an expiration time of 5 mins, i.e. if your clock lacks behind more than that, then the IC won’t accept your message.

---

<div class="post-metadata">

**Author:** ![juanpablodr](https://avatars.discourse-cdn.com/v4/letter/j/3da27b/32.png) [@juanpablodr](https://forum.dfinity.org/u/juanpablodr)\
**Post date:** [May 5, 2023, 8:14pm UTC](https://forum.dfinity.org/t/error-404-ingress-expiry-not-within-expected-range/19803/3 "2023-05-05T20:14:05Z")

</div>

Thanks for the answer domwoe. Do you know if that’s something I can change, i.e. in my canister parameters ? ( In case my question is totally nonsense, forgive my lack of knowledge about how the IC works ).  
I’m aware that hosting a simple static page is not the main purpose of the IC…, and also most people have the time properly configured on their devices…I know that.  
But sadly I can’t host this page in the IC if I could have this “issue” with other people I could share the page with.

Thank you again for your time.

---

<div class="post-metadata">

**Author:** ![domwoe](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/domwoe/32/5165_2.png) [@domwoe](https://forum.dfinity.org/u/domwoe)\
**Post date:** [May 6, 2023, 7:51am UTC](https://forum.dfinity.org/t/error-404-ingress-expiry-not-within-expected-range/19803/4 "2023-05-06T07:51:50Z")

</div>

> [@juanpablodr](#):
>
> Do you know if that’s something I can change, i.e. in my canister parameters ?

Unfortunatley not. This is a global mechanism to prevent replay attacks without having to keep track of nonces for a long time.

May I ask why you don’t sync the time on your phone?

---

<div class="post-metadata">

**Author:** ![juanpablodr](https://avatars.discourse-cdn.com/v4/letter/j/3da27b/32.png) [@juanpablodr](https://forum.dfinity.org/u/juanpablodr)\
**Post date:** [May 8, 2023, 1:54pm UTC](https://forum.dfinity.org/t/error-404-ingress-expiry-not-within-expected-range/19803/5 "2023-05-08T13:54:47Z")

</div>

There isn’t any technical reason. You may laugh, but somehow using my phone some minutes ahead helps me with my daily tasks.  
I’ve noticed that old pages with the previous postfix (raw.ic0.app) work fine on my phone. Probably this new logic was implemented after the change in the urls.  
I never have problems with other pages though, hosted in other platforms.

Anyway, thank you for your answers domwoe! Everyday you learn something new here.

---

<div class="post-metadata">

**Author:** ![NathanosDev](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/nathanosdev/32/7204_2.png) [@NathanosDev](https://forum.dfinity.org/u/NathanosDev)\
**Post date:** [May 8, 2023, 1:57pm UTC](https://forum.dfinity.org/t/error-404-ingress-expiry-not-within-expected-range/19803/6 "2023-05-08T13:57:17Z")

</div>

The reason that `raw.ic0.app` works is because the timecode check is done server side rather than on your mobile device. On the “new” URLs, that check runs locally (via the service worker).

---

<div class="post-metadata">

**Author:** ![juanpablodr](https://avatars.discourse-cdn.com/v4/letter/j/3da27b/32.png) [@juanpablodr](https://forum.dfinity.org/u/juanpablodr)\
**Post date:** [May 8, 2023, 2:19pm UTC](https://forum.dfinity.org/t/error-404-ingress-expiry-not-within-expected-range/19803/7 "2023-05-08T14:19:58Z")

</div>

Thank you Nathanos for taking the time to reply and helping me understand (even more) how this works.

---

<div class="post-metadata">

**Author:** ![xalkan](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/xalkan/32/16076_2.png) [@xalkan](https://forum.dfinity.org/u/xalkan)\
**Post date:** [April 18, 2024, 3:56pm UTC](https://forum.dfinity.org/t/error-404-ingress-expiry-not-within-expected-range/19803/8 "2024-04-18T15:56:08Z")

</div>

Hi, is anyone else experiencing this issue? I’m getting the following when using the default for Mac ([time.apple.com](http://time.apple.com)): `Code: 400 () Body: Specified ingress_expiry not within expected range: Minimum allowed expiry: 2024-04-18 15:31:34.119747076 UTC, Maximum allowed expiry: 2024-04-18 15:37:04.119747076 UTC, Provided expiry: 2024-04-18 15:31:00 UTC`. I recently updated the time manually, one minute forward, but now I’m getting this error again. I’m worried users will have a difficult time figuring this out.

---

<div class="post-metadata">

**Author:** ![xalkan](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/xalkan/32/16076_2.png) [@xalkan](https://forum.dfinity.org/u/xalkan)\
**Post date:** [April 22, 2024, 11:51am UTC](https://forum.dfinity.org/t/error-404-ingress-expiry-not-within-expected-range/19803/9 "2024-04-22T11:51:13Z")

</div>

gm, I kept updating my computer’s time manually, but this error still shows up from time to time (quite often, unfortunately). Is there any recommended approach to overcome it?

 ![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/3X/e/d/ed7f2f1be2b93b36da0215dd2b68ae2d4957b91d.png)

---

<div class="post-metadata">

**Author:** ![Alishan](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@Alishan](https://forum.dfinity.org/u/Alishan)\
**Post date:** [September 22, 2024, 12:50pm UTC](https://forum.dfinity.org/t/error-404-ingress-expiry-not-within-expected-range/19803/10 "2024-09-22T12:50:32Z")

</div>

i am also facing this error .

---

<div class="post-metadata">

**Author:** ![jennifertran](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jennifertran/32/11558_2.png) [@jennifertran](https://forum.dfinity.org/u/jennifertran)\
**Post date:** [September 23, 2024, 5:45am UTC](https://forum.dfinity.org/t/error-404-ingress-expiry-not-within-expected-range/19803/11 "2024-09-23T05:45:29Z")

</div>

What is your canister ID or what subnet are you on?

---

<div class="post-metadata">

**Author:** ![Alishan](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@Alishan](https://forum.dfinity.org/u/Alishan)\
**Post date:** [September 23, 2024, 12:37pm UTC](https://forum.dfinity.org/t/error-404-ingress-expiry-not-within-expected-range/19803/12 "2024-09-23T12:37:11Z")

</div>

can i ask why you need canister id?

---

<div class="post-metadata">

**Author:** ![jennifertran](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jennifertran/32/11558_2.png) [@jennifertran](https://forum.dfinity.org/u/jennifertran)\
**Post date:** [September 23, 2024, 4:53pm UTC](https://forum.dfinity.org/t/error-404-ingress-expiry-not-within-expected-range/19803/13 "2024-09-23T16:53:01Z")

</div>

I have seen this error occur in a specific subnet so I also wanted to confirm the subnet that you are on. You don’t have to tell me the canister ID - just the subnet if you know what it is.

---

<div class="post-metadata">

**Author:** ![Alishan](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@Alishan](https://forum.dfinity.org/u/Alishan)\
**Post date:** [September 23, 2024, 5:15pm UTC](https://forum.dfinity.org/t/error-404-ingress-expiry-not-within-expected-range/19803/14 "2024-09-23T17:15:19Z")

</div>

> **[Subnet: 6pbhf-qzpdk-kuqbr-pklfa-5ehhf-jfjps-zsj6q-57nrl-kzhpd-mu7hc-vae](https://dashboard.internetcomputer.org/subnet/6pbhf-qzpdk-kuqbr-pklfa-5ehhf-jfjps-zsj6q-57nrl-kzhpd-mu7hc-vae)**
>
> Application subnet blockchain which hosts canister smart contracts and adds capacity to the Internet Computer.

---

<div class="post-metadata">

**Author:** ![jennifertran](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jennifertran/32/11558_2.png) [@jennifertran](https://forum.dfinity.org/u/jennifertran)\
**Post date:** [September 23, 2024, 6:51pm UTC](https://forum.dfinity.org/t/error-404-ingress-expiry-not-within-expected-range/19803/15 "2024-09-23T18:51:20Z")

</div>

Thank you, it’s not one of the subnets that I have on my radar.

In the latest AgentJS release, you can set a specific `replicaTime`. Can you please try that and see if it helps?

> [@Agent-JS 2.1.0 is Released!](https://forum.dfinity.org/t/agent-js-2-1-0-is-released/35090):
>
> Noteworthy Features This feature includes the v3 synchronous call API! Calls to mainnet are able to bypass polling using the new endpoint The HttpAgent allows you to set and read replicaTime, which it will maintain information about in order to handle disagreements between the client and replica about time. Fixes and improvements for the useAuthClient library Full release notes: [Release Release 2.1.0 · dfinity/agent-js · GitHub](https://github.com/dfinity/agent-js/releases/tag/v2.1.0)

---

<div class="post-metadata">

**Author:** ![Alishan](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@Alishan](https://forum.dfinity.org/u/Alishan)\
**Post date:** [September 24, 2024, 6:49am UTC](https://forum.dfinity.org/t/error-404-ingress-expiry-not-within-expected-range/19803/16 "2024-09-24T06:49:52Z")

</div>

how i can set specific replicaTime?

---

<div class="post-metadata">

**Author:** ![BustyBeardo](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/bustybeardo/32/16506_2.png) [@BustyBeardo](https://forum.dfinity.org/u/BustyBeardo)\
**Post date:** [September 25, 2024, 1:15pm UTC](https://forum.dfinity.org/t/error-404-ingress-expiry-not-within-expected-range/19803/17 "2024-09-25T13:15:35Z")

</div>

> [@jennifertran](#):
>
> replicaTime

How Can i set replica time?

---

<div class="post-metadata">

**Author:** ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)\
**Post date:** [September 27, 2024, 1:57pm UTC](https://forum.dfinity.org/t/error-404-ingress-expiry-not-within-expected-range/19803/18 "2024-09-27T13:57:03Z")

</div>

We are not certain but, there might be a bug? If interested to give a hand testing please follow-up in following post.

> [@Ingress Expiry Issue - Your Input Needed!](https://forum.dfinity.org/t/ingress-expiry-issue-your-input-needed/35609):
>
> Hi everyone wave, Over the past few weeks, there have been several reports on the forum from devs encountering ingress expiry issues, such as the following: Error: ReplicaTimeError: Specified ingress\_expiry not within expected range: Minimum allowed expiry: 2024-09-25 13:57:00.580809774 UTC, Maximum allowed expiry: 2024-09-25 14:02:30.580809774 UTC, Provided expiry: 2024-09-25 13:57:00 UTC While we provided some valid explanations and future improvements in various threads yesterday (for …

PS @xalkan if interesting, I can build you a next version of Juno which point to agent-js v2.0.0 if you want to give it a try? But I think in your case it wasn’t the issue, not sure anymore.

---

<div class="post-metadata">

**Author:** ![Gwojda](https://avatars.discourse-cdn.com/v4/letter/g/5fc32e/32.png) [@Gwojda](https://forum.dfinity.org/u/Gwojda)\
**Post date:** [September 27, 2024, 2:35pm UTC](https://forum.dfinity.org/t/error-404-ingress-expiry-not-within-expected-range/19803/19 "2024-09-27T14:35:22Z")

</div>

Hey,  
I’m also facing this kind of issue, but only when i’m home where i dont have IPV6, or on some VM where i dont have ipv6 neither. At office, or in 5g with ipv6 it’s working correctly.  
Do you know why?  
Thanks

---

<div class="post-metadata">

**Author:** ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)\
**Post date:** [September 27, 2024, 6:19pm UTC](https://forum.dfinity.org/t/error-404-ingress-expiry-not-within-expected-range/19803/20 "2024-09-27T18:19:26Z")

</div>

No but I can share your feedback.

[Next page](https://forum.dfinity.org/t/error-404-ingress-expiry-not-within-expected-range/19803.md?page=2)
