appium / appium

Cross-platform automation framework for all kinds of apps, built on top of the W3C WebDriver protocol
http://appium.io/
Apache License 2.0
18.74k stars 6.06k forks source link

Instruments crashes without pre/post sleep #1043

Closed bootstraponline closed 11 years ago

bootstraponline commented 11 years ago

Instruments crashes unless I sleep 1 before and after a mobile tap.

# must sleep before & after tap or instruments crashes
sleep 1
mobile :tap, x: 50, y: 140, duration: 0.5
sleep 1
bootstraponline commented 11 years ago

It's still crashing...

info: [INSTSERVER] Sending command to instruments: au.complexTap({"tapCount":1,"touchCount":1,"duration":0.5,"x":72,"y":162})
info: [INST] 2013-08-26 12:39:01 +0000 Default: Got new command 20 from instruments: au.complexTap({"tapCount":1,"touchCount":1,"duration":0.5,"x":72,"y":162})
info: [INST] 2013-08-26 12:39:01 +0000 Debug: target.tapWithOptions({x:"72", y:"162"}, {touchCount:"1", duration:"0.5", tapCount:"1"})
       2013-08-26 12:39:01 +0000 Fail: The target application appears to have died
penguinho commented 11 years ago

Ahh this explains some problems I've had with this in inspector

tokunbo commented 11 years ago

@bootstraponline It still crashes even when you have those sleeps? Do you give the --native-instruments flag to avoid using the instruments-nodelay-patch thing? Do you know of anything else that causes instruments to crash? I'm having crashing troubles too, but can't pin it down to what exactly is causing it.

bootstraponline commented 11 years ago

It still crashes even when you have those sleeps?

Something still crashes. I'm not sure if it's mobile tap. Without the sleep though, mobile tap will cause the crash.

Do you give the --native-instruments flag to avoid using the instruments-nodelay-patch thing?

Most of my tests work fine with instruments-without-delay so I haven't tried disabling it.

Do you know of anything else that causes instruments to crash?

On iOS, the crashes are often timing related. For example, typing too soon after a page transition or not waiting after a mobile gesture.

I'm having crashing troubles too, but can't pin it down to what exactly is causing it.

I wrote a tool that runs a test x number of times and saves the crash logs. Some of the crashes are timing related so having them reproduce takes many runs.

tokunbo commented 11 years ago

@bootstraponline Cool. Yeah, I've tried all kinds of stuff to try and identify this for nearly 3 months. I really thought I solved it with an updated Automation.template but then the problem returned so I'm just stumped.

penguinho commented 11 years ago

This is fixed, we now use the built-in Automation.tracetemplete

tokunbo commented 11 years ago

@bootstraponline Hey, I'm very curious if the most recent git pull of the appium repo solves your crashing issue. Thanks,

bootstraponline commented 11 years ago

I'll try it. Most of the crashy issues have gone away now that I'm doing this on iOS.

tokunbo commented 11 years ago

@bootstraponline Hmm, I'm not clear on what appium-flaky does. Is it finding memory-leaks or something? How did it make crashes happen less?

bootstraponline commented 11 years ago

There's a new clean simulator and appium server for each test. Before, I was reusing a simulator and appium server and it was causing issues with the tests.

tokunbo commented 11 years ago

@bootstraponline Ah, okay. I test using physically real iOS devices atm, but good to know. ^_^

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.