Unable to start WebDriverAgent - Unexpected token < in JSON

Hi,

I have been running Appium from source with no issue for some time. I tried to update my branch last Thursday and since then have been getting the following error right after the WebDriverAgent tries to start:

[JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {“desiredCapabilities”:{"bu…
[XCUITest] SyntaxError: Unexpected token < in JSON at position 0
at Object.parse (native)
at new ProxyRequestError (lib/mjsonwp/errors.js:322:26)
at JWProxy.proxy$ (lib/jsonwp-proxy/proxy.js:117:13)
at tryCatch (/Users/i834148/Desktop/appiumdev2/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/i834148/Desktop/appiumdev2/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/Users/i834148/Desktop/appiumdev2/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Users/i834148/Desktop/appiumdev2/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
SyntaxError: Unexpected token < in JSON at position 0
at Object.parse (native)
at new ProxyRequestError (lib/mjsonwp/errors.js:322:26)
at JWProxy.proxy$ (lib/jsonwp-proxy/proxy.js:117:13)
at tryCatch (/Users/i834148/Desktop/appiumdev2/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/i834148/Desktop/appiumdev2/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/Users/i834148/Desktop/appiumdev2/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Users/i834148/Desktop/appiumdev2/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[XCUITest] Shutting down WebDriverAgent
[XCUITest] Simulator log exited with code ‘null’
[XCUITest] xcodebuild exited with code ‘null’ and signal ‘SIGTERM’

I have tried resetting the simulator, restarting my machine, cloning to a completely new/fresh folder and am unable to get anything to work. My coworker is on the same network and followed the same steps and seems to have no issue.

Any ideas?

Thanks

1 Like

Im seeing the same issue too.
I see the same error when I use the appium beta installed using npm and the one from source.

Updated the code, then ran
Scripts/build.sh -d
then npm install was clean.

@aaronf,@bmvbab, Are you guys able to resolve this issue?

nope @Vishi, tracking here: