Appium-desktop: MAC OS 10.13.4 + Appium + 1.6.1 + ios-webkit-debug-proxy 1.8 and Safgari Browser issue

Created on 15 May 2018  Â·  13Comments  Â·  Source: appium/appium-desktop

Hi - We are having issues in real device safari browser automation using Appium and ios-webkit-debug-proxy. Below is the log file from Appium console. Please note if we browse "http://localhost:27753" using any browser then system is showing the device page dom in the console but some how appium isn't able to connect to the ios-webkit-debug-proxy. Device IOS version is 11.3.1

The server is running

[Appium] Welcome to Appium v1.8.0
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"automationName":"XCUITest","browserName":"Safari","deviceName":"iPhone 7","platformName":"iOS","udid":"38e3dab55585052a8dd65db30d2c1ca05572148c","newCommandTimeout":0,"connectHardwareKeyboard":true}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{"automationName":"XCUITest","browserName":"Safari","deviceName":"iPhone 7","platformName":"iOS","udid":"38e3dab55585052a8dd65db30d2c1ca05572148c","newCommandTimeout":0,"connectHardwareKeyboard":true},null,null]
[BaseDriver] Event 'newSessionRequested' logged at 1526388445869 (18:17:25 GMT+0530 (IST))
[Appium] Creating new XCUITestDriver (v2.79.3) session
[Appium] Capabilities:
[Appium] automationName: XCUITest
[Appium] browserName: Safari
[Appium] deviceName: iPhone 7
[Appium] platformName: iOS
[Appium] udid: 38e3dab55585052a8dd65db30d2c1ca05572148c
[Appium] newCommandTimeout: 0
[Appium] connectHardwareKeyboard: true
[BaseDriver] Creating session with MJSONWP desired capabilities: {"automationName":"XCUITest...
[BaseDriver] Session created with session id: 03f75dfd-3854-42f5-ba81-0beefc1e8d50
[XCUITest] Current user: 'admin'
[XCUITest] Xcode version set to '9.3.1' (tools v9.3.0.0.1.1521514116)
[XCUITest] iOS SDK Version set to '11.3'
[BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1526388445992 (18:17:25 GMT+0530 (IST))
[XCUITest] Available devices: 38e3dab55585052a8dd65db30d2c1ca05572148c
[XCUITest] Creating iDevice object with udid '38e3dab55585052a8dd65db30d2c1ca05572148c'
[XCUITest] Determining device to run tests on: udid: '38e3dab55585052a8dd65db30d2c1ca05572148c', real device: true
[XCUITest] Safari test requested
[BaseDriver] Event 'appConfigured' logged at 1526388446161 (18:17:26 GMT+0530 (IST))
[BaseDriver] Event 'resetStarted' logged at 1526388446161 (18:17:26 GMT+0530 (IST))
[XCUITest] Reset: running ios real device reset flow
[BaseDriver] Event 'resetComplete' logged at 1526388446161 (18:17:26 GMT+0530 (IST))
[iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[iOSLog] Starting iOS device log capture with: 'idevicesyslog'
[BaseDriver] Event 'logCaptureStarted' logged at 1526388446488 (18:17:26 GMT+0530 (IST))
[XCUITest] Setting up real device
[XCUITest] Using WDA path: '/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Using WDA agent: '/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj'
[XCUITest] No obsolete cached processes from previous WDA sessions listening on port 8100 have been found
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Got response with status 200: "{\n \"value\" : {\n \"state\" : \"success\",\n \"os\" : {\n \"name\" : \"iOS\",\n \"version\" : \"11.3.1\",\n \"sdkVersion\" : \"11.3\"\n },\n \"ios\" : {\n \"simulatorVersion\" : \"11.3.1\",\n \"ip\" : \"10.65.223.176\"\n },\n \"build\" : {\n \"time\" : \"May 15 2018 18:14:34\"\n }\n },\n \"sessionId\" : \"4732CB4A-BEA4-46AB-B71A-21A7CA93CCE1\",\n \"status\" : 0\n}"
[XCUITest] Will reuse previously cached WDA instance at 'http://localhost:8100/'. Set the wdaLocalPort capability to a value different from 8100 if this is an undesired behavior.
[BaseDriver] Event 'wdaStartAttempted' logged at 1526388446560 (18:17:26 GMT+0530 (IST))
[XCUITest] Using provided WebdriverAgent at 'http://localhost:8100/'
[BaseDriver] Event 'wdaSessionAttempted' logged at 1526388446561 (18:17:26 GMT+0530 (IST))
[XCUITest] Sending createSession command to WDA
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Got response with status 200: "{\n \"value\" : {\n \"state\" : \"success\",\n \"os\" : {\n \"name\" : \"iOS\",\n \"version\" : \"11.3.1\",\n \"sdkVersion\" : \"11.3\"\n },\n \"ios\" : {\n \"simulatorVersion\" : \"11.3.1\",\n \"ip\" : \"10.65.223.176\"\n },\n \"build\" : {\n \"time\" : \"May 15 2018 18:14:34\"\n }\n },\n \"sessionId\" : \"4732CB4A-BEA4-46AB-B71A-21A7CA93CCE1\",\n \"status\" : 0\n}"
[JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"desiredCapabilities":{"bundleId":"com.apple.mobilesafari","arguments":["-u","http://appium.io"],"environment":{},"shouldWaitForQuiescence":true,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true}}
[JSONWP Proxy] Got response with status 200: {"value":{"sessionId":"C54FCDC9-0D52-42C1-9152-8E0AD97B62D6","capabilities":{"device":"iphone","browserName":"Safari","sdkVersion":"11.3.1","CFBundleIdentifier":"com.apple.mobilesafari"}},"sessionId":"C54FCDC9-0D52-42C1-9152-8E0AD97B62D6","status":0}
[BaseDriver] Event 'wdaSessionStarted' logged at 1526388449059 (18:17:29 GMT+0530 (IST))
[BaseDriver] Event 'wdaStarted' logged at 1526388449059 (18:17:29 GMT+0530 (IST))
[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 1526388449059 (18:17:29 GMT+0530 (IST))
[XCUITest] Waiting for initial webview
[iOS] Waiting for 3000 ms before navigating to view.
[iOS] Navigating to most recently opened webview
[iOS] Retrieving contexts and views
[iOS] Selecting by url: true (expected url: 'http://appium.io')
[RemoteDebugger] Getting WebKitRemoteDebugger pageArray: localhost, 27753
[RemoteDebugger] Sending request to: http://localhost:27753/json
[RemoteDebugger] Page element JSON: [{"devtoolsFrontendUrl":"/devtools/devtools.html?ws=localhost:27753/devtools/page/3","faviconUrl":"","thumbnailUrl":"/thumb/http://appium.io/","title":"Appium: Mobile App Automation Made Awesome.","url":"http://appium.io/","webSocketDebuggerUrl":"ws://localhost:27753/devtools/page/3","appId":"PID:312"}]
[iOS] Retrieving contexts and views
[iOS] Selecting by url: true (expected url: 'http://appium.io')
[RemoteDebugger] Getting WebKitRemoteDebugger pageArray: localhost, 27753
[RemoteDebugger] Sending request to: http://localhost:27753/json
[RemoteDebugger] Page element JSON: [{"devtoolsFrontendUrl":"/devtools/devtools.html?ws=localhost:27753/devtools/page/3","faviconUrl":"","thumbnailUrl":"/thumb/http://appium.io/","title":"Appium: Mobile App Automation Made Awesome.","url":"http://appium.io/","webSocketDebuggerUrl":"ws://localhost:27753/devtools/page/3","appId":"PID:312"}]
[iOS] Picking webview 'WEBVIEW_3'
[iOS] Attempting to set context to 'WEBVIEW_3'
[RemoteDebugger] WebKit debugger web socket connected to url: ws://localhost:27753/devtools/page/3
[RemoteDebugger] Starting to listen for JavaScript console
[RemoteDebugger] Sending WebKit data: {"method":"Console.enable","params":{"objectGroup":"console","includeCommandLineAPI":true,"doNotPauseOnExceptionsAndMuteConsole":true}}
[RemoteDebugger] Webkit response timeout: 5000
[RemoteDebugger] Receiving WebKit data: '{"result":{},"id":1}'
[RemoteDebugger] Found handler for message '1'
[RemoteDebugger] WebKit debugger got a message for 'Console.enable' and have no handler, doing nothing.
[XCUITest] TimeoutError: operation timed out
[XCUITest] at afterTimeout (/Applications/Appium.app/Contents/Resources/app/node_modules/bluebird/js/release/timers.js:46:19)
[XCUITest] at Timeout.timeoutTimeout [as _onTimeout] (/Applications/Appium.app/Contents/Resources/app/node_modules/bluebird/js/release/timers.js:76:13)
[XCUITest] at ontimeout (timers.js:475:11)
[XCUITest] at tryOnTimeout (timers.js:310:5)
[XCUITest] at Timer.listOnTimeout (timers.js:270:5)
[JSONWP Proxy] Proxying [DELETE /session/03f75dfd-3854-42f5-ba81-0beefc1e8d50] to [DELETE http://localhost:8100/session/C54FCDC9-0D52-42C1-9152-8E0AD97B62D6] with no body
[JSONWP Proxy] Got response with status 200: "{\n \"value\" : {\n\n },\n \"sessionId\" : \"0E40AB91-646A-4817-BD6C-6C6D59F0B2D0\",\n \"status\" : 0\n}"
[XCUITest] Not clearing log files. Use clearSystemFiles capability to turn on.
[XCUITest] In a web session. Removing remote debugger
[RemoteDebugger] Disconnecting from WebKit remote debugger
[iOSLog] Stopping iOS log capture
[RemoteDebugger] WebKit remote debugger socket disconnected
[BaseDriver] Event 'newSessionStarted' logged at 1526388457447 (18:17:37 GMT+0530 (IST))
[MJSONWP] Encountered internal error running command: TimeoutError: operation timed out
[MJSONWP] at afterTimeout (/Applications/Appium.app/Contents/Resources/app/node_modules/bluebird/js/release/timers.js:46:19)
[MJSONWP] at Timeout.timeoutTimeout [as _onTimeout] (/Applications/Appium.app/Contents/Resources/app/node_modules/bluebird/js/release/timers.js:76:13)
[MJSONWP] at ontimeout (timers.js:475:11)
[MJSONWP] at tryOnTimeout (timers.js:310:5)
[MJSONWP] at Timer.listOnTimeout (timers.js:270:5)
[HTTP] <-- POST /wd/hub/session 500 11580 ms - 156
[HTTP]
[XCUITest] Connection to WDA timed out
[iProxy] recv failed: Operation not permitted

Most helpful comment

Hi again! I fixed my problem

  1. npm uninstall -g appium
    npm install -g appium@beta
  2. update node to the latest version
  3. run Appium from Terminal
  4. follow this instruction https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md
  5. start ios_webkit_debug_proxy
    Profit!
    So as I understand my problem was with node version and not latest Appium version

All 13 comments

Please note Safari web inspector is already enabled.

ios_webkit_debug_proxy -V
ios_webkit_debug_proxy 1.8
Built with libimobiledevice v1.2.1, libplist v2.0.0

Title of the issue is wrong, you are clearly using 1.8.0 appium instead of 1.6.1. Anyways, I replying because the same happens for me with Appium 1.8.1 on Safari. 1.7.2 does not have this problem. Can anyone assist please?

Hi @mcopjan yes having latest libimobiledevice and ios_webkit and still facing the same issue. I compared the above logs with mine and exact same issue facing. Assistance would help!!!

tagging @imurchie & @jlipps

Please try the latest beta release:

npm uninstall -g appium
npm install -g appium@beta

Hi @imurchie Is it available in Appium Desktop. Using Appium Desktop 1.6.1.dmg?

Hi! Have the same problem
Tried Appium 1.8.0 and 1.8.1. ios_webkit_debug_proxy 1.8
Built with libimobiledevice v1.2.0, libplist v2.0.0
iPhone 6 Plus with iOS 10.3, iPhone 7 with iOS 11.2
Appium logs are the same like in first comment

Hi again! I fixed my problem

  1. npm uninstall -g appium
    npm install -g appium@beta
  2. update node to the latest version
  3. run Appium from Terminal
  4. follow this instruction https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md
  5. start ios_webkit_debug_proxy
    Profit!
    So as I understand my problem was with node version and not latest Appium version

This will be fixed in the next release of Appium Desktop (1.6.2)

This issue is resolved after instslling appium@beta through npm.

On Wed, 23 May 2018, 4:08 pm mcopjan, notifications@github.com wrote:

Title of the issue is wrong, you are clearly using 1.8.0 appium instead of
1.6.1. Anyways, I replying because the same happens for me with Appium
1.8.1 on Safari. 1.7.2 does not have this problem. Can anyone assist please?

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/appium/appium-desktop/issues/542#issuecomment-391301771,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AcWMBp7ia58KBUK_cqniIPkIeQRq0R69ks5t1TwOgaJpZM4T_fWR
.

Hello.

Same issue using Appium Desktop 1.6.2

OS 10.13.5
npm 6.1.0
node 8.11.3
IWDP 1.8
libimobiledevice 1.2.1
appium 1.8.2-beta

Note: everything works when running from the command line

Issue: [XCUITest] TimeoutError: operation timed out

Note:

The local appium was installed via npm for cli only - not from Appium Desktop. This is for real device testing and all proper steps were taken.

Stack:

macOS 10.13.5
node v10.2.1
npm v6.1.0
appium v1.8.1
ios_webkit_debug_proxy v1.8 (startIWDP true)
libimobiledevice v1.2.1
carthage v0.29.0
ios-deploy v1.9.2
homebrew v1.6.9

Capabilities:

{
  "app": "[absolute app path]",
  "platformName": "iOS",
  "platformVersion": "11.4",
  "deviceName": "[device name]",
  "udid": "[udid]",
  "autoWebview": true,
  "webkitResponseTimeout": 10000,
  "noReset": true,
  "fullReset": false,
  "startIWDP": true
}

Solution:

npm install -g appium@beta _the beta version is 1.8.2-beta_

Was this page helpful?
0 / 5 - 0 ratings