1. Unable to start WebDriverAgent session because of xcodebuild failure


Complete Error message: 

[MJSONWP] Encountered internal error running command: Error: Unable to start WebDriverAgent session because of xcodebuild failure: "Could not proxy command to remote server. Original error: Error: socket hang up". 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.


Solution:

This is most probably a temporary issue. Please perform the following steps:

  1. Uninstall WebDriverAgentRunner if already installed
  2. Reboot the iOS device
  3. Reboot Mac

2. Cannot start the <app_package_name> application. Original error: Error executing adbExec.


Complete Error message:

Exception in initiating a browser session in path:, An unknown server-side error occurred while processing the command. Original error: Cannot start the 'com.jillstuart.beauty.app.stg' application. Original error: Error executing adbExec. Original error: 'Command 'C\:\\Users\\huy.nvt\\AppData\\Local\\Android\\Sdk\\platform-tools\\adb.exe -P 5037 -s 3100dc566118a2a5 shell am start -W -n com.jillstuart.beauty.app.stg/com.jillstuart.beauty.app.activity.MainActivity -S' exited with code 1'; Stderr: 'java.lang.SecurityException: Permission Denial: starting Intent { flg=0x10000000 cmp=com.jillstuart.beauty.app.stg/com.jillstuart.beauty.app.activity.MainActivity launchParam=MultiScreenLaunchParams { mDisplayId=0 mBaseDisplayId=0 mFlags=0 } } from null (pid=30564, uid=2000) not exported from uid 10717


Original Error:

The permission to start <activity_name> activity has been denied. Make sure activity/package names are correct.The package name or activity name is not correct

OR
A user doesn't have permission to start the Activity due to missing permissions in the manifest.Double check the Activity and package name or try another activity name.


Solution:

  • Double check the Application and Activity Name
  • Make sure the Activity name is correct
  • Make sure the user has permission set in the manifest to start the Activity