When trying to execute a Mobile Automation, error "Sauce could not start your job" is thrown.
Issue Description: When a Mobile Automation Script is executed or tried to connect to a Sauce labs device using the Mobile Device Manager, it returns an error "Sauce could not start your job" as mentioned in the below screenshot.
Resolution:
- Go to Sauce labs (app.saucelabs.com), login to the account and then go to test results under the Automated tab and check for the errored job as mentioned in the below image
- Open the errored job and then check for the error as mentioned in the below image and if the error is "Misconfigured -- Your account settings only allow tests to run with a Sauce Connect tunnel for proxying. Sauce Connect is not running right now. Please contact your account administrator."
- The error states that your organization administrator has enabled Sauce connect Proxy/VPN is required for running tests on Sauce Labs browsers, emulators and simulators.
If still the same error is thrown, follow the below steps to create Tunnel Proxy
- Go to Sauce labs ---> Tunnel Proxies and download the sauce connect proxy client as per your Machine configuration
- In this, a Windows client is utilized and once it is downloaded extract the folder
- Open CMD and navigate to the folder where the client is extracted. For example, consider the downloaded the client to downloads folder and the path of client is "C:\Users\Vi******u.K********u\Downloads\sc-4.9.1-win32\bin". Navigate to this path using cd {path to the client}
- Now use this command to create and start a tunnel in sauce labs ./sc -u username -k accesskey --region {region} --tunnel-name username_tunnel_name or copy the command from the step 2 in the above image and execute it.
- Once the command is executed you will get a confirmation that tunnel is provisioned as shown in the below image

- Also, observe an active tunnel in the Sauce labs also as mentioned in the below image
- Once the tunnel is active, now go to Mobile Device Manager in the Studio and add the capability tunnelname as mentioned in the below image and the value of tunnel name can be fetched from the command mentioned in point #4.
- Once the tunnelname is updated, save the configuration and now connection to the Saucelabs device is possible or the script can be executed.