{"action":"created","issue":{"url":"https://api.github.com/repos/bitrise-io/steps-xcode-test/issues/52","repository_url":"https://api.github.com/repos/bitrise-io/steps-xcode-test","labels_url":"https://api.github.com/repos/bitrise-io/steps-xcode-test/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/bitrise-io/steps-xcode-test/issues/52/comments","events_url":"https://api.github.com/repos/bitrise-io/steps-xcode-test/issues/52/events","html_url":"https://github.com/bitrise-io/steps-xcode-test/issues/52","id":176245768,"number":52,"title":"Xcode UI tests failing because of \"Lost connection to test manager service\"","user":{"login":"dagio","id":74581,"avatar_url":"https://avatars.githubusercontent.com/u/74581?v=3","gravatar_id":"","url":"https://api.github.com/users/dagio","html_url":"https://github.com/dagio","followers_url":"https://api.github.com/users/dagio/followers","following_url":"https://api.github.com/users/dagio/following{/other_user}","gists_url":"https://api.github.com/users/dagio/gists{/gist_id}","starred_url":"https://api.github.com/users/dagio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dagio/subscriptions","organizations_url":"https://api.github.com/users/dagio/orgs","repos_url":"https://api.github.com/users/dagio/repos","events_url":"https://api.github.com/users/dagio/events{/privacy}","received_events_url":"https://api.github.com/users/dagio/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-09-11T14:13:56Z","updated_at":"2016-09-15T16:31:10Z","closed_at":null,"body":"With the following log (just the end) : \r\n\r\n```\r\n15:24:21.900 XCTRunner[7229:25382] -[AuthenticationUITests testChangeUsernameWillNotShowErrors] started activity <XCActivityRecord: 0x7fb98c964810> 2016-09-11 13:24:21 +0000: Synthesize event\r\n15:24:21.901 testmanagerd[4718:20476] -[XCTestManager allowUITestControlForPID:] 7229 vs 7229\r\n15:24:21.901 testmanagerd[4718:20476] Getting screenshot\r\n15:24:21.944 testmanagerd[4718:20476] systemUIOrientation <AXUIElement 0x7f97d9d253d0> {pid=0}[kAXSpringBoardApplication]: 0 <AXUIElement 0x7f97d9ff8730> {pid=3148}\r\n15:24:21.944 testmanagerd[4718:20476] systemUIOrientation <AXUIElement 0x7f97d9ff8730> {pid=3148}[kAXApplicationOrientationAttribute]: 0 1\r\n15:24:21.945 testmanagerd[4718:20476] Got screenshot, rotating to system UI orientation 1\r\n15:24:21.945 testmanagerd[4718:20476] systemUIOrientation <AXUIElement 0x7f97d9d253d0> {pid=0}[kAXSpringBoardApplication]: 0 <AXUIElement 0x7f97d9e00df0> {pid=3148}\r\n15:24:21.945 testmanagerd[4718:20476] systemUIOrientation <AXUIElement 0x7f97d9e00df0> {pid=3148}[kAXApplicationOrientationAttribute]: 0 1\r\n15:24:21.968 testmanagerd[4718:20476] Replying with data 0x7f97d9e00df0 (113745 bytes), error (null)\r\n15:24:21.969 testmanagerd[4718:20476] -[XCTestManager allowUITestControlForPID:] 7229 vs 7229\r\n15:24:21.969 testmanagerd[4718:20476] Typing \b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\r\n15:24:21.972 testmanagerd[4718:25546] Key event '\b' sent.\r\n15:24:22.017 XCTRunner[7229:25554] Got AX notification 4002\r\n15:24:21.987 testmanagerd[4718:20381] AX Notification 1001\r\n15:24:21.988 testmanagerd[4718:20381] AX Notification 1001\r\n15:24:21.988 testmanagerd[4718:20381] AX Notification 1001\r\n15:24:21.988 testmanagerd[4718:20381] AX Notification 1001\r\n15:24:22.016 testmanagerd[4718:20381] AX Notification 1005\r\n15:24:22.017 testmanagerd[4718:20381] AX Notification 1001\r\n15:24:22.017 testmanagerd[4718:20381] AX Notification 1001\r\n15:24:22.017 testmanagerd[4718:20381] AX Notification 4002\r\n15:24:22.018 testmanagerd[4718:20381] Got user testing notification with payload {\r\n    ModifiedInput = \"\\b\";\r\n    ModifierFlags = 0;\r\n    UnmodifiedInput = \"\\b\";\r\n    event = KeyEventComplete;\r\n}\r\n15:24:22.018 testmanagerd[4718:20381] Key event '\b' completed after 0.0493s.\r\n15:24:22.021 testmanagerd[4718:20381] AX Notification 1001\r\n15:24:22.056 XCTRunner[7229:25554] Got AX notification 4002\r\n15:24:22.074 XCTRunner[7229:25554] Got AX notification 4002\r\n15:24:22.035 testmanagerd[4718:25694] Key event '\b' sent.\r\n15:24:22.055 testmanagerd[4718:20381] AX Notification 1005\r\n15:24:22.055 testmanagerd[4718:20381] AX Notification 1001\r\n15:24:22.055 testmanagerd[4718:20381] AX Notification 4002\r\n15:24:22.056 testmanagerd[4718:20381] Got user testing notification with payload {\r\n    ModifiedInput = \"\\b\";\r\n    ModifierFlags = 0;\r\n    UnmodifiedInput = \"\\b\";\r\n    event = KeyEventComplete;\r\n}\r\n15:24:22.057 testmanagerd[4718:20381] Key event '\b' completed after 0.0383s.\r\n15:24:22.057 testmanagerd[4718:20381] AX Notification 1001\r\n15:24:22.072 testmanagerd[4718:20381] AX Notification 1005\r\n15:24:22.073 testmanagerd[4718:20381] AX Notification 1001\r\n15:24:22.074 testmanagerd[4718:20381] AX Notification 4002\r\n15:24:22.105 XCTRunner[7229:25398] Connection to testmanagerd interrupted.\r\n15:24:22.075 testmanagerd[4718:20381] Got user testing notification with payload {\r\n    ModifiedInput = \"\\b\";\r\n    ModifierFlags = 0;\r\n    UnmodifiedInput = \"\\b\";\r\n    event = KeyEventComplete;\r\n}\r\n15:24:22.122 xcodebuild[4550:20143] Test operation failure: Lost connection to test manager service.\r\n15:24:22.123 xcodebuild[4550:20143] _finishWithError:Error Domain=IDETestOperationsObserverErrorDomain Code=4 \"Lost connection to test manager service.\" UserInfo={NSLocalizedDescription=Lost connection to test manager service.} didCancel: 1\r\n15:24:22.169 xcodebuild[4550:25107] 6740E3BD-D0C3-49B1-87D4-4FCF7F342356: Registered for sim device notification, got token 12\r\n15:24:22.169 xcodebuild[4550:25107] 6740E3BD-D0C3-49B1-87D4-4FCF7F342356: Unregistering for sim device notification with token 12\r\n15:24:22.169 xcodebuild[4550:25107] Sim iPhone 6s is booted (state = 3)\r\n15:24:22.169 xcodebuild[4550:25107] Calling -[SimDevice getenv:error:] for TESTMANAGERD_SIM_SOCK\r\n15:24:22.186 xcodebuild[4550:25107] Returning /private/tmp/com.apple.launchd.aPHQ9lapYk/com.apple.testmanagerd.unix-domain.socket for TESTMANAGERD_SIM_SOCK\r\n15:24:22.186 xcodebuild[4550:25107] Sim iPhone 6s has testmanagerd socket at /private/tmp/com.apple.launchd.aPHQ9lapYk/com.apple.testmanagerd.unix-domain.socket\r\n15:24:22.186 xcodebuild[4550:25107] Connected to testmanagerd socket for Sim iPhone 6s\r\n```\r\n\r\nI dont have such problems in local. The ratio of builds failing becausel of a test failing is more or less between 10 or 20%. It's the first time I track down the problem to the origin using logs exported."},"comment":{"url":"https://api.github.com/repos/bitrise-io/steps-xcode-test/issues/comments/247380002","html_url":"https://github.com/bitrise-io/steps-xcode-test/issues/52#issuecomment-247380002","issue_url":"https://api.github.com/repos/bitrise-io/steps-xcode-test/issues/52","id":247380002,"user":{"login":"dagio","id":74581,"avatar_url":"https://avatars.githubusercontent.com/u/74581?v=3","gravatar_id":"","url":"https://api.github.com/users/dagio","html_url":"https://github.com/dagio","followers_url":"https://api.github.com/users/dagio/followers","following_url":"https://api.github.com/users/dagio/following{/other_user}","gists_url":"https://api.github.com/users/dagio/gists{/gist_id}","starred_url":"https://api.github.com/users/dagio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dagio/subscriptions","organizations_url":"https://api.github.com/users/dagio/orgs","repos_url":"https://api.github.com/users/dagio/repos","events_url":"https://api.github.com/users/dagio/events{/privacy}","received_events_url":"https://api.github.com/users/dagio/received_events","type":"User","site_admin":false},"created_at":"2016-09-15T16:31:10Z","updated_at":"2016-09-15T16:31:10Z","body":"It was actually send at the same time. cf : \r\n\r\n> 15:00:40.825 testmanagerd[7058:35011] Typing ios-team+TestUser3581163810@example.org\r\n\r\nThe earliest error message in the log is : \r\n\r\n> 15:00:40.942 XCTRunner[9623:34860] Connection to testmanagerd interrupted.\r\n\r\nI guess this is the root error while `Unable to send string '-'` is a consequence of loosing the connection ?\r\n\r\nFrom another build later today : \r\n\r\n```\r\n16:22:22.238 testmanagerd[7263:36628] Typing ios-team+TestUser2884570997@viscaweb.com\r\n16:22:22.238 testmanagerd[7263:36085] Key event 'i' sent.\r\n16:22:22.247 XCTRunner[9831:36079] Got AX notification 4002\r\n16:22:22.246 testmanagerd[7263:29061] AX Notification 1005\r\n16:22:22.246 testmanagerd[7263:29061] AX Notification 1001\r\n16:22:22.246 testmanagerd[7263:29061] AX Notification 4002\r\n16:22:22.249 testmanagerd[7263:29061] Got user testing notification with payload {\r\n    ModifiedInput = i;\r\n    ModifierFlags = 0;\r\n    UnmodifiedInput = i;\r\n    event = KeyEventComplete;\r\n}\r\n16:22:22.249 testmanagerd[7263:29061] Key event 'i' completed after 0.0110s.\r\n16:22:22.252 testmanagerd[7263:36628] Sleep for 0.0027s\r\n16:22:22.256 testmanagerd[7263:36085] Key event 'o' sent.\r\n16:22:22.278 XCTRunner[9831:36079] Got AX notification 4002\r\n16:22:22.277 testmanagerd[7263:29061] AX Notification 1005\r\n16:22:22.277 testmanagerd[7263:29061] AX Notification 1001\r\n16:22:22.277 testmanagerd[7263:29061] AX Notification 1001\r\n16:22:22.277 testmanagerd[7263:29061] AX Notification 4002\r\n16:22:22.283 testmanagerd[7263:29061] Got user testing notification with payload {\r\n    ModifiedInput = o;\r\n    ModifierFlags = 0;\r\n    UnmodifiedInput = o;\r\n    event = KeyEventComplete;\r\n}\r\n16:22:22.283 testmanagerd[7263:29061] Key event 'o' completed after 0.0274s.\r\n16:22:22.295 testmanagerd[7263:29061] AX Notification 1001\r\n16:22:22.297 testmanagerd[7263:36085] Key event 's' sent.\r\n16:22:22.308 XCTRunner[9831:36079] Got AX notification 4002\r\n16:22:22.304 testmanagerd[7263:29061] AX Notification 1005\r\n16:22:22.304 testmanagerd[7263:29061] AX Notification 1001\r\n16:22:22.305 testmanagerd[7263:29061] AX Notification 4002\r\n16:22:22.309 testmanagerd[7263:29061] Got user testing notification with payload {\r\n    ModifiedInput = s;\r\n    ModifierFlags = 0;\r\n    UnmodifiedInput = s;\r\n    event = KeyEventComplete;\r\n}\r\n16:22:22.309 testmanagerd[7263:29061] Key event 's' completed after 0.0125s.\r\n16:22:22.311 testmanagerd[7263:36628] Sleep for 0.0018s\r\n16:22:22.328 testmanagerd[7263:29061] AX Notification 1001\r\n16:22:22.330 testmanagerd[7263:29061] AX Notification 1005\r\n16:22:22.331 testmanagerd[7263:29061] AX Notification 1001\r\n16:22:22.331 testmanagerd[7263:29061] AX Notification 1001\r\n16:22:22.332 testmanagerd[7263:29061] AX Notification 4002\r\n16:22:22.333 testmanagerd[7263:29061] Got user testing notification with payload {\r\n    ModifiedInput = \"-\";\r\n    ModifierFlags = 0;\r\n    UnmodifiedInput = \"-\";\r\n    event = KeyEventComplete;\r\n}\r\n16:22:22.333 testmanagerd[7263:29061] Key event '-' completed after 0.0181s.\r\n16:22:22.332 XCTRunner[9831:36079] Got AX notification 4002\r\n16:22:22.335 testmanagerd[7263:36085] Key event '-' sent.\r\n16:22:22.340 testmanagerd[7263:29061] AX Notification 1001\r\n16:22:22.346 XCTRunner[9831:36079] Connection to testmanagerd interrupted.\r\n16:22:22.347 testmanagerd[7263:36628] Test process connection invalidated or interrupted, closing test session <XCTestSession: 0x7fce19e013e0>.\r\n16:22:22.347 testmanagerd[7263:37070] Closed <XCTestSession: 0x7fce19e013e0>, removing from (\r\n    \"<XCTestSession: 0x7fce19e013e0>\"\r\n)\r\n16:22:22.347 testmanagerd[7263:37070] Tearing down test session <XCTestSession: 0x7fce19e013e0>.\r\n16:22:22.348 testmanagerd[7263:37070] Considering exiting, 0 test sessions, 0 sessions with identifiers, 0 unidentified sessions...\r\n16:22:22.348 testmanagerd[7263:37070] testmanagerd exiting, idle with no test activity.\r\n16:22:22.361 xcodebuild[7060:28642] Test operation failure: Lost connection to test manager service.\r\n16:22:22.361 xcodebuild[7060:28642] _finishWithError:Error Domain=IDETestOperationsObserverErrorDomain Code=4 \"Lost connection to test manager service.\" UserInfo={NSLocalizedDescription=Lost connection to test manager service.} didCancel: 1\r\n16:22:22.385 xcodebuild[7060:32264] 6740E3BD-D0C3-49B1-87D4-4FCF7F342356: Registered for sim device notification, got token 16\r\n16:22:22.386 xcodebuild[7060:32264] 6740E3BD-D0C3-49B1-87D4-4FCF7F342356: Unregistering for sim device notification with token 16\r\n16:22:22.386 xcodebuild[7060:32264] Sim iPhone 6s is booted (state = 3)\r\n16:22:22.386 xcodebuild[7060:32264] Calling -[SimDevice getenv:error:] for TESTMANAGERD_SIM_SOCK\r\n16:22:22.387 xcodebuild[7060:32264] Returning /private/tmp/com.apple.launchd.ov5OboSoZo/com.apple.testmanagerd.unix-domain.socket for TESTMANAGERD_SIM_SOCK\r\n16:22:22.398 xcodebuild[7060:32264] Sim iPhone 6s has testmanagerd socket at /private/tmp/com.apple.launchd.ov5OboSoZo/com.apple.testmanagerd.unix-domain.socket\r\n16:22:22.398 xcodebuild[7060:32264] Connected to testmanagerd socket for Sim iPhone 6s\r\n ```\r\n\r\nIt seems it's failing at the same moment, when the hyphen is send as you said.\r\n\r\nThis particular step is really simple : \r\n\r\n```\r\nfunc iType(text: String, onTextFieldWithIdentifier identifier: String) {\r\n\tlet textField = app.textFields[identifier]\r\n\ttextField.tap()\r\n\ttextField.typeText(text)\r\n}\r\n```\r\n\r\nNote : I use a stored property to store `XCUIApplication()`. I've seen in the documentation (https://bitrise-io.github.io/devcenter/ios/known-xcode-issues/) that you suggest to always use `XCUIApplication()` but it seems related to this error : `Failed to perform AX action`"}}
{"actor":{"display_login":"dagio"}}