Hi All
Could you help me view a error happen on my environment
- simulator with iOS 9.2 and Appium 1.5.3
- My code
Set<?> contextHandles = driver.getContextHandles(); String firstContextView = (String) contextHandles.toArray()[0]; String lastestContextView = (String) contextHandles.toArray()[contextHandles.size() - 1]; driver.context(lastestContextView); email.sendKeys(userName); pass.sendKeys(passWord); login.click();
And below is error log
[debug] [UIAuto] Socket data received (83 bytes) [debug] [UIAuto] Got result from instruments: {"status":0,"value":{"origin":{"x":36,"y":235},"size":{"width":248,"height":36}}} [debug] [UIAuto] Sending command to instruments: target.touch([{"touch":[{"x":160,"y":253}],"time":0.2},{"touch":[{"x":160,"y":253}],"time":0.7}]) [debug] [Instruments] [INST] 2016-06-09 10:42:42 +0000 Debug: Got new command 15 from instruments: target.touch([{"touch":[{"x":160,"y":253}],"time":0.2},{"touch":[{"x":160,"y":253}],"time":0.7}]) [debug] [Instruments] [INST] 2016-06-09 10:42:42 +0000 Debug: evaluating target.touch([{"touch":[{"x":160,"y":253}],"time":0.2},{"touch":[{"x":160,"y":253}],"time":0.7}]) [debug] [Instruments] [INST] 2016-06-09 10:42:42 +0000 Debug: target.touch(__NSCFArray) [debug] [Instruments] [INST] 2016-06-09 10:42:42 +0000 Debug: evaluation finished [debug] [Instruments] [INST] 2016-06-09 10:42:42 +0000 Debug: responding with: [debug] [Instruments] [INST] 2016-06-09 10:42:42 +0000 Debug: Running system command #16: /usr/local/Cellar/node/6.2.0/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-ios-driver/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js /var/folders/qn/cdm4l2jj21n81ytjyxpgk_44ynjphk/T/instruments_sock 2,{"status":0,"value":""}... [debug] [UIAuto] Socket data received (25 bytes) [debug] [UIAuto] Got result from instruments: {"status":0,"value":""} [MJSONWP] Responding to client with driver.performTouch() result: null [HTTP] <-- POST /wd/hub/session/dc4f25e2-0bc0-4218-8bc0-f76b637e0cbb/touch/perform 200 2712 ms - 76 [HTTP] --> GET /wd/hub/session/dc4f25e2-0bc0-4218-8bc0-f76b637e0cbb/contexts {} [MJSONWP] Calling AppiumDriver.getContexts() with args: ["dc4f25e2-0bc0-4218-8bc0-f... [debug] [iOS] Executing iOS command 'getContexts' [debug] [iOS] Getting list of available contexts [debug] [iOS] Retrieving contexts and views [debug] [iOS] Selecting by url: false [debug] [RemoteDebugger] useNewSafari --> false [debug] [RemoteDebugger] Debugger socket connected to ::1:27753 [debug] [RemoteDebugger] Sending connection key request [debug] [RemoteDebugger] Sending '_rpc_reportIdentifier:' message to remote debugger [debug] [RemoteDebugger] Receiving data from remote debugger: '{"__argument":{"WIRSimulatorBuildKey":"13C75","WIRSimulatorProductVersionKey":"9.2","WIRSimulatorNameKey":"iPhone"},"__selector":"_rpc_reportSetup:"}' [debug] [RemoteDebugger] Received response from socket send: '["iPhone","13C75","9.2"]' [debug] [RemoteDebugger] Receiving data from remote debugger: '{"__argument":{"WIRApplicationDictionaryKey":{"PID:1520":{"WIRApplicationIdentifierKey":"PID:1520","WIRIsApplicationProxyKey":false,"WIRApplicationNameKey":"QC 6.3.7","WIRApplicationBundleIdentifierKey":"com.abc.def","WIRIsApplicationActiveKey":1}}},"__selector":"_rpc_reportConnectedApplicationList:"}' [debug] [RemoteDebugger] Connected to application [debug] [RemoteDebugger] Sim name: iPhone [debug] [RemoteDebugger] Sim build: 13C75 [debug] [RemoteDebugger] Sim platform version: 9.2 [debug] [RemoteDebugger] Selecting application [debug] [RemoteDebugger] Found app id key 'PID:1520' for bundle 'com.abc.def' [debug] [RemoteDebugger] Trying out the possible app ids: PID:1520 [debug] [RemoteDebugger] Selecting app PID:1520 (try #1 of 20) [debug] [RemoteDebugger] Sending '_rpc_forwardGetListing:' message to remote debugger [debug] [RemoteDebugger] Receiving data from remote debugger: '{"__argument":{"WIRApplicationIdentifierKey":"PID:938","WIRIsApplicationProxyKey":true,"WIRApplicationNameKey":"SafariViewService","WIRApplicationBundleIdentifierKey":"com.apple.SafariViewService","WIRIsApplicationActiveKey":1,"WIRHostApplicationIdentifierKey":"PID:869"},"__selector":"_rpc_applicationConnected:"}' [debug] [RemoteDebugger] We were notified we might have connected to the wrong app. Using id PID:938 instead of PID:869 [debug] [RemoteDebugger] Notified that a new application PID:938 has connected [debug] [RemoteDebugger] Current applications available: [debug] [RemoteDebugger] Application: 'PID:1520' [debug] [RemoteDebugger] id: '"PID:1520"' [debug] [RemoteDebugger] name: '"QC 6.3.7"' [debug] [RemoteDebugger] bundleId: '"com.abc.def"' [debug] [RemoteDebugger] isProxy: 'false' [debug] [RemoteDebugger] hostId: 'undefined' [debug] [RemoteDebugger] isActive: '1' [debug] [RemoteDebugger] Application: 'PID:938' [debug] [RemoteDebugger] id: '"PID:938"' [debug] [RemoteDebugger] name: '"SafariViewService"' [debug] [RemoteDebugger] bundleId: '"com.apple.SafariViewService"' [debug] [RemoteDebugger] isProxy: 'true' [debug] [RemoteDebugger] hostId: '"PID:869"' [debug] [RemoteDebugger] isActive: '1' [debug] [RemoteDebugger] pageDict: '{"promise":{"isFulfilled":false,"isRejected":false}}' [debug] [RemoteDebugger] Found app id key 'PID:1520' for bundle 'com.abc.def' [debug] [RemoteDebugger] Receiving data from remote debugger: '{"__argument":{"WIRApplicationIdentifierKey":"PID:1579","WIRIsApplicationProxyKey":true,"WIRApplicationNameKey":"","WIRApplicationBundleIdentifierKey":"com.apple.WebKit.WebContent","WIRIsApplicationActiveKey":1,"WIRHostApplicationIdentifierKey":"PID:938"},"__selector":"_rpc_applicationConnected:"}' [debug] [RemoteDebugger] We were notified we might have connected to the wrong app. Using id PID:1579 instead of PID:938 [debug] [RemoteDebugger] Notified that a new application PID:1579 has connected [debug] [RemoteDebugger] Current applications available: [debug] [RemoteDebugger] Application: 'PID:1520' [debug] [RemoteDebugger] id: '"PID:1520"' [debug] [RemoteDebugger] name: '"QC 6.3.7"' [debug] [RemoteDebugger] bundleId: '"com.abc.def"' [debug] [RemoteDebugger] isProxy: 'false' [debug] [RemoteDebugger] hostId: 'undefined' [debug] [RemoteDebugger] isActive: '1' [debug] [RemoteDebugger] Application: 'PID:938' [debug] [RemoteDebugger] id: '"PID:938"' [debug] [RemoteDebugger] name: '"SafariViewService"' [debug] [RemoteDebugger] bundleId: '"com.apple.SafariViewService"' [debug] [RemoteDebugger] isProxy: 'true' [debug] [RemoteDebugger] hostId: '"PID:869"' [debug] [RemoteDebugger] isActive: '1' [debug] [RemoteDebugger] pageDict: '{"promise":{"isFulfilled":false,"isRejected":false}}' [debug] [RemoteDebugger] Application: 'PID:1579' [debug] [RemoteDebugger] id: '"PID:1579"' [debug] [RemoteDebugger] name: '""' [debug] [RemoteDebugger] bundleId: '"com.apple.WebKit.WebContent"' [debug] [RemoteDebugger] isProxy: 'true' [debug] [RemoteDebugger] hostId: '"PID:938"' [debug] [RemoteDebugger] isActive: '1' [debug] [RemoteDebugger] pageDict: '{"promise":{"isFulfilled":false,"isRejected":false}}' [debug] [RemoteDebugger] Found app id key 'PID:1520' for bundle 'com.abc.def' [debug] [RemoteDebugger] Retrying connection [debug] [RemoteDebugger] Found app id key 'PID:1520' for bundle 'com.com.abc.def' [debug] [RemoteDebugger] Trying out the possible app ids: PID:1520 [debug] [RemoteDebugger] Selecting app PID:1520 (try #2 of 20) [debug] [RemoteDebugger] Sending '_rpc_forwardGetListing:' message to remote debugger [debug] [RemoteDebugger] Receiving data from remote debugger: '{"__argument":{"WIRApplicationIdentifierKey":"PID:1520","WIRListingKey":{}},"__selector":"_rpc_applicationSentListing:"}' [debug] [RemoteDebugger] Received response from socket send: '["PID:1520",{}]' [debug] [RemoteDebugger] Received response from socket send: '["PID:1520",{}]' [debug] [RemoteDebugger] Page changed: {} [debug] [RemoteDebugger] Empty page dictionary received [debug] [RemoteDebugger] Empty page dictionary received [debug] [RemoteDebugger] Receiving data from remote debugger: '{"__argument":{"WIRApplicationIdentifierKey":"PID:1520","WIRListingKey":{}},"__selector":"_rpc_applicationSentListing:"}' [debug] [RemoteDebugger] Received response from socket send: '["PID:1520",{}]' [debug] [RemoteDebugger] Page changed: {} [debug] [RemoteDebugger] Retrying connection [debug] [RemoteDebugger] Found app id key 'PID:1520' for bundle 'com.abc.def' [debug] [RemoteDebugger] Trying out the possible app ids: PID:1520 [debug] [RemoteDebugger] Selecting app PID:1520 (try #3 of 20) [debug] [RemoteDebugger] Sending '_rpc_forwardGetListing:' message to remote debugger [debug] [RemoteDebugger] Receiving data from remote debugger: '{"__argument":{"WIRApplicationIdentifierKey":"PID:1520","WIRListingKey":{}},"__selector":"_rpc_applicationSentListing:"}' [debug] [RemoteDebugger] Received response from socket send: '["PID:1520",{}]' [debug] [RemoteDebugger] Page changed: {} [debug] [RemoteDebugger] Empty page dictionary received [debug] [RemoteDebugger] Retrying connection [debug] [RemoteDebugger] Found app id key 'PID:1520' for bundle 'com.abc.def' [debug] [RemoteDebugger] Trying out the possible app ids: PID:1520 [debug] [RemoteDebugger] Selecting app PID:1520 (try #4 of 20) [debug] [RemoteDebugger] Sending '_rpc_forwardGetListing:' message to remote debugger [debug] [RemoteDebugger] Receiving data from remote debugger: '{"__argument":{"WIRApplicationIdentifierKey":"PID:1520","WIRListingKey":{}},"__selector":"_rpc_applicationSentListing:"}' [debug] [RemoteDebugger] Received response from socket send: '["PID:1520",{}]' [debug] [RemoteDebugger] Page changed: {} [debug] [RemoteDebugger] Empty page dictionary received [debug] [RemoteDebugger] Retrying connection [debug] [RemoteDebugger] Found app id key 'PID:1520' for bundle 'com.abc.def' [debug] [RemoteDebugger] Trying out the possible app ids: PID:1520 [debug] [RemoteDebugger] Selecting app PID:1520 (try #5 of 20) [debug] [RemoteDebugger] Sending '_rpc_forwardGetListing:' message to remote debugger [debug] [RemoteDebugger] Receiving data from remote debugger: '{"__argument":{"WIRApplicationIdentifierKey":"PID:1520","WIRListingKey":{}},"__selector":"_rpc_applicationSentListing:"}' [debug] [RemoteDebugger] Received response from socket send: '["PID:1520",{}]' [debug] [RemoteDebugger] Page changed: {} [debug] [RemoteDebugger] Empty page dictionary received [debug] [RemoteDebugger] Retrying connection [debug] [RemoteDebugger] Found app id key 'PID:1520' for bundle 'com.abc.def' [debug] [RemoteDebugger] Trying out the possible app ids: PID:1520 [debug] [RemoteDebugger] Selecting app PID:1520 (try #6 of 20) [debug] [RemoteDebugger] Sending '_rpc_forwardGetListing:' message to remote debugger [debug] [RemoteDebugger] Receiving data from remote debugger: '{"__argument":{"WIRApplicationIdentifierKey":"PID:1520","WIRListingKey":{}},"__selector":"_rpc_applicationSentListing:"}' [debug] [RemoteDebugger] Received response from socket send: '["PID:1520",{}]' [debug] [RemoteDebugger] Page changed: {} [debug] [RemoteDebugger] Empty page dictionary received [debug] [RemoteDebugger] Retrying connection [debug] [RemoteDebugger] Found app id key 'PID:1520' for bundle 'com.abc.def' [debug] [RemoteDebugger] Trying out the possible app ids: PID:1520 [debug] [RemoteDebugger] Selecting app PID:1520 (try #7 of 20) [debug] [RemoteDebugger] Sending '_rpc_forwardGetListing:' message to remote debugger [debug] [RemoteDebugger] Receiving data from remote debugger: '{"__argument":{"WIRApplicationIdentifierKey":"PID:1520","WIRListingKey":{}},"__selector":"_rpc_applicationSentListing:"}' [debug] [RemoteDebugger] Received response from socket send: '["PID:1520",{}]' [debug] [RemoteDebugger] Page changed: {} [debug] [RemoteDebugger] Empty page dictionary received [debug] [RemoteDebugger] Retrying connection [debug] [RemoteDebugger] Found app id key 'PID:1520' for bundle 'com.abc.def' [debug] [RemoteDebugger] Trying out the possible app ids: PID:1520 [debug] [RemoteDebugger] Selecting app PID:1520 (try #8 of 20) [debug] [RemoteDebugger] Sending '_rpc_forwardGetListing:' message to remote debugger [debug] [RemoteDebugger] Receiving data from remote debugger: '{"__argument":{"WIRApplicationIdentifierKey":"PID:1520","WIRListingKey":{}},"__selector":"_rpc_applicationSentListing:"}' [debug] [RemoteDebugger] Received response from socket send: '["PID:1520",{}]' [debug] [RemoteDebugger] Page changed: {} [debug] [RemoteDebugger] Empty page dictionary received [debug] [RemoteDebugger] Retrying connection [debug] [RemoteDebugger] Found app id key 'PID:1520' for bundle 'com.abc.def' [debug] [RemoteDebugger] Trying out the possible app ids: PID:1520 [debug] [RemoteDebugger] Selecting app PID:1520 (try #9 of 20) [debug] [RemoteDebugger] Sending '_rpc_forwardGetListing:' message to remote debugger [debug] [RemoteDebugger] Receiving data from remote debugger: '{"__argument":{"WIRApplicationIdentifierKey":"PID:1520","WIRListingKey":{}},"__selector":"_rpc_applicationSentListing:"}' [debug] [RemoteDebugger] Received response from socket send: '["PID:1520",{}]' [debug] [RemoteDebugger] Page changed: {} [debug] [RemoteDebugger] Empty page dictionary received [debug] [RemoteDebugger] Retrying connection [debug] [RemoteDebugger] Found app id key 'PID:1520' for bundle 'com.abc.def' [debug] [RemoteDebugger] Trying out the possible app ids: PID:1520 [debug] [RemoteDebugger] Selecting app PID:1520 (try #10 of 20) [debug] [RemoteDebugger] Sending '_rpc_forwardGetListing:' message to remote debugger [debug] [RemoteDebugger] Receiving data from remote debugger: '{"__argument":{"WIRApplicationIdentifierKey":"PID:1520","WIRListingKey":{}},"__selector":"_rpc_applicationSentListing:"}' [debug] [RemoteDebugger] Received response from socket send: '["PID:1520",{}]' [debug] [RemoteDebugger] Page changed: {} [debug] [RemoteDebugger] Empty page dictionary received [debug] [RemoteDebugger] Retrying connection [debug] [RemoteDebugger] Found app id key 'PID:1520' for bundle 'com.abc.def' [debug] [RemoteDebugger] Trying out the possible app ids: PID:1520 [debug] [RemoteDebugger] Selecting app PID:1520 (try #11 of 20) [debug] [RemoteDebugger] Sending '_rpc_forwardGetListing:' message to remote debugger [debug] [RemoteDebugger] Receiving data from remote debugger: '{"__argument":{"WIRApplicationIdentifierKey":"PID:1520","WIRListingKey":{}},"__selector":"_rpc_applicationSentListing:"}' [debug] [RemoteDebugger] Received response from socket send: '["PID:1520",{}]' [debug] [RemoteDebugger] Page changed: {} [debug] [RemoteDebugger] Empty page dictionary received [debug] [RemoteDebugger] Retrying connection [debug] [RemoteDebugger] Found app id key 'PID:1520' for bundle 'com.abc.def' [debug] [RemoteDebugger] Trying out the possible app ids: PID:1520 [debug] [RemoteDebugger] Selecting app PID:1520 (try #12 of 20) [debug] [RemoteDebugger] Sending '_rpc_forwardGetListing:' message to remote debugger [debug] [RemoteDebugger] Receiving data from remote debugger: '{"__argument":{"WIRApplicationIdentifierKey":"PID:1520","WIRListingKey":{}},"__selector":"_rpc_applicationSentListing:"}' [debug] [RemoteDebugger] Received response from socket send: '["PID:1520",{}]' [debug] [RemoteDebugger] Page changed: {} [debug] [RemoteDebugger] Empty page dictionary received [debug] [RemoteDebugger] Retrying connection [debug] [RemoteDebugger] Found app id key 'PID:1520' for bundle 'com.abc.def' [debug] [RemoteDebugger] Trying out the possible app ids: PID:1520 [debug] [RemoteDebugger] Selecting app PID:1520 (try #13 of 20) [debug] [RemoteDebugger] Sending '_rpc_forwardGetListing:' message to remote debugger [debug] [RemoteDebugger] Receiving data from remote debugger: '{"__argument":{"WIRApplicationIdentifierKey":"PID:1520","WIRListingKey":{}},"__selector":"_rpc_applicationSentListing:"}' [debug] [RemoteDebugger] Received response from socket send: '["PID:1520",{}]' [debug] [RemoteDebugger] Page changed: {} [debug] [RemoteDebugger] Empty page dictionary received [debug] [RemoteDebugger] Retrying connection [debug] [RemoteDebugger] Found app id key 'PID:1520' for bundle 'com.abc.def' [debug] [RemoteDebugger] Trying out the possible app ids: PID:1520 [debug] [RemoteDebugger] Selecting app PID:1520 (try #14 of 20) [debug] [RemoteDebugger] Sending '_rpc_forwardGetListing:' message to remote debugger [debug] [RemoteDebugger] Receiving data from remote debugger: '{"__argument":{"WIRApplicationIdentifierKey":"PID:1520","WIRListingKey":{}},"__selector":"_rpc_applicationSentListing:"}' [debug] [RemoteDebugger] Received response from socket send: '["PID:1520",{}]' [debug] [RemoteDebugger] Page changed: {} [debug] [RemoteDebugger] Empty page dictionary received [debug] [RemoteDebugger] Retrying connection [debug] [RemoteDebugger] Found app id key 'PID:1520' for bundle 'com.abc.def' [debug] [RemoteDebugger] Trying out the possible app ids: PID:1520 [debug] [RemoteDebugger] Selecting app PID:1520 (try #15 of 20) [debug] [RemoteDebugger] Sending '_rpc_forwardGetListing:' message to remote debugger [debug] [RemoteDebugger] Receiving data from remote debugger: '{"__argument":{"WIRApplicationIdentifierKey":"PID:1520","WIRListingKey":{}},"__selector":"_rpc_applicationSentListing:"}' [debug] [RemoteDebugger] Received response from socket send: '["PID:1520",{}]' [debug] [RemoteDebugger] Page changed: {} [debug] [RemoteDebugger] Empty page dictionary received [debug] [RemoteDebugger] Retrying connection [debug] [RemoteDebugger] Found app id key 'PID:1520' for bundle 'com.abc.def' [debug] [RemoteDebugger] Trying out the possible app ids: PID:1520 [debug] [RemoteDebugger] Selecting app PID:1520 (try #16 of 20) [debug] [RemoteDebugger] Sending '_rpc_forwardGetListing:' message to remote debugger [debug] [RemoteDebugger] Receiving data from remote debugger: '{"__argument":{"WIRApplicationIdentifierKey":"PID:1520","WIRListingKey":{}},"__selector":"_rpc_applicationSentListing:"}' [debug] [RemoteDebugger] Received response from socket send: '["PID:1520",{}]' [debug] [RemoteDebugger] Page changed: {} [debug] [RemoteDebugger] Empty page dictionary received [debug] [RemoteDebugger] Retrying connection [debug] [RemoteDebugger] Found app id key 'PID:1520' for bundle 'com.abc.def' [debug] [RemoteDebugger] Trying out the possible app ids: PID:1520 [debug] [RemoteDebugger] Selecting app PID:1520 (try #17 of 20) [debug] [RemoteDebugger] Sending '_rpc_forwardGetListing:' message to remote debugger [debug] [RemoteDebugger] Receiving data from remote debugger: '{"__argument":{"WIRApplicationIdentifierKey":"PID:1520","WIRListingKey":{}},"__selector":"_rpc_applicationSentListing:"}' [debug] [RemoteDebugger] Received response from socket send: '["PID:1520",{}]' [debug] [RemoteDebugger] Page changed: {} [debug] [RemoteDebugger] Empty page dictionary received [debug] [RemoteDebugger] Retrying connection [debug] [RemoteDebugger] Found app id key 'PID:1520' for bundle 'com.abc.def' [debug] [RemoteDebugger] Trying out the possible app ids: PID:1520 [debug] [RemoteDebugger] Selecting app PID:1520 (try #18 of 20) [debug] [RemoteDebugger] Sending '_rpc_forwardGetListing:' message to remote debugger [debug] [RemoteDebugger] Receiving data from remote debugger: '{"__argument":{"WIRApplicationIdentifierKey":"PID:1520","WIRListingKey":{}},"__selector":"_rpc_applicationSentListing:"}' [debug] [RemoteDebugger] Received response from socket send: '["PID:1520",{}]' [debug] [RemoteDebugger] Page changed: {} [debug] [RemoteDebugger] Empty page dictionary received [debug] [RemoteDebugger] Retrying connection [debug] [RemoteDebugger] Found app id key 'PID:1520' for bundle 'com.abc.def' [debug] [RemoteDebugger] Trying out the possible app ids: PID:1520 [debug] [RemoteDebugger] Selecting app PID:1520 (try #19 of 20) [debug] [RemoteDebugger] Sending '_rpc_forwardGetListing:' message to remote debugger [debug] [RemoteDebugger] Receiving data from remote debugger: '{"__argument":{"WIRApplicationIdentifierKey":"PID:1520","WIRListingKey":{}},"__selector":"_rpc_applicationSentListing:"}' [debug] [RemoteDebugger] Received response from socket send: '["PID:1520",{}]' [debug] [RemoteDebugger] Page changed: {} [debug] [RemoteDebugger] Empty page dictionary received [debug] [RemoteDebugger] Retrying connection [debug] [RemoteDebugger] Found app id key 'PID:1520' for bundle 'com.abc.def' [debug] [RemoteDebugger] Trying out the possible app ids: PID:1520 [debug] [RemoteDebugger] Selecting app PID:1520 (try #20 of 20) [debug] [RemoteDebugger] Sending '_rpc_forwardGetListing:' message to remote debugger [debug] [RemoteDebugger] Receiving data from remote debugger: '{"__argument":{"WIRApplicationIdentifierKey":"PID:1520","WIRListingKey":{}},"__selector":"_rpc_applicationSentListing:"}' [debug] [RemoteDebugger] Received response from socket send: '["PID:1520",{}]' [debug] [RemoteDebugger] Page changed: {} [debug] [RemoteDebugger] Empty page dictionary received [debug] [RemoteDebugger] Retrying connection [RemoteDebugger] Error: Could not connect to a valid app after 20 tries. at Object.wrappedLogger.errorAndThrow (lib/logger.js:60:13) at RemoteDebugger.selectApp$ (lib/remote-debugger.js:216:11) at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40) at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22) at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21) at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37) Error: Could not connect to a valid app after 20 tries. at Object.wrappedLogger.errorAndThrow (lib/logger.js:60:13) at RemoteDebugger.selectApp$ (lib/remote-debugger.js:216:11) at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40) at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22) at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21) at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37) [MJSONWP] Encountered internal error running command: Error: Could not connect to a valid app after 20 tries. at Object.wrappedLogger.errorAndThrow (lib/logger.js:60:13) at RemoteDebugger.selectApp$ (lib/remote-debugger.js:216:11) at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40) at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22) at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21) at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37) [HTTP] <-- GET /wd/hub/session/dc4f25e2-0bc0-4218-8bc0-f76b637e0cbb/contexts 500 146 ms - 219 [HTTP] --> GET /wd/hub/session/dc4f25e2-0bc0-4218-8bc0-f76b637e0cbb/screenshot {} [MJSONWP] Calling AppiumDriver.getScreenshot() with args: ["dc4f25e2-0bc0-4218-8bc0-f... [debug] [iOS] Executing iOS command 'getScreenshot' [debug] [iOS] Taking screenshot: '/var/folders/qn/cdm4l2jj21n81ytjyxpgk_44ynjphk/T/appium-instruments/Run 1/screenshote3163d19-ec80-491b-b9d7-b344670df834.png' [debug] [UIAuto] Sending command to instruments: au.capture('screenshote3163d19-ec80-491b-b9d7-b344670df834') [debug] [RemoteDebugger] Receiving data from remote debugger: '{"__argument":{"WIRApplicationIdentifierKey":"PID:938","WIRListingKey":{}},"__selector":"_rpc_applicationSentListing:"}' [debug] [RemoteDebugger] Received page change notice for app PID:938 but listening for PID:1520. Ignoring. [debug] [RemoteDebugger] Receiving data from remote debugger: '{"__argument":{"WIRApplicationIdentifierKey":"PID:1579","WIRListingKey":{"1":{"WIRTitleKey":"XĂĄc nháşn","WIRTypeKey":"WIRTypeWeb","WIRURLKey":"https://m.facebook.com/v2.5/dialog/oauth?client_id=461638860536540&default_audience=friends&display=touch&e2e=%7B%22init%22:1342.656828685%7D&fbapp_pres=0&redirect_uri=fb461638860536540://authorize/&response_type=token,signed_request&return_scopes=true&scope=user_photos,user_status,public_profile,email,user_friends,user_videos,user_posts&sdk=ios&sdk_version=4.7.1&state=%7B%22challenge%22:%228xTT1CL%252BYxzpjNahhz2qX3U8WCM%253D%22,%220_auth_logger_id%22:%2239BC77E8-A73E-464C-AFBC-A97E015CB702%22,%22com.facebook.sdk_client_state%22:true,%223_method%22:%22sfvc_auth%22%7D&sfvc=1","WIRPageIdentifierKey":1}}},"__selector":"_rpc_applicationSentListing:"}'
Thanks,
Ali