Created attachment 713338 [details] logcat If a sleep is introduced into the tearDown then the tearDown fails. Jgriffin suggested that this is the B2G app process failing. To replicate run the attached test case. The teardown should fail reliably ,verified across several devices and builds. With the sleep removed the test will pass reliably. This has been seen on CI and usually disrupts the following tests so I'm considering it a reasonably high priority or at least a good preventative measure if we can debug and avoid this condition.
It appears this is not related to tearDown. Waiting 5 seconds after tapping hang up causes any subsequent Marionette calls to fail. I suspect it's something to do with the active app switching from phone back to contacts.
Summary: [B2G] Test tearDown fails when a sleep is introduced into it → [B2G] test_call_contact fails when a sleep is introduced into it
I suppose it's also possible we could get this error when the frame has closed expectedly; i.e., if active app spontaneously closes in order to switch to another. Zac, can you increase the delay to something like 30s, and attempt to play with the UI manually after 5? If the UI works, then it's likely we're attempting to send the message to a closed frame, rather than a crashed one.
This test is doing that; closing the call screen (when hanging up the call) which is in its own frame, so perhaps Marionette is not detecting the closure of the frame. I tried your suggestion and the UI is active and seems to be fully functional.
I just tried putting in a switch_to_frame() right after the hangup step and the test passes fine even with the sleep. So it seems Marionette is losing track of the frame?
Marionette doesn't handle the case very well when the active frame disappears. I have some ideas on how to improve this, which I'll look at after spending some more time on the app-freezing problem.
Through various other bugs the Marionette handling of dropped frames was improved. I don't believe this bug to be valid anymore, these scenarios work now.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.