saucelabs / saucectl

A command line interface for the Sauce Labs platform.
Apache License 2.0
42 stars 16 forks source link

Create job failed: Error: Failed calling createJob #144

Closed trevor-bennett closed 3 years ago

trevor-bennett commented 3 years ago

Current behavior

Our company currently uses SauceLabs for virtual and a few real devices with a moderate concurrent limit. Upon learning about the testrunner after the new year, we downloaded the basic test and decided to try running through the provided, basic test that install alongside saucectl.

After setting up my username and key from both my user account, our admin account into my .bash_profile as well as my .zprofile and confirmed the environment variables through via echo $USERNAME, upload running saucectl run within the root directory, the following error occurs after completion of the test:

Using /home/seluser/assets/example.test.js.mp4 as the main video. Create job failed: Error: Failed calling createJob: Response code 403 (Forbidden) at Proxy. (/home/seluser/node_modules/saucelabs/build/index.js:233:15) at processTicksAndRejections (internal/process/task_queues.js:97:5) Unable to retrieve test entry. Assets won't be uploaded. 4:38PM INF Command Finished ExitCode=0 4:38PM INF Tearing down environment

In addition, I tried switching from my username in the admin portal to my email address and the issue still failed, but I did get a 401 error when an email was used.

Desired behavior

Results are uploaded to saucelabs.

Config to reproduce

`apiVersion: v1alpha kind: cypress sauce: region: us-west-1 metadata: name: Testing Cypress Support tags:

Versions

saucectl version 0.22.0 - (build ecdc0ad83710b898520c1de961dc9ed9a0774ad0) npm version 6.14.10 macOS Catalina version 10.15.7 docker version 20.10.0, build 7287ab3

tianfeng92 commented 3 years ago

Hi @trevor-bennett, I noticed that you're using cypress runner v0.3.1. Could you pls update the cypress runner to v0.3.2 and have a try again? Thanks!

trevor-bennett commented 3 years ago

Hi @trevor-bennett, I noticed that you're using cypress runner v0.3.1. Could you pls update the cypress runner to v0.3.2 and have a try again? Thanks!

This seems to be the trick that fixed it. I guess might need to be noted then that the initial saucectl project setup downloaded via the saucectl new might need to be updated with that as a default? Unless it has since I installed it yesterday

tianfeng92 commented 3 years ago

Hi @trevor-bennett ,

Sorry for my late reply. It's indeed a good point to setup env with latest version. We can improve that in the future. Thanks for your suggestion :)