[GH-ISSUE #1651] RangeError: date value is not finite in DateTimeFormat.format() #1152

Closed
opened 2026-05-07 00:30:37 +02:00 by BreizhHardware · 4 comments

Originally created by @Pulsar7 on GitHub (Mar 12, 2026).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1651

🐞 Describe the bug

When trying to access the /account-path via the Web UI, the error page 'Oh no, ntfy crashed' is displayed.

Those feature-flags are set in the server.yaml-configuration:

enable-signup: false                                                                                                                                     
require-login: true                                                                                                                  
enable-login: true                                                                                                                   
enable-reservations: false
  • Used Container-Image: docker.io/binwiederhier/ntfy:v2.18

💻 Components impacted

ntfy-server or/and web-app

I'm not sure, if it's a specific Browser-related Problem, since I've only tested it with Firefox (Version 148.0 (64-bit) - Snap) and Brave (Brave 1.88.127 (Official Build) (64-bit)).

💡 Screenshots and/or logs

Strack-Trace from the Firefox-Browser, when trying to access /account:

RangeError: date value is not finite in DateTimeFormat.format()
  at t=[...e];for (http://localhost:5000/static/media/index-C9HKW624.js:414:289)
  at M (http://localhost:5000/static/media/index-C9HKW624.js:37902:395)
  at M (http://localhost:5000/static/media/index-C9HKW624.js:36833:395)
  at get (http://localhost:5000/static/media/index-C9HKW624.js:48592:48)
  at get (http://localhost:5000/static/media/index-C9HKW624.js:71458:48)
  at get (http://localhost:5000/static/media/index-C9HKW624.js:81851:48)
  at get (http://localhost:5000/static/media/index-C9HKW624.js:117715:48)
  at get (http://localhost:5000/static/media/index-C9HKW624.js:116755:48)
  at get (http://localhost:5000/static/media/index-C9HKW624.js:116583:48)
  at get (http://localhost:5000/static/media/index-C9HKW624.js:113356:48)
  at get (http://localhost:5000/static/media/index-C9HKW624.js:125236:48)
  at unstable_now (http://localhost:5000/static/media/index-C9HKW624.js:1593:25)

RangeError: date value is not finite in DateTimeFormat.format()
  at Aie@http://localhost:5000/static/media/index-C9HKW624.js:395:36083
  at div@unknown:0:0
  at div@unknown:0:0
  at qx/<@http://localhost:5000/static/media/index-C9HKW624.js:56:7037
  at yf<@http://localhost:5000/static/media/index-C9HKW624.js:138:43049
  at div@unknown:0:0
  at qx/<@http://localhost:5000/static/media/index-C9HKW624.js:56:7037
  at na<@http://localhost:5000/static/media/index-C9HKW624.js:64:45645
  at qx/<@http://localhost:5000/static/media/index-C9HKW624.js:56:7037
  at wa<@http://localhost:5000/static/media/index-C9HKW624.js:138:40458
  at Cie@http://localhost:5000/static/media/index-C9HKW624.js:395:35306
  at div@unknown:0:0
  at qx/<@http://localhost:5000/static/media/index-C9HKW624.js:56:7037
  at uI/<@http://localhost:5000/static/media/index-C9HKW624.js:64:17938
  at div@unknown:0:0
  at qx/<@http://localhost:5000/static/media/index-C9HKW624.js:56:7037
  at nI/<@http://localhost:5000/static/media/index-C9HKW624.js:64:16255
  at vie@unknown:0:0
  at vK@http://localhost:5000/static/media/index-C9HKW624.js:243:4102
  at CK@http://localhost:5000/static/media/index-C9HKW624.js:243:7063
  at main@unknown:0:0
  at qx/<@http://localhost:5000/static/media/index-C9HKW624.js:56:7037
  at rz/<@http://localhost:5000/static/media/index-C9HKW624.js:56:32216
  at Mre@http://localhost:5000/static/media/index-C9HKW624.js:413:15798
  at div@unknown:0:0
  at qx/<@http://localhost:5000/static/media/index-C9HKW624.js:56:7037
  at rz/<@http://localhost:5000/static/media/index-C9HKW624.js:56:32216
  at Pre@http://localhost:5000/static/media/index-C9HKW624.js:413:14710
  at vK@http://localhost:5000/static/media/index-C9HKW624.js:243:4102
  at EK@http://localhost:5000/static/media/index-C9HKW624.js:243:7754
  at Rne@http://localhost:5000/static/media/index-C9HKW624.js:376:5897
  at a@http://localhost:5000/static/media/index-C9HKW624.js:253:3123
  at Hz@http://localhost:5000/static/media/index-C9HKW624.js:64:12742
  at qz@http://localhost:5000/static/media/index-C9HKW624.js:64:12593
  at Uz@http://localhost:5000/static/media/index-C9HKW624.js:64:12382
  at Yz@http://localhost:5000/static/media/index-C9HKW624.js:64:14030
  at KI@http://localhost:5000/static/media/index-C9HKW624.js:64:34061
  at AK@http://localhost:5000/static/media/index-C9HKW624.js:243:7215
  at LK@http://localhost:5000/static/media/index-C9HKW624.js:252:906
  at Ore@http://localhost:5000/static/media/index-C9HKW624.js:413:13336
  at Suspense@unknown:0:0
  at Tre@http://localhost:5000/static/media/index-C9HKW624.js:413:13491

Strack-Trace from the Brave-Browser, when trying to access /account:

RangeError: Invalid time value
  at t=[...e];for (http://localhost:5000/static/media/index-C9HKW624.js:414:289)
  at M (http://localhost:5000/static/media/index-C9HKW624.js:37902:395)
  at M (http://localhost:5000/static/media/index-C9HKW624.js:36833:395)
  at get (http://localhost:5000/static/media/index-C9HKW624.js:48592:48)
  at get (http://localhost:5000/static/media/index-C9HKW624.js:71458:48)
  at get (http://localhost:5000/static/media/index-C9HKW624.js:81851:48)
  at get (http://localhost:5000/static/media/index-C9HKW624.js:117713:48)
  at get (http://localhost:5000/static/media/index-C9HKW624.js:116753:48)
  at get (http://localhost:5000/static/media/index-C9HKW624.js:116583:48)

RangeError: Invalid time value
  at at Aie (http://localhost:5000/static/media/index-C9HKW624.js:395:36083)
  at     at div (<anonymous>)
  at     at div (<anonymous>)
  at     at http://localhost:5000/static/media/index-C9HKW624.js:56:7037
  at     at http://localhost:5000/static/media/index-C9HKW624.js:138:43047
  at     at div (<anonymous>)
  at     at http://localhost:5000/static/media/index-C9HKW624.js:56:7037
  at     at http://localhost:5000/static/media/index-C9HKW624.js:64:45643
  at     at http://localhost:5000/static/media/index-C9HKW624.js:56:7037
  at     at http://localhost:5000/static/media/index-C9HKW624.js:138:40456
  at     at Cie (http://localhost:5000/static/media/index-C9HKW624.js:395:35306)
  at     at div (<anonymous>)
  at     at http://localhost:5000/static/media/index-C9HKW624.js:56:7037
  at     at http://localhost:5000/static/media/index-C9HKW624.js:64:17937
  at     at div (<anonymous>)
  at     at http://localhost:5000/static/media/index-C9HKW624.js:56:7037
  at     at http://localhost:5000/static/media/index-C9HKW624.js:64:16254
  at     at vie (<anonymous>)
  at     at vK (http://localhost:5000/static/media/index-C9HKW624.js:243:4080)
  at     at CK (http://localhost:5000/static/media/index-C9HKW624.js:243:7065)
  at     at main (<anonymous>)
  at     at http://localhost:5000/static/media/index-C9HKW624.js:56:7037
  at     at http://localhost:5000/static/media/index-C9HKW624.js:56:32214
  at     at Mre (http://localhost:5000/static/media/index-C9HKW624.js:413:15809)
  at     at div (<anonymous>)
  at     at http://localhost:5000/static/media/index-C9HKW624.js:56:7037
  at     at http://localhost:5000/static/media/index-C9HKW624.js:56:32214
  at     at Pre (http://localhost:5000/static/media/index-C9HKW624.js:413:14710)
  at     at vK (http://localhost:5000/static/media/index-C9HKW624.js:243:4080)
  at     at EK (http://localhost:5000/static/media/index-C9HKW624.js:243:7740)
  at     at Rne (http://localhost:5000/static/media/index-C9HKW624.js:376:5897)
  at     at a (http://localhost:5000/static/media/index-C9HKW624.js:253:3125)
  at     at Hz (http://localhost:5000/static/media/index-C9HKW624.js:64:12750)
  at     at qz (http://localhost:5000/static/media/index-C9HKW624.js:64:12590)
  at     at Uz (http://localhost:5000/static/media/index-C9HKW624.js:64:12371)
  at     at Yz (http://localhost:5000/static/media/index-C9HKW624.js:64:14009)
  at     at KI (http://localhost:5000/static/media/index-C9HKW624.js:64:34058)
  at     at AK (http://localhost:5000/static/media/index-C9HKW624.js:243:7124)
  at     at LK (http://localhost:5000/static/media/index-C9HKW624.js:252:874)
  at     at Ore (http://localhost:5000/static/media/index-C9HKW624.js:413:13347)
  at     at Suspense (<anonymous>)
  at     at Tre (http://localhost:5000/static/media/index-C9HKW624.js:413:13491)

🔮 Additional context

At the Brave-Browser I think I was able to identify the Problem at utils.js:

export const formatShortDateTime = (timestamp, language) =>
  new Intl.DateTimeFormat(getKebabCaseLangStr(language), {
    dateStyle: "short",
    timeStyle: "short",
  }).format(new Date(timestamp * 1000));

which gets called by Account.jsx:

<span>{formatShortDateTime(token.last_access, i18n.language)}</span>

I don't know if this StackOverflow-Post is related to this issue and I'm not a React-Programmer, but this seems to me, that this might be helpful: https://stackoverflow.com/questions/63958875/why-do-i-get-rangeerror-date-value-is-not-finite-in-datetimeformat-format-w

Originally created by @Pulsar7 on GitHub (Mar 12, 2026). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1651 :lady_beetle: **Describe the bug** <!-- A clear and concise description of the problem. --> When trying to access the `/account`-path via the Web UI, the error page 'Oh no, ntfy crashed' is displayed. Those feature-flags are set in the `server.yaml`-configuration: ``` enable-signup: false require-login: true enable-login: true enable-reservations: false ``` - **Used Container-Image**: docker.io/binwiederhier/ntfy:v2.18 :computer: **Components impacted** <!-- ntfy server, Android app, iOS app, web app --> ntfy-server or/and web-app I'm not sure, if it's a specific Browser-related Problem, since I've only tested it with Firefox (Version 148.0 (64-bit) - Snap) and Brave (Brave 1.88.127 (Official Build) (64-bit)). :bulb: **Screenshots and/or logs** <!-- If applicable, add screenshots or share logs help explain your problem. To get logs from the ... - ntfy server: Enable "log-level: trace" in your server.yml file - Android app: Go to "Settings" -> "Record logs", then eventually "Copy/upload logs" - web app: Press "F12" and find the "Console" window --> Strack-Trace from the **Firefox**-Browser, when trying to access `/account`: ``` RangeError: date value is not finite in DateTimeFormat.format() at t=[...e];for (http://localhost:5000/static/media/index-C9HKW624.js:414:289) at M (http://localhost:5000/static/media/index-C9HKW624.js:37902:395) at M (http://localhost:5000/static/media/index-C9HKW624.js:36833:395) at get (http://localhost:5000/static/media/index-C9HKW624.js:48592:48) at get (http://localhost:5000/static/media/index-C9HKW624.js:71458:48) at get (http://localhost:5000/static/media/index-C9HKW624.js:81851:48) at get (http://localhost:5000/static/media/index-C9HKW624.js:117715:48) at get (http://localhost:5000/static/media/index-C9HKW624.js:116755:48) at get (http://localhost:5000/static/media/index-C9HKW624.js:116583:48) at get (http://localhost:5000/static/media/index-C9HKW624.js:113356:48) at get (http://localhost:5000/static/media/index-C9HKW624.js:125236:48) at unstable_now (http://localhost:5000/static/media/index-C9HKW624.js:1593:25) RangeError: date value is not finite in DateTimeFormat.format() at Aie@http://localhost:5000/static/media/index-C9HKW624.js:395:36083 at div@unknown:0:0 at div@unknown:0:0 at qx/<@http://localhost:5000/static/media/index-C9HKW624.js:56:7037 at yf<@http://localhost:5000/static/media/index-C9HKW624.js:138:43049 at div@unknown:0:0 at qx/<@http://localhost:5000/static/media/index-C9HKW624.js:56:7037 at na<@http://localhost:5000/static/media/index-C9HKW624.js:64:45645 at qx/<@http://localhost:5000/static/media/index-C9HKW624.js:56:7037 at wa<@http://localhost:5000/static/media/index-C9HKW624.js:138:40458 at Cie@http://localhost:5000/static/media/index-C9HKW624.js:395:35306 at div@unknown:0:0 at qx/<@http://localhost:5000/static/media/index-C9HKW624.js:56:7037 at uI/<@http://localhost:5000/static/media/index-C9HKW624.js:64:17938 at div@unknown:0:0 at qx/<@http://localhost:5000/static/media/index-C9HKW624.js:56:7037 at nI/<@http://localhost:5000/static/media/index-C9HKW624.js:64:16255 at vie@unknown:0:0 at vK@http://localhost:5000/static/media/index-C9HKW624.js:243:4102 at CK@http://localhost:5000/static/media/index-C9HKW624.js:243:7063 at main@unknown:0:0 at qx/<@http://localhost:5000/static/media/index-C9HKW624.js:56:7037 at rz/<@http://localhost:5000/static/media/index-C9HKW624.js:56:32216 at Mre@http://localhost:5000/static/media/index-C9HKW624.js:413:15798 at div@unknown:0:0 at qx/<@http://localhost:5000/static/media/index-C9HKW624.js:56:7037 at rz/<@http://localhost:5000/static/media/index-C9HKW624.js:56:32216 at Pre@http://localhost:5000/static/media/index-C9HKW624.js:413:14710 at vK@http://localhost:5000/static/media/index-C9HKW624.js:243:4102 at EK@http://localhost:5000/static/media/index-C9HKW624.js:243:7754 at Rne@http://localhost:5000/static/media/index-C9HKW624.js:376:5897 at a@http://localhost:5000/static/media/index-C9HKW624.js:253:3123 at Hz@http://localhost:5000/static/media/index-C9HKW624.js:64:12742 at qz@http://localhost:5000/static/media/index-C9HKW624.js:64:12593 at Uz@http://localhost:5000/static/media/index-C9HKW624.js:64:12382 at Yz@http://localhost:5000/static/media/index-C9HKW624.js:64:14030 at KI@http://localhost:5000/static/media/index-C9HKW624.js:64:34061 at AK@http://localhost:5000/static/media/index-C9HKW624.js:243:7215 at LK@http://localhost:5000/static/media/index-C9HKW624.js:252:906 at Ore@http://localhost:5000/static/media/index-C9HKW624.js:413:13336 at Suspense@unknown:0:0 at Tre@http://localhost:5000/static/media/index-C9HKW624.js:413:13491 ``` Strack-Trace from the **Brave**-Browser, when trying to access `/account`: ``` RangeError: Invalid time value at t=[...e];for (http://localhost:5000/static/media/index-C9HKW624.js:414:289) at M (http://localhost:5000/static/media/index-C9HKW624.js:37902:395) at M (http://localhost:5000/static/media/index-C9HKW624.js:36833:395) at get (http://localhost:5000/static/media/index-C9HKW624.js:48592:48) at get (http://localhost:5000/static/media/index-C9HKW624.js:71458:48) at get (http://localhost:5000/static/media/index-C9HKW624.js:81851:48) at get (http://localhost:5000/static/media/index-C9HKW624.js:117713:48) at get (http://localhost:5000/static/media/index-C9HKW624.js:116753:48) at get (http://localhost:5000/static/media/index-C9HKW624.js:116583:48) RangeError: Invalid time value at at Aie (http://localhost:5000/static/media/index-C9HKW624.js:395:36083) at at div (<anonymous>) at at div (<anonymous>) at at http://localhost:5000/static/media/index-C9HKW624.js:56:7037 at at http://localhost:5000/static/media/index-C9HKW624.js:138:43047 at at div (<anonymous>) at at http://localhost:5000/static/media/index-C9HKW624.js:56:7037 at at http://localhost:5000/static/media/index-C9HKW624.js:64:45643 at at http://localhost:5000/static/media/index-C9HKW624.js:56:7037 at at http://localhost:5000/static/media/index-C9HKW624.js:138:40456 at at Cie (http://localhost:5000/static/media/index-C9HKW624.js:395:35306) at at div (<anonymous>) at at http://localhost:5000/static/media/index-C9HKW624.js:56:7037 at at http://localhost:5000/static/media/index-C9HKW624.js:64:17937 at at div (<anonymous>) at at http://localhost:5000/static/media/index-C9HKW624.js:56:7037 at at http://localhost:5000/static/media/index-C9HKW624.js:64:16254 at at vie (<anonymous>) at at vK (http://localhost:5000/static/media/index-C9HKW624.js:243:4080) at at CK (http://localhost:5000/static/media/index-C9HKW624.js:243:7065) at at main (<anonymous>) at at http://localhost:5000/static/media/index-C9HKW624.js:56:7037 at at http://localhost:5000/static/media/index-C9HKW624.js:56:32214 at at Mre (http://localhost:5000/static/media/index-C9HKW624.js:413:15809) at at div (<anonymous>) at at http://localhost:5000/static/media/index-C9HKW624.js:56:7037 at at http://localhost:5000/static/media/index-C9HKW624.js:56:32214 at at Pre (http://localhost:5000/static/media/index-C9HKW624.js:413:14710) at at vK (http://localhost:5000/static/media/index-C9HKW624.js:243:4080) at at EK (http://localhost:5000/static/media/index-C9HKW624.js:243:7740) at at Rne (http://localhost:5000/static/media/index-C9HKW624.js:376:5897) at at a (http://localhost:5000/static/media/index-C9HKW624.js:253:3125) at at Hz (http://localhost:5000/static/media/index-C9HKW624.js:64:12750) at at qz (http://localhost:5000/static/media/index-C9HKW624.js:64:12590) at at Uz (http://localhost:5000/static/media/index-C9HKW624.js:64:12371) at at Yz (http://localhost:5000/static/media/index-C9HKW624.js:64:14009) at at KI (http://localhost:5000/static/media/index-C9HKW624.js:64:34058) at at AK (http://localhost:5000/static/media/index-C9HKW624.js:243:7124) at at LK (http://localhost:5000/static/media/index-C9HKW624.js:252:874) at at Ore (http://localhost:5000/static/media/index-C9HKW624.js:413:13347) at at Suspense (<anonymous>) at at Tre (http://localhost:5000/static/media/index-C9HKW624.js:413:13491) ``` :crystal_ball: **Additional context** <!-- Add any other context about the problem here. --> At the **Brave**-Browser I think I was able to identify the Problem at `utils.js`: ``` export const formatShortDateTime = (timestamp, language) => new Intl.DateTimeFormat(getKebabCaseLangStr(language), { dateStyle: "short", timeStyle: "short", }).format(new Date(timestamp * 1000)); ``` which gets called by `Account.jsx`: ``` <span>{formatShortDateTime(token.last_access, i18n.language)}</span> ``` I don't know if this StackOverflow-Post is related to this issue and I'm not a `React`-Programmer, but this seems to me, that this might be helpful: https://stackoverflow.com/questions/63958875/why-do-i-get-rangeerror-date-value-is-not-finite-in-datetimeformat-format-w
BreizhHardware 2026-05-07 00:30:37 +02:00
  • closed this issue
  • added the
    🪲 bug
    label
Author
Owner

@MrPostie commented on GitHub (Mar 18, 2026):

Just installed ntfy in a docker container, got the same error.

<!-- gh-comment-id:4081498345 --> @MrPostie commented on GitHub (Mar 18, 2026): Just installed ntfy in a docker container, got the same error.
Author
Owner

@krzaktak commented on GitHub (Mar 20, 2026):

I have the same problem. But I investigated it, and my problem is related to token pre-provisioned in Docker Compose. The date of this token is "01 Jan 70 00:00 UTC (server config)". And when I removed this token from Docker Compose, the problem disappeared.

<!-- gh-comment-id:4101347122 --> @krzaktak commented on GitHub (Mar 20, 2026): I have the same problem. But I investigated it, and my problem is related to token pre-provisioned in Docker Compose. The date of this token is "01 Jan 70 00:00 UTC (server config)". And when I removed this token from Docker Compose, the problem disappeared.
Author
Owner

@zanetdev commented on GitHub (Mar 21, 2026):

It is related to the last access time.
Temporary fix is to make use of the token to publish a message which will set that date to a valid value

eg add this life cycle hook section to your docker compose where the service is named ntfy

    post_start:
      - command: |
          sh -c '
          i=1
          max_retries=10
          while [ $$i -le $$max_retries ]; do
            if ntfy publish --token tk_yourprovisionedtoken http://ntfy/general "ntfy started"; then
              echo "Success on attempt $$i"
              break
            fi
            echo "Attempt $$i failed, retrying in 5 seconds..."
            i=$$((i + 1))
            sleep 5
          done
          '
        user: root
<!-- gh-comment-id:4102480264 --> @zanetdev commented on GitHub (Mar 21, 2026): It is related to the last access time. Temporary fix is to make use of the token to publish a message which will set that date to a valid value eg add this life cycle hook section to your docker compose where the service is named ntfy ``` post_start: - command: | sh -c ' i=1 max_retries=10 while [ $$i -le $$max_retries ]; do if ntfy publish --token tk_yourprovisionedtoken http://ntfy/general "ntfy started"; then echo "Success on attempt $$i" break fi echo "Attempt $$i failed, retrying in 5 seconds..." i=$$((i + 1)) sleep 5 done ' user: root ```
Author
Owner

@binwiederhier commented on GitHub (Apr 13, 2026):

Thanks for the workaround @zanetdev !

<!-- gh-comment-id:4236418970 --> @binwiederhier commented on GitHub (Apr 13, 2026): Thanks for the workaround @zanetdev !
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#1152
No description provided.