Error : 1.6 : ProxyRequestError: Could not proxy command to remote server. Original error: 403 - undefined

Hi All,

I’m trying to use Appium (1.6.0-beta3) on Mac OSX 10.11.6 with Xcode 8.0.

Installed the Appium using:
“npm -g install appium@beta”

Started the server manually on terminal using:

“appium --address “127.0.0.1” --pre-launch --debug-log-spacing --default-capabilities '{“platformName”:“iOS”, “platformVersion”:“10.0”, “automationName”:“XCUITest”, “deviceName”:“iPad”, “app”:”/Users/maesiva/Development/ScaryBugs4_SimAir210/ScaryBugs4.app", “udid”:“9A78F5E4-46F6-4536-A487-19230E0384F6”, “nativeInstrumentsLib”:true}’"

Using a Maven project on Netbeans, below is the test code snippet:

DesiredCapabilities capabilities = new DesiredCapabilities();

capabilities.setCapability("app", "/Users/maesiva/Development/ScaryBugs4_SimAir210/ScaryBugs4.app");
capabilities.setCapability("device", "iPad");
capabilities.setCapability("udid", "9A78F5E4-46F6-4536-A487-19230E0384F6");
	capabilities.setCapability("deviceName", "iPad Air 2");
	capabilities.setCapability("platformName", "iOS");
	capabilities.setCapability("platformVersion", "10.0");
	capabilities.setCapability("automationName", "XCUITest");                

driver = new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);

======

I’m using a Simulator of iOS 10.0, and below is the error I’m facing:

Attached the logs file.
logs_appium_maesiva.log (12.1 KB)

++
WebDriverAgent page “http://10.102.172.186:8100” on browser, it displays:

{
“value” : “Unhandled endpoint: / – http://10.102.172.186:8100/ with parameters {\n wildcards = (\n “”\n );\n}”,
“sessionId” : “09E3D9DE-1849-4075-B465-9668395F8339”,
“status” : 1
}

Please let me know if any further information is needed.
Thanks in advance for your support.

++
Got Appium 1.6 notification. Updating using:
npm install -g appium

I will update the results further.

++
I’m still getting same error after updating to 1.6. Pasted below. Something wrong with my capabilities json ?

[JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {“desiredCapabilities”:{"bu…
[XCUITest] ProxyRequestError: Could not proxy command to remote server. Original error: 403 - undefined
at JWProxy.proxy$ (lib/jsonwp-proxy/proxy.js:122:13)

I think you should take the udid setting out of your capabilities. You only need udid for real devices.

Thanks for the quick response.
Tried removing udid from both test code and server start command.
Still same behavior observed:
On Simulator, App & WebDriverAgent get installed, WebDriverAgent starts and then, server throws error.

HI,

Re-install ios-webkit-debug-proxy via brew.
brew install ios-webkit-debug-proxy
This solved the issue at my end.

Thanks Anil for the suggestion.

However, issue seems to be something else. I got rid of it after reinstalling appium, my app, WebDriverAgent and playing around with http_proxy, no_proxy environment variables. Not sure what exactly solved it.