Public note crashes status page #1892

Closed
opened 2026-04-05 16:37:46 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @lauw70 on 6/22/2023

Describe the bug
Once I add a public note to an active incident and subsequently refresh the status page, it fails to load.
There is an exception thrown in the console about a Date being undefined.
This result in the status page (preview) showing a blank page.

react-dom.production.min.js:189 Error: Invalid date
    at OneUptimeDate.fromString (Date.ts:490:15)
    at OneUptimeDate.isAfter (Date.ts:329:26)
    at eval (Detail.tsx:112:16)
    at Array.sort (<anonymous>)
    at getIncidentEventItem (Detail.tsx:111:14)
    at eval (Overview.tsx:571:41)
    at Array.map (<anonymous>)
    at Overview_Overview (Overview.tsx:566:43)
    at Xh (react-dom.production.min.js:167:135)
    at dj (react-dom.production.min.js:197:256)

it's from the line throw new BadDataException('Invalid date');

To Reproduce
Steps to reproduce the behavior:

  • create a monitor
  • create an incident for that monitor
  • create a status page
  • display the monitor on the status page
  • navigate to the status page preview -> works
  • create a public note for the incident
  • reload the status page preview -> exception

Expected behavior
I would expect the incident note to be displayed.

Desktop (please complete the following information):

  • OS: MacOS
  • Browser Chrome
  • Version: Version 114.0.5735.133 (Official Build) (arm64)

Additional context
The incident I'm testing with: https://oneuptime.com/dashboard/c327b326-bd80-4b88-ad71-4543948c283a/incidents/22f72448-a65f-48c4-aa61-0d203cea46c4/public-notes

*Originally created by @lauw70 on 6/22/2023* **Describe the bug** Once I add a public note to an active incident and subsequently refresh the status page, it fails to load. There is an exception thrown in the console about a Date being undefined. This result in the status page (preview) showing a blank page. ``` react-dom.production.min.js:189 Error: Invalid date at OneUptimeDate.fromString (Date.ts:490:15) at OneUptimeDate.isAfter (Date.ts:329:26) at eval (Detail.tsx:112:16) at Array.sort (<anonymous>) at getIncidentEventItem (Detail.tsx:111:14) at eval (Overview.tsx:571:41) at Array.map (<anonymous>) at Overview_Overview (Overview.tsx:566:43) at Xh (react-dom.production.min.js:167:135) at dj (react-dom.production.min.js:197:256) ``` it's from the line `throw new BadDataException('Invalid date');` **To Reproduce** Steps to reproduce the behavior: - create a monitor - create an incident for that monitor - create a status page - display the monitor on the status page - navigate to the status page preview -> works - create a public note for the incident - reload the status page preview -> exception **Expected behavior** I would expect the incident note to be displayed. **Desktop (please complete the following information):** - OS: MacOS - Browser Chrome - Version: Version 114.0.5735.133 (Official Build) (arm64) **Additional context** The incident I'm testing with: https://oneuptime.com/dashboard/c327b326-bd80-4b88-ad71-4543948c283a/incidents/22f72448-a65f-48c4-aa61-0d203cea46c4/public-notes
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/oneuptime#1892