Frozen UI - Drone 0.8.0-rc.5

I’m not a JS developer so I’m stumbling around in the dark a bit here. There seem to be two issues here however, one with the UI being unable to handle invalid time values, the other with Drone inserting invalid time values into the DB for proc start times.

With the :latest version we’ve seen a UI issue (only once so far, but we’ve not run a huge number of builds so far) the root cause seems to be that a proc has had its proc_started set to 0, resulting in a JS error with the UI, causing it to become unresponsive.

Console error:

Uncaught (in promise) RangeError: Invalid time value
  at Date.toISOString (<anonymous>)
  at formatTime (bundle.db478d21eaff85695bb2.js:8945)

From what I can understand it seems like this is an error in an upstream UI dependency not handling invalid time values well however I’ve not been able to track down which one yet.

The issue can be worked around by updating the erroneous epoch to a valid value in the DB.

Steps to reproduce UI Error:

  • Update proc_started value in DB to 0 or other invalid epoch value
  • Navigate to the relevant proc’s logs in the UI or the relevant job

Steps that have reproduced the issue with 0 value being inserted into the DB as the proc_start time:

  • Create a pipeline with a build step followed by 2 Docker (our custom ECR implementation) plugin publish steps
  • First publish successfully completes, second also seems to complete however the UI freezes and the proc start time is never updated

Hi @gjtempleton , we’re seeing the same problem on our drone on version 0.8.1.

I have also traced the issue to formatTime() and start being set to undefined. In our case, the jobs that trigger this bug are never loadable in the UI and display the text “Loading…” forever. Pausing on exceptions shows that execution stops in formatTime().

Did you figure out any kind of workaround for this?

Followup: it looks like this is related to group: and was fixed here:

https://github.com/drone/drone/pull/2239

but possibly not released yet. Workaround may be to not use group:

we release a new image on every push to master, so you can always get the latest changes at drone/drone:latest