The assertion most be removed, and the error callback is reimplemented.