axemclion / grunt-saucelabs

Grunt task for running all your browser tests using Sauce Labs
MIT License
182 stars 98 forks source link

Post to status endpoint is failing #200

Closed stdavis closed 8 years ago

stdavis commented 8 years ago

[This is a duplicate of #193 in hopes of an open issue getting more attention]

I'm getting the following error when I try to run this task from travis:

Running "saucelabs-jasmine:all" (saucelabs-jasmine) task
Verifying property saucelabs-jasmine.all exists in config...OK
File: [no files]
Options: username="agrc-deq-enviro", key="...", tunneled=false, identifier="222125027", pollInterval=2000, statusCheckAttempts=500, testname="deq-enviro", browsers=[{"browserName":"safari","platform":"OS X 10.10"},{"browserName":"firefox","platform":"Windows 8.1"},{"browserName":"chrome","platform":"Windows 8.1"},{"browserName":"internet explorer","platform":"Windows 8.1","version":"11"},{"browserName":"internet explorer","platform":"Windows 8","version":"10"},{"browserName":"internet explorer","platform":"Windows 7","version":"9"}], tunnelArgs=[], sauceConfig={"max-duration":10800}, maxRetries=10, urls=["http://localhost:8001_SpecRunner.html"], tunnelTimeout=120, build="95467903", maxPollRetries=10, throttled=5
 1 / 6 tests started
 2 / 6 tests started
 3 / 6 tests started
 4 / 6 tests started
 5 / 6 tests started
 6 / 6 tests started
>> Error: POST https://saucelabs.com/rest/v1/agrc-deq-enviro/js-tests failed.
>>     at /home/travis/build/agrc/deq-enviro/node_modules/grunt-saucelabs/src/utils.js:97:15
>>     at _rejected (/home/travis/build/agrc/deq-enviro/node_modules/grunt-saucelabs/node_modules/q/q.js:830:24)
>>     at /home/travis/build/agrc/deq-enviro/node_modules/grunt-saucelabs/node_modules/q/q.js:856:30
>>     at Promise.when (/home/travis/build/agrc/deq-enviro/node_modules/grunt-saucelabs/node_modules/q/q.js:1108:31)
>>     at Promise.promise.promiseDispatch (/home/travis/build/agrc/deq-enviro/node_modules/grunt-saucelabs/node_modules/q/q.js:774:41)
>>     at /home/travis/build/agrc/deq-enviro/node_modules/grunt-saucelabs/node_modules/q/q.js:590:44
>>     at runSingle (/home/travis/build/agrc/deq-enviro/node_modules/grunt-saucelabs/node_modules/q/q.js:123:13)
>>     at flush (/home/travis/build/agrc/deq-enviro/node_modules/grunt-saucelabs/node_modules/q/q.js:111:13)
>>     at doNTCallback0 (node.js:419:9)
>>     at process._tickCallback (node.js:348:13)
>>     Error: HTTP error (400)
>>         at /home/travis/build/agrc/deq-enviro/node_modules/grunt-saucelabs/src/utils.js:91:17
>>     From previous event:
>>         at Object.makeRequest (/home/travis/build/agrc/deq-enviro/node_modules/grunt-saucelabs/src/utils.js:86:8)
>>         at Job.start (/home/travis/build/agrc/deq-enviro/node_modules/grunt-saucelabs/src/Job.js:86:8)
>>         at getResult (/home/travis/build/agrc/deq-enviro/node_modules/grunt-saucelabs/src/TestRunner.js:113:10)
Warning: Task "saucelabs-jasmine:all" failed. Use --force to continue.

I am using the sauce_connect addon in .travis.yml. Would this cause any issues?

addons:
  sauce_connect:
    username: agrc-deq-enviro
    access_key:
        secure: ...
Jonahss commented 8 years ago

You're posting to "https://saucelabs.com/rest/v1/agrc-deq-enviro/js-tests" but that's not the saucelabs api endpoint. the argc-deq-enviro clause doesn't look like it should be there. Any idea where it came from?

stdavis commented 8 years ago

That's my sauce username.

Jonahss commented 8 years ago

ah. my bad. hm hm

Jonahss commented 8 years ago

Does this happen for every test? Or is it an occasional bug.

stdavis commented 8 years ago

Yes, every time I do a build on travis this happens currently. Maybe related to the fact that I'm using this project to run my jasmine unit tests and intern to run functional tests in the same build? Not sure.

most recent build .travis.yml GruntFile.js

Thanks for taking another look at this.

eugenet8k commented 8 years ago

Hi @stdavis, did you guys figure out the problem with this exception? I just started to face the same:

Error: POST https://saucelabs.com/rest/v1/#my_user_name#/js-tests failed.

Randomly without any recent changes in my grunt config. Was it something on the SauceLabs side?

Jonahss commented 8 years ago

@eugenet8k When did that POST request happen? There was a Saucelabs outage last night.

eugenet8k commented 8 years ago

@Jonahss I am having this problem since last night and it is still reproducible. The SauceLabs support recommends to do not use tunneling (weird) and make sure that config doesn't have "identifier" parameter, which I believe is being added by grunt-saucelabs. I am trying to figure out now.

Jonahss commented 8 years ago

Ah ok. Maybe grunt-saucelabs was updated to the newest version of Sauce Connect, which may have eliminated the concept of "named" tunnels.

stdavis commented 8 years ago

@eugenet8k: I eventually gave up and converted all of my unit tests to intern.

leeyeh commented 8 years ago

Same here, I'm using v8.6.2. Here is my config: https://github.com/leeyeh/js-realtime-sdk/blob/0dd20626e014908a8802c35a2627d0d8b40db1ab/Gruntfile.js#L225-L238

kevin-brown commented 8 years ago

I just started hitting this issue the other day and it looks like it wasn't a one-time issue.

The configuration we use can be found here, and we're currently using version 8.6.2.

LaurentGoderre commented 8 years ago

Same for us!

Jonahss commented 8 years ago

We've got people contacting customer support at Sauce Labs about this, so will start working on a fix, unless an open source contributor wants to look at it first.

On Mon, Apr 18, 2016 at 8:55 AM, Laurent Goderre notifications@github.com wrote:

Same for us!

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/axemclion/grunt-saucelabs/issues/200#issuecomment-211443499

eugenet8k commented 8 years ago

@Jonahss have you guys got any updates on who's going to fix the problem? It seems now there is literally no way anyone can use grunt-saucelabs to run unit tests using tunneling in SauceLabs cloud. I contacted support and they recommended me to work out the problem with this repo owners.

leeyeh commented 8 years ago

@eugenet8k the problem disappeared couple of days ago. Have you try to restart your test?

eugenet8k commented 8 years ago

@leeyeh Yeah, confirming that. Now it works.