I seem to have found a fix, assuming our problems are related.
I was getting errors whenever I used getSelectedFeatures() to return a graphic and then pass that graphic to applyEdits(). Try using featureLayer.clearSelection() before you call applyEdits(). That seems to do the trick.
In my case, I noticed that every time I called applyEdits(), the feature I just updated/deleted was firing 'onSelectionComplete', which would return null and throw errors. I have no idea why using getSelectedFeatures() before applyEdits() triggers a feature selection upon 'onEditsComplete', but there it is.
I hope that helps!