sw-cyderes opened a new issue, #63954:
URL: https://github.com/apache/airflow/issues/63954
### Apache Airflow version
3.1.8
### If "Other Airflow 3 version" selected, which one?
_No response_
### What happened?
In Airflow 3.1.8, opening the Task Instance view for a running task causes
the UI to crash with a JavaScript error:
RangeError: Invalid time value
at Date.toISOString (<anonymous>)
at b.toISOString (index-NW1ObYqN.js:388:13084)
at index-NW1ObYqN.js:1294:4439
at Array.map (<anonymous>)
at index-NW1ObYqN.js:1294:3967
at Object.useMemo (index-NW1ObYqN.js:70:46914)
at f1.useMemo (index-NW1ObYqN.js:18:7377)
at sws (index-NW1ObYqN.js:1294:3829)
at $ft (index-NW1ObYqN.js:70:34718)
at Jit (index-NW1ObYqN.js:70:63847)
This regression does not occur in Airflow 3.1.7.
The issue appears to be caused by the UI attempting to call
Date.toISOString() on a null or otherwise invalid timestamp field (e.g.,
start_date, queued_dttm, end_date, etc.) while the task is still running.
### What you think should happen instead?
The Task Instance details page should load normally, even if some timestamps
(e.g., end_date) are null for running tasks.
### How to reproduce
1. Trigger a DAG run with at least one long‑running task.
2. While the task is still running, open:
- Grid view → click the running task, or
- Graph view → click the running task
The UI immediately crashes and displays the error
### Operating System
Airflow 3.1.8 docker container
### Versions of Apache Airflow Providers
_No response_
### Deployment
Docker-Compose
### Deployment details
_No response_
### Anything else?
- This issue does not occur in 3.1.7.
- It appears to be a regression introduced in 3.1.8.
- Add defensive checks in the UI before calling:
new Date(value).toISOString()
Specifically, ensure value is a valid date before formatting.
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]