Try to catch InvalidStateError