I haven't figured out why, but downgrading the Task version from 5 down to 3 gets rid of the error for me.