iOS tests fail when autoAcceptAlerts capability is enabled

Appium 1.15.0
iOS 13.0

autoAcceptAlerts is actually doing its job but after the accept action tests fail with no errors from framework side logged.

An interesting point is that the tests fail or don’t fail depending on what happens after the moment of confirmation of the alert. In my case if iOS modal view comes after the screen on which alert was accepted tests run smoothly after. If normal screen comes after the alert - app is closed and obviously further test step (Cucumber step) is failed.

I found this old report at stack-overflow:

Can anyone consult me on that case?
What is actual status of autoAcceptAlerts?

I resolved the issue. The problem was that automation script ran ahead of the app flow. So when you expect that after some test script action an alert will be shown its better to put EXPLICIT wait at this point because autoAcceptAlerts may take quite a lot of time to perform.