Pushing an event to the main thread may fail. If this happens, log an error, and try to recover when possible.