question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ios debug webkit proxy disconnects while connecting to webview on Appium 1.6.0

See original GitHub issue

The problem

ios debug webkit proxy disconnects, as soon as the gets app deployed on the the phone.

I run a shell script to runs this command before creating the ios driver: ios_webkit_debug_proxy -c 9f18f3f8f092bce333b63fd1e50a36332109654f:27753

Have added the desired capabilities below. This works fine on Appium 1.5.3, noticed this happening since moving to XcuiTest i.e Appium 1.6.0 I have to manually run the command, to get connected and get Webviews after the first attempt to connect to debug proxy fails.

Already added comments about ios debug webkit proxy here: https://github.com/google/ios-webkit-debug-proxy/issues/143

Environment

  • Appium version (or git revision) that exhibits the issue: 1.6.0
  • Last Appium version that did not exhibit the issue (if applicable): 1.5.3
  • Desktop OS/version used to run Appium: OSX 10.11.6
  • Node.js version (unless using Appium.app|exe): v5.5.0
  • Mobile platform/version under test: iOS 9.3.5
  • Real device or emulator/simulator: iPhone 5s
  • Appium CLI

Link to Appium logs

Appium Log: https://gist.github.com/mayureshshirodkar/21190b801c0555fde504158da59cd629

ios_webkit_debug error: ^CMacBook-Pro:~ shirodkm$ ios_webkit_debug_proxy -c 9f18f3f8f092bce333b63fd1e50a36332109654f:27753 Connected :27753 to iPhone (9f18f3f8f092bce333b63fd1e50a36332109654f) Unknown app_id PID:1973 Invalid message _rpc_applicationSentListing: <dict> <key>WIRApplicationIdentifierKey</key> <string>PID:1973</string> <key>WIRListingKey</key> <dict> <key>8</key> <dict> <key>WIRPageIdentifierKey</key> <integer>8</integer> <key>WIRTitleKey</key> <string>JSContext</string> <key>WIRTypeKey</key> <string>WIRTypeJavaScript</string> </dict> </dict> </dict> Disconnected :27753 from iPhone (9f18f3f8f092bce333b63fd1e50a36332109654f)

Code To Reproduce Issue [ Good To Have ]

    DesiredCapabilities iOSCapabilities = new DesiredCapabilities();
    iOSCapabilities.setCapability("deviceName", Base.readInternalHash("ios_device"));
    iOSCapabilities.setCapability("platformVersion", Base.readInternalHash("ios_version"));
    iOSCapabilities.setCapability("automationName", "XCUITest");
    iOSCapabilities.setCapability("showXcodeLog", true);
    iOSCapabilities.setCapability("realDeviceLogger", "/usr/local/lib/node_modules/deviceconsole/deviceconsole");
    iOSCapabilities.setCapability("app", System.getProperty("user.dir") + Base.readInternalHash("ios_app"));
    iOSCapabilities.setCapability("bundleId", Base.readInternalHash("bundle_id"));
    iOSCapabilities.setCapability("newCommandTimeout", 500);
    iOSCapabilities.setCapability("autoWebview", true);
    iOSCapabilities.setCapability("autoWebviewTimeout", 12000);
    //iOSCapabilities.setCapability("fullReset", true);
    iOSCapabilities.setCapability("autoAcceptAlerts", true);
    iOSCapabilities.setCapability("udid", Base.readInternalHash("udid"));

    driver = new IOSDriver(new URL(Base.readInternalHash("url_ios")), iosNative());

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
testingIOScommented, Nov 1, 2016

Encountered same issue on iOS 9.3.5 iPad device while setting the webview context using XcuiTest i.e Appium 1.6.0. We need this fix soon, it is blocking to continue the tests unless manual intervension

0reactions
lock[bot]commented, Apr 28, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to find WEBVIEW in an hybrid app possibly due to ios ...
I m trying to find WEBVIEW in an hybrid app but all I m getting back is NATIVE_APP. Here`s my setup: xcode 10.2;...
Read more >
Appium inspector is always loading - Stack Overflow
I was testing on an Android device, so I changed my "automationName" field to "UiAutomator2" and it worked for me. For iOS you...
Read more >
appium | Yarn - Package Manager
Appium is an open-source, cross-platform test automation tool for native, hybrid, and mobile web and desktop apps. We support simulators (iOS), ...
Read more >
Index (java-client API) - javadoc.io
Key code constant: 'A' key. ABSOLUTE_WEB_LOCATIONS_OPTION - Static variable in interface io.appium.java_client.ios.options.webview.
Read more >
Source - GitHub
iOS (XCUITest) * Decode cookies safely in WebView context ... capability to allow Appium to handle starting/stopping `ios-webkit-debug-proxy` automatically.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found