firebase-queue
firebase-queue copied to clipboard
Bug in README.md under Queue Security
In README.md, under Queue Security, the validate rule under rules/queue/tasks contains
newData.hasChildren(['_state', '_state_changed', '_progress'])
Notice the presence of the _progress property. However, in queue_worker.js, in _resetTask, we have:
if (task._state === self.inProgressState) {
task._state = self.startState;
task._state_changed = Firebase.ServerValue.TIMESTAMP;
task._owner = null;
task._progress = null;
task._error_details = null;
return task;
}
So, if the validate rule does contain the _progress property, the transaction in queue_worker will keep failing because _progress is set to null. We should either update the doc or update queue worker.
Is think that this issue is still applicable: https://github.com/firebase/firebase-queue/blob/master/src/lib/queue_worker.js#L126