Page MenuHomePhabricator

Intermittent "Cannot read property 'setNaturalOrder' of undefined" quick-editing tasks from workboard
Closed, ResolvedPublic

Description

Around 5% of edits to a task from the project's workboard will just leave the screen greyed out, instead of showing the workboard again. I am not sure what causes this.

Reproduction steps:

  1. Navigate to a large workboard in a project.
  2. Click the "pencil" icon on a task to go into quick edit mode.
  3. Update the "points" or "priority" field.
  4. Press save.

Occasionally, the unexpected result is:

  • Greyed out screen, and JS error in the console.

Chrome gets the stacktrace as:

core.pkg.js:193 Uncaught TypeError: Cannot read property 'setNaturalOrder' of undefined
updateCard   @ WorkboardBoard.js:formatted:148
_onload      @ core.pkg.js:431
(anonymous function) @ core.pkg.js:69
pass         @ core.pkg.js:152
_dispatchProxy @ core.pkg.js:147
invoke       @ core.pkg.js:90
proto.invoke @ core.pkg.js:67
_done        @ core.pkg.js:231
(anonymous function) @ core.pkg.js:235
_complete    @ core.pkg.js:193

The lines in question are:

var column_maps = response.columnMaps;
for (var natural_phid in column_maps) {
    this.getColumn(natural_phid).setNaturalOrder(column_maps[natural_phid]);
}

The (private, sorry!) board has just over a hundred tasks, many of which are also on in other projects. Six columns, one empty. It seems to be more likely to fail on the fuller columns. Points are in use. Updates mostly to triage or add points to tickets, maybe occasionally editing the description or title.

Version: Stable branch: 2016 Week 32:

phabricator 435f756414e692ad02204bf6cb8f185042cec344 (Sat, Aug 6)
arcanist c9337c2ade7c76edc98d27c216ab97fc1e40d01c (Sat, Aug 6)
phutil 8f8e02d47569dce5f035383d8bcbf7a08481e839 (Sat, Aug 6)

Event Timeline

I can't reproduce this based on the steps provided. Have you been able to reproduce in a clean environment like a test instance on http://phacility.com ?

I would also maybe check webserver error logs, too. OS/Browser might help to know as well.

I was able to reproduce this, possibly, by following these steps:

  • Open a workboard in two windows, with at least two columns ("A" and "B").
  • Hide a column ("B") in window #1.
  • Click the pencil icon to edit a task in column A in window #1 (don't save yet).
  • Drag a task from "A" to "B" in window #2 (column isn't hidden here yet).
  • Save the task in window #1.

The server sends back position information for the hidden column.

I'll fix this, no clue if it's what you encountered or not. Could another user plausibly have been moving / hiding columns while you were editing things?

Slightly easier is:

  • Open workboard in two windows.
  • In window 1, show only visible columns.
  • In window 2, show all columns.
  • In window 2, drag a task from a visible column ("A") to a hidden column ("B").
  • Edit the task in window 1 (which still appears on "A").

The server sends back information for column "B" (because the task now appears in that column on the server) and then the client fails when trying to apply that new information to the view.

T4900 discusses future improvements to synchronize cards more comprehensively. Until then, I'm just going to make the client discard this correction, since this is consistent and reasonable given how workboards operate today.

Sorry, I missed the thread on this.

I don't think it will have been the same issue; we have disabled columns but there was almost certainly no concurrent users (there's only three people on the whole instance, and we sit in the same room, and I'm pretty sure at least one guy wasn't in that day).

I think the issue should remain closed, though, because the fix may have fixed it anyway: I haven't seen the issue for a while.