facebookarchive / WebDriverAgent

A WebDriver server for iOS that runs inside the Simulator.
Other
4.15k stars 1.37k forks source link

inspector could not get page source after running app successfully on ios12 with appium #1015

Open yuesongjie opened 6 years ago

yuesongjie commented 6 years ago

The problem I have successfully run app on real device(ios12) through appium mac app on Mac but the page keeps showing 'Gathering initial app source...' and could not show the page source as before when using xcode 9 and ios11 device.

Environment Appium version (or git revision) that exhibits the issue:V1.9.1 Last Appium version that did not exhibit the issue (if applicable):I can't remember Desktop OS/version used to run Appium:.1.7.1 Node.js version (unless using Appium.app|exe): Mobile platform/version under test:ios12 Real device or emulator/simulator:real device iphone6s plus Appium CLI or Appium.app|exe: Details as the picture shows image

report

[XCUITest] WebDriverAgent information: [XCUITest] { [XCUITest] "state": "success", [XCUITest] "os": { [XCUITest] "name": "iOS", [XCUITest] "version": "12.0.1" [XCUITest] }, [XCUITest] "ios": { [XCUITest] "simulatorVersion": "12.0.1", [XCUITest] "ip": "192.168.3.4" [XCUITest] }, [XCUITest] "build": { [XCUITest] "time": "Oct 22 2018 11:43:42" [XCUITest] } [XCUITest] } [XCUITest] WebDriverAgent successfully started after 20421ms [BaseDriver] Event 'wdaSessionAttempted' logged at 1540193093828 (15:24:53 GMT+0800 (CST)) [XCUITest] Sending createSession command to WDA [JSONWP Proxy] Matched '/session' to command name 'createSession' [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"desiredCapabilities":{"bundleId":"com.lanyiapplive.qizhichan","arguments":[],"environment":{},"shouldWaitForQuiescence":true,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true}} [JSONWP Proxy] Got response with status 200: {"value":{"sessionId":"BD42BAA5-2704-46E8-A6CB-EA2A4F9E6061","capabilities":{"device":"iphone","browserName":"七指禅","sdkVersion":"12.0.1","CFBundleIdentifier":"com.lanyiapplive.qizhichan"}},"sessionId":"BD42BAA5-2704-46E8-A6CB-EA2A4F9E6061","status":0} [BaseDriver] Event 'wdaSessionStarted' logged at 1540193097159 (15:24:57 GMT+0800 (CST)) [BaseDriver] Event 'wdaStarted' logged at 1540193097160 (15:24:57 GMT+0800 (CST)) [XCUITest] Skipping setting of the initial display orientation. Set the "orientation" capability to either "LANDSCAPE" or "PORTRAIT", if this is an undesired behavior. [BaseDriver] Event 'orientationSet' logged at 1540193097162 (15:24:57 GMT+0800 (CST)) [Appium] New XCUITestDriver session created successfully, session 74bb958d-59fc-4dbb-a1d8-43eb876e6c74 added to master session list [BaseDriver] Event 'newSessionStarted' logged at 1540193097167 (15:24:57 GMT+0800 (CST)) [MJSONWP] Cached the protocol value 'MJSONWP' for the new session 74bb958d-59fc-4dbb-a1d8-43eb876e6c74 [MJSONWP] Responding to client with driver.createSession() result: {"webStorageEnabled":false,"locationContextEnabled":false,"browserName":"","platform":"MAC","javascriptEnabled":true,"databaseEnabled":false,"takesScreenshot":true,"networkConnectionEnabled":false,"automationName":"XCUITest","bundleId":"com.lanyiapplive.qizhichan","deviceName":"iPhone 6s Plus","noReset":true,"platformName":"iOS","platformVersion":"12.0.1","udid":"6eaec690714d9d23c386339e0c07268109d9fabc","newCommandTimeout":0,"connectHardwareKeyboard":true} [HTTP] <-- POST /wd/hub/session 200 31926 ms - 533 [HTTP] [HTTP] --> POST /wd/hub/session/74bb958d-59fc-4dbb-a1d8-43eb876e6c74/context [HTTP] {"name":"NATIVE_APP"} [MJSONWP] Calling AppiumDriver.setContext() with args: ["NATIVE_APP","74bb958d-59fc-4dbb-a1d8-43eb876e6c74"] [XCUITest] Executing command 'setContext' [iOS] Attempting to set context to 'NATIVE_APP' [MJSONWP] Responding to client with driver.setContext() result: null [HTTP] <-- POST /wd/hub/session/74bb958d-59fc-4dbb-a1d8-43eb876e6c74/context 200 6 ms - 76 [HTTP] [HTTP] --> GET /wd/hub/session/74bb958d-59fc-4dbb-a1d8-43eb876e6c74/source [HTTP] {} [MJSONWP] Calling AppiumDriver.getPageSource() with args: ["74bb958d-59fc-4dbb-a1d8-43eb876e6c74"] [XCUITest] Executing command 'getPageSource' [JSONWP Proxy] Matched '/source' to command name 'getPageSource' [JSONWP Proxy] Proxying [GET /source] to [GET http://localhost:8100/session/BD42BAA5-2704-46E8-A6CB-EA2A4F9E6061/source] with no body [HTTP] <-- GET /wd/hub/session/74bb958d-59fc-4dbb-a1d8-43eb876e6c74/source - - ms - - [HTTP] [HTTP] --> GET /wd/hub/session/74bb958d-59fc-4dbb-a1d8-43eb876e6c74/source [HTTP] {} [MJSONWP] Calling AppiumDriver.getPageSource() with args: ["74bb958d-59fc-4dbb-a1d8-43eb876e6c74"] [XCUITest] Executing command 'getPageSource'

corley-tim commented 6 years ago

Experiencing the same issue - the inspector hangs indefinitely & unable to capture screenshot.

Environment:

[HTTP] <-- POST /wd/hub/session 200 12100 ms - 563 [HTTP] [HTTP] --> POST /wd/hub/session/658ccb12-6fb5-4907-88e7-7ee88e72183b/context [HTTP] {"name":"NATIVE_APP"} [MJSONWP] Calling AppiumDriver.setContext() with args: ["NATIVE_APP","658ccb12-6fb5-4907-88e7-7ee88e72183b"] [XCUITest] Executing command 'setContext' [iOS] Attempting to set context to 'NATIVE_APP' [MJSONWP] Responding to client with driver.setContext() result: null [HTTP] <-- POST /wd/hub/session/658ccb12-6fb5-4907-88e7-7ee88e72183b/context 200 5 ms - 76 [HTTP] [HTTP] --> GET /wd/hub/session/658ccb12-6fb5-4907-88e7-7ee88e72183b/source [HTTP] {} [MJSONWP] Calling AppiumDriver.getPageSource() with args: ["658ccb12-6fb5-4907-88e7-7ee88e72183b"] [XCUITest] Executing command 'getPageSource' [JSONWP Proxy] Matched '/source' to command name 'getPageSource' [JSONWP Proxy] Proxying [GET /source] to [GET http://localhost:8100/session/568C02F8-0C70-4193-B79E-74F76A5B9B2A/source] with no body [XCUITest] Connection to WDA timed out [MJSONWP] Encountered internal error running command: UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: ESOCKETTIMEDOUT

damanarendra520 commented 5 years ago

Any updates on this?, cannot load page source with either iOSSimulator or RealDevice.

iOS : 12.1 Xcode: 10.1 Mac OS : Mojave V10.14.2 RealDevice : iPhone6S(12.1.1)

[MJSONWP (ea67385e)] Calling AppiumDriver.getPageSource() with args: ["ea67385e-b3cb-407f-88bf-e459521f3527"] [XCUITest] Executing command 'getPageSource' [JSONWP Proxy] Got response with status 200: {"value":[],"sessionId":"300F3459-969A-4890-B042-1380CFFD1122","status":0} [BaseDriver] Valid locator strategies for this request: xpath, id, name, class name, -ios predicate string, -ios class chain, accessibility id [BaseDriver] Waiting up to 0 ms for condition [JSONWP Proxy] Matched '/elements' to command name 'findElements' [JSONWP Proxy] Proxying [POST /elements] to [POST http://localhost:8100/session/300F3459-969A-4890-B042-1380CFFD1122/elements] with body: {"using":"xpath","value":"//XCUIElementTypeApplication[@name=\"\"]/XCUIElementTypeWindow[3]"} [MJSONWP (ea67385e)] Responding to client with driver.findElements() result: [] [HTTP] <-- POST /wd/hub/session/ea67385e-b3cb-407f-88bf-e459521f3527/elements 200 289222 ms - 74 [HTTP] [HTTP] --> DELETE /wd/hub/session/ea67385e-b3cb-407f-88bf-e459521f3527 [HTTP] {} [MJSONWP (ea67385e)] Calling AppiumDriver.deleteSession() with args: ["ea67385e-b3cb-407f-88bf-e459521f3527"] [BaseDriver] Event 'quitSessionRequested' logged at 1547755690872 (15:08:10 GMT-0500 (EST)) [Appium] Removing session ea67385e-b3cb-407f-88bf-e459521f3527 from our master session list [JSONWP Proxy] Matched '/session/ea67385e-b3cb-407f-88bf-e459521f3527' to command name 'deleteSession' [JSONWP Proxy] Proxying [DELETE /session/ea67385e-b3cb-407f-88bf-e459521f3527] to [DELETE http://localhost:8100/session/300F3459-969A-4890-B042-1380CFFD1122] with no body [HTTP] --> GET /wd/hub/sessions [HTTP] {} [GENERIC] Calling AppiumDriver.getSessions() with args: [] [GENERIC] Responding to client with driver.getSessions() result: [] [HTTP] <-- GET /wd/hub/sessions 200 2 ms - 40 [HTTP] [JSONWP Proxy] Got response with status 200: {"value":[{"ELEMENT":"06000000-0000-0000-4D37-000000000000"}],"sessionId":"300F3459-969A-4890-B042-1380CFFD1122","status":0} [BaseDriver] Valid locator strategies for this request: xpath, id, name, class name, -ios predicate string, -ios class chain, accessibility id [BaseDriver] Waiting up to 0 ms for condition [JSONWP Proxy] Matched '/elements' to command name 'findElements' [JSONWP Proxy] Proxying [POST /elements] to [POST http://localhost:8100/session/300F3459-969A-4890-B042-1380CFFD1122/elements] with body: {"using":"xpath","value":"//XCUIElementTypeApplication[@name=\"**\"]/XCUIElementTypeWindow[2]"} [MJSONWP (ea67385e)] Responding to client with driver.findElements() result: [{"element-6066-11e4-a52e-4f735466cecf":"06000000-0000-0000-4D37-000000000000","ELEMENT":"06000000-0000-0000-4D37-000000000000"}] [HTTP] <-- POST /wd/hub/session/ea67385e-b3cb-407f-88bf-e459521f3527/elements 200 573729 ms - 201

anand-y commented 5 years ago

Did anyone find any possible solution to this problem?