NetrisTV / ws-scrcpy

Web client prototype for scrcpy.
MIT License
1.71k stars 336 forks source link

Unable to launch wedDriverAgent because of XCodebuild failure. XCode build failed with code 65. #333

Open tarunvarma334 opened 2 weeks ago

tarunvarma334 commented 2 weeks ago

I am trying to execute from my dist folder by giving node index.js at ws-scrcpy-master/dist>

I am getting this in my logs:--

QPaaSICNM2000:dist qpaas$ node index.js

Listening on:

   http://localhost:8000/

  info XCUITest XCUITestDriver server listening on http://126.0.0.1:8001/

dbug BaseDriver Creating session with MJSONWP desired capabilities: {

dbug BaseDriver   "platformName": "iOS",

dbug BaseDriver   "deviceName": "my iphone",

dbug BaseDriver   "udid": "00008030-000569803C78802E",

dbug BaseDriver   "wdaLocalPort": 8002,

dbug BaseDriver   "usePrebuiltWDA": true,

dbug BaseDriver   "mjpegServerPort": 9100

dbug BaseDriver }

info XCUITest The desired capabilities include neither an app nor a bundleId. WebDriverAgent will be started without the default app

WARN XCUITest 'platformVersion' capability ('undefined') is not a valid version number. Consider fixing it or be ready to experience an inconsistent driver behavior.

info BaseDriver Session created with session id: be214ca6-7b46-4f50-a2bc-bd555987****

dbug XCUITest Current user: 'qpaas'

dbug XCUITest Available devices: 00008120-000E39193A10, 00008030-000569803C78

dbug XCUITest Creating iDevice object with udid '00008030-000569803C78****'

info XCUITest Determining device to run tests on: udid: '00008030-000569803C78****', real device: true

info XCUITest No platformVersion specified. Using device version: '17.0.1'

info XCUITest Normalized platformVersion capability value '17.0.1' to '17.0'

dbug BaseDriver Event 'xcodeDetailsRetrieved' logged at 1729755777012 (13:12:57 GMT+0530 (India Standard Time))

dbug BaseDriver Event 'appConfigured' logged at 1729755777012 (13:12:57 GMT+0530 (India Standard Time))

dbug BaseDriver Event 'resetStarted' logged at 1729755777012 (13:12:57 GMT+0530 (India Standard Time))

dbug XCUITest Reset: running ios real device reset flow

dbug BaseDriver Event 'resetComplete' logged at 1729755777013 (13:12:57 GMT+0530 (India Standard Time))

info WebDriverAgent Using WDA path: '/Users/qpaas/Downloads/ws-scrcpy-master/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent'

info WebDriverAgent Using WDA agent: '/Users/qpaas/Downloads/ws-scrcpy-master/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj'

dbug WebDriverAgent Parsed BUILD_DIR configuration value: '/Users/qpaas/Library/Developer/Xcode/DerivedData/WebDriverAgent-ciomogsmbqkzrwaqiyxpqjzocrsh/Build/Products'

dbug WebDriverAgent Got derived data root: '/Users/qpaas/Library/Developer/Xcode/DerivedData/WebDriverAgent-ciomogsmbqkzrwaqiyxpqjzocrsh'

WARN XCUITest Continuing without capturing device logs: Failed to receive any data within the timeout: 5000

info XCUITest Setting up real device

dbug WebDriverAgent No obsolete cached processes from previous WDA sessions listening on port 8002 have been found

info DevCon Factory Requesting connection for device 00008030-000569803C78**** on local port 8002, device port 8002

dbug DevCon Factory Cached connections count: 0

info DevCon Factory Successfully requested the connection for 00008030-000569803C78****:8002

dbug XCUITest Starting WebDriverAgent initialization with the synchronization key 'XCUITestDriver'

dbug WD Proxy Matched '/status' to command name 'getStatus'

dbug WD Proxy Proxying [GET /status] to GET [http://126.0.0.1:8002/status] with no body

info WD Proxy socket hang up

dbug WebDriverAgent WDA is not listening at 'http://126.0.0.1:8002/'

dbug WebDriverAgent WDA is currently not running. There is nothing to cache

dbug XCUITest Trying to start WebDriverAgent 1 times with 10000ms interval

dbug XCUITest These values can be customized by changing wdaStartupRetries/wdaStartupRetryInterval capabilities

dbug BaseDriver Event 'wdaStartAttempted' logged at 1729755782295 (13:13:02 GMT+0530 (India Standard Time))

info WebDriverAgent Launching WebDriverAgent on the device

info WebDriverAgent WebDriverAgent does not need a cleanup. The sources are up to date (1729590233836 >= 1729590233836)

dbug WebDriverAgent Killing running processes 'xcodebuild.*00008030-000569803C78' for the device 00008030-000569803C78...

dbug WebDriverAgent 'pgrep -if xcodebuild.*00008030-000569803C78****' didn't detect any matching processes. Return code: 1

dbug WebDriverAgent Beginning test with command 'xcodebuild test-without-building -project /Users/qpaas/Downloads/ws-scrcpy-master/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -derivedDataPath /Users/qpaas/Library/Developer/Xcode/DerivedData/WebDriverAgent-ciomogsmbqkzrwaqiyxpqjzocrsh -destination id=00008030-000569803C78802E IPHONEOS_DEPLOYMENT_TARGET=17.0 GCC_TREAT_WARNINGS_AS_ERRORS=0 COMPILER_INDEX_STORE_ENABLE=NO' in directory '/Users/qpaas/Downloads/ws-scrcpy-master/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent'

dbug WebDriverAgent Output from xcodebuild will only be logged if any errors are present there. To change this, use 'showXcodeLog' desired capability

dbug WebDriverAgent Waiting up to 60000ms for WebDriverAgent to start

dbug WD Proxy Matched '/status' to command name 'getStatus'

dbug WD Proxy Proxying [GET /status] to GET [http://126.0.0.1:8002/status] with no body

info WD Proxy socket hang up

dbug WD Proxy Matched '/status' to command name 'getStatus'

dbug WD Proxy Proxying [GET /status] to GET [http://126.0.0.1:8002/status] with no body

info WD Proxy socket hang up

dbug WD Proxy Matched '/status' to command name 'getStatus'

dbug WD Proxy Proxying [GET /status] to GET [http://126.0.0.1:8002/status] with no body

info WD Proxy socket hang up

ERR! WebDriverAgent xcodebuild exited with code '65' and signal 'null'

info WebDriverAgent Launching WebDriverAgent on the device

info WebDriverAgent WebDriverAgent does not need a cleanup. The sources are up to date (1729590233836 >= 1729590233836)

dbug WebDriverAgent Killing running processes 'xcodebuild.*00008030-000569803C78' for the device 00008030-000569803C78...

dbug WebDriverAgent 'pgrep -if xcodebuild.*00008030-000569803C78****' didn't detect any matching processes. Return code: 1

dbug WebDriverAgent Beginning test with command 'xcodebuild test-without-building -project /Users/qpaas/Downloads/ws-scrcpy-master/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -derivedDataPath /Users/qpaas/Library/Developer/Xcode/DerivedData/WebDriverAgent-ciomogsmbqkzrwaqiyxpqjzocrsh -destination id=00008030-000569803C78**** IPHONEOS_DEPLOYMENT_TARGET=17.0 GCC_TREAT_WARNINGS_AS_ERRORS=0 COMPILER_INDEX_STORE_ENABLE=NO' in directory '/Users/qpaas/Downloads/ws-scrcpy-master/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent'

dbug WebDriverAgent Output from xcodebuild will only be logged if any errors are present there. To change this, use 'showXcodeLog' desired capability

dbug WD Proxy Matched '/status' to command name 'getStatus'

dbug WD Proxy Proxying [GET /status] to GET [http://126.0.0.1:8002/status] with no body

info WD Proxy socket hang up

dbug WebDriverAgent Waiting up to 60000ms for WebDriverAgent to start

dbug WD Proxy Matched '/status' to command name 'getStatus'

dbug WD Proxy Proxying [GET /status] to GET [http://126.0.0.1:8002/status] with no body

info WD Proxy socket hang up

dbug WD Proxy Matched '/status' to command name 'getStatus'

dbug WD Proxy Proxying [GET /status] to GET [http://126.0.0.1:8002/status] with no body

info WD Proxy socket hang up

dbug WD Proxy Matched '/status' to command name 'getStatus'

dbug WD Proxy Proxying [GET /status] to GET [http://126.0.0.1:8002/status] with no body

info WD Proxy socket hang up

ERR! WebDriverAgent xcodebuild exited with code '65' and signal 'null'

dbug BaseDriver Event 'wdaStartFailed' logged at 1729755788353 (13:13:08 GMT+0530 (India Standard Time))

dbug XCUITest Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65

dbug XCUITest xcodebuild error message:

dbug XCUITest . Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.

WARN XCUITest Quitting and uninstalling WebDriverAgent

info WebDriverAgent Shutting down sub-processes

dbug WebDriverAgent Error: Failed to receive any data within the timeout: 5000

dbug WebDriverAgent     at Timeout._onTimeout (/Users/qpaas/Downloads/ws-scrcpy-master/node_modules/appium-xcuitest-driver/node_modules/appium-ios-device/lib/plist-service/index.js:67:16)

dbug WebDriverAgent     at listOnTimeout (node:internal/timers:581:17)

dbug WebDriverAgent     at processTimers (node:internal/timers:519:7)

WARN WebDriverAgent WebDriverAgent uninstall failed. Perhaps, it is already uninstalled? Original error: Failed to receive any data within the timeout: 5000

ERR! XCUITest {}

info DevCon Factory Releasing connections for 00008030-000569803C78**** device on any port number

info DevCon Factory Found cached connections to release: ["00008030-000569803C78****:8002"]

info DevCon Factory Releasing the listener for '00008030-000569803C78****:8002'

dbug DevCon Factory Cached connections count: 0

dbug XCUITest Not clearing log files. Use clearSystemFiles capability to turn on.

/Users/qpaas/Downloads/ws-scrcpy-master/node_modules/appium-xcuitest-driver/lib/driver.js:588

        throw new Error(msg);

              ^

Error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65

xcodebuild error message:

. Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.

    at quitAndUninstall (/Users/qpaas/Downloads/ws-scrcpy-master/node_modules/appium-xcuitest-driver/lib/driver.js:588:15)

    at /Users/qpaas/Downloads/ws-scrcpy-master/node_modules/appium-xcuitest-driver/lib/driver.js:623:11

    at wrapped (/Users/qpaas/Downloads/ws-scrcpy-master/node_modules/appium-xcuitest-driver/node_modules/asyncbox/lib/asyncbox.js:95:13)

    at retry (/Users/qpaas/Downloads/ws-scrcpy-master/node_modules/appium-xcuitest-driver/node_modules/asyncbox/lib/asyncbox.js:68:13)

    at retryInterval (/Users/qpaas/Downloads/ws-scrcpy-master/node_modules/appium-xcuitest-driver/node_modules/asyncbox/lib/asyncbox.js:105:10)

    at /Users/qpaas/Downloads/ws-scrcpy-master/node_modules/appium-xcuitest-driver/lib/driver.js:603:7

We have tried troubleshooting the issue with: Deleting the WDA- App present in Iphone devices and rebooting the device. By giving valid Signing and Capabilities to the webDriverAgentRunner in XCode. Running the WebDriverAgentRunner from XCode (By this, the integration App is running fine in the Iphone device). But when executed through the terminal WDA is not getting launched.

Any help on this will be appreciated.. Thanks

krishtoautomate commented 2 weeks ago

This part is not maintained for long, will not work