Skip to content

Debug proxy does not respond when appium session is open #291

Closed
@debugger89

Description

@debugger89

Im facing the an issue while trying to interact with the debug proxy web service connectivity when there is a Appium web session up and running.

Environment :

Mac Os X 10.14.1
Xcode 10.1
Appium Server 1.10
IOS Simulator : IPhone 5 - 10.3.1

Issue re-production steps

  1. Start an Appium web session in the simulator.
    DesiredCapabilities desiredCapabilities = new DesiredCapabilities(); desiredCapabilities.setCapability(MobileCapabilityType.BROWSER_NAME, "Safari"); desiredCapabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "iOS"); desiredCapabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "10.3"); desiredCapabilities.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT, "10000"); desiredCapabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "iPhone 5"); URL url = new URL("http://127.0.0.1:4723/wd/hub"); driver = new IOSDriver(url, desiredCapabilities);
  2. Now try to use the debug proxy web service for getting a screenshot. (The websocket message is sent via a 3rd party chrome extension)
    ws://127.0.0.1:9191/devtools/page/1
    { "id": 1, "method": "Page.startScreencast", "params": { "format": "jpeg" } } {"id":1,"result":{}}

Expected result :

The web socket should receive another message with the screenshot base64 image string.
`
{
"id": 1,
"method": "Page.startScreencast",
"params": {
"format": "jpeg"
}
}

{"id":1,"result":{}}

{
"method": "Page.screencastFrame",
"params": {
"data": "iVBORw0KGgoAAAANSUhEUgAAAUAAAAHMCAYAAACk4......",
"metadata": {
"pageScaleFactor": 2,
"offsetTop": 0,
"deviceWidth": 320,
"deviceHeight": 460,
"scrollOffsetX": 0,
"scrollOffsetY": 0,
"timestamp": "2019-01-01T08:14:17.433Z"
},
"sessionId": 1
}
}
`

Observations

Appium remote debugger log suggests that the message is captured by remote debugger but my websocket client never gets the message.

[RemoteDebugger] Debugger returned data for message '-17' but we were not waiting for that message! result: '{"result":{"type":"string","value":"980,1409,2"},"wasThrown":false}'; error: 'null'

If the appium session is terminated, the above message works without any issue and returns the intended result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions