axemclion / grunt-saucelabs

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

New Error: Could not connect to Sauce Labs API: Error: read ECONNRESET #174

Closed LaurentGoderre closed 9 years ago

LaurentGoderre commented 9 years ago

All our builds are failing with the following error now

Could not connect to Sauce Labs API: Error: read ECONNRESET

I am not quite sure where the error is coming from yet

flowersinthesand commented 9 years ago

I'm also experiencing this problem with 1 throttled option.

Jonahss commented 9 years ago

Still experiencing this problem? It could have been a temporary outage.

LaurentGoderre commented 9 years ago

Could have been but what is really weird is, and that could be because of the SauceLabs API, all test would pass but the task would fail giving this message. I will keep testing to see if it's still occurring.

Jonahss commented 9 years ago

Ah, I think someone else encountered this and they submitted a PR we just merged. Try the newest version of grunt-saucelabs.

LaurentGoderre commented 9 years ago

Thanks! Though debugging intermittent issues are always the most difficult

Jonahss commented 9 years ago

I'm running into the same issue myself while running tests. The new retry code should fix it, but I'll try to see whats up with the API...

cvrebert commented 9 years ago

Also seeing some weird ordering in the output. Not sure whether it indicates anything in particular:

 10 / 12 tests started
 11 / 12 tests started
=> Stopping Tunnel to Sauce Labs
 12 / 12 tests started
>> Could not connect to Sauce Labs API: Error: read ECONNRESET
Warning: Task "saucelabs-qunit:all" failed. Use --force to continue.
Jonahss commented 9 years ago

Thanks. A bit less concerned about that one but could reveal something interesting.

On Fri, Dec 12, 2014 at 3:11 PM, Chris Rebert notifications@github.com wrote:

Also seeing some weird ordering in the output. Not sure whether it indicates anything in particular:

10 / 12 tests started 11 / 12 tests started => Stopping Tunnel to Sauce Labs 12 / 12 tests started

Could not connect to Sauce Labs API: Error: read ECONNRESET Warning: Task "saucelabs-qunit:all" failed. Use --force to continue.

— Reply to this email directly or view it on GitHub https://github.com/axemclion/grunt-saucelabs/issues/174#issuecomment-66849859 .

endel commented 9 years ago

I'm having this problem too. Is it a server-side problem?

Jonahss commented 9 years ago

I'm going on the assumption that it is a server-side problem, and we're trying to nail down a simpler reproduction case.

LaurentGoderre commented 9 years ago

Trying to narrow it down too. Will let you know what I find.

Jonahss commented 9 years ago

^.^

On Mon, Jan 5, 2015 at 11:58 AM, Laurent Goderre notifications@github.com wrote:

Trying to narrow it down too. Will let you know what I find.

— Reply to this email directly or view it on GitHub https://github.com/axemclion/grunt-saucelabs/issues/174#issuecomment-68767457 .

cvrebert commented 9 years ago

Would be great if there was retry logic for this.. :pray:

LaurentGoderre commented 9 years ago

There is a retry for timeout but not for this.

cvrebert commented 9 years ago

Exactly.

Jonahss commented 9 years ago

@cvrebert what about this: https://github.com/axemclion/grunt-saucelabs/pull/175

LaurentGoderre commented 9 years ago

The thing is since this basically an unhandled exception, there is no way to know what caused the issue. It just happens that for this bug retrying works but it's not guaranteed for all unhandled exceptions

LaurentGoderre commented 9 years ago

@Jonahss I am not sure it would work because when the error occur it doesn't poll anymore

cvrebert commented 9 years ago

@Jonahss Ah! I'll give that a shot.

Jonahss commented 9 years ago

Is everyone who got this error using Sauce Connect tunnels?

cvrebert commented 9 years ago

I use tunnels and got this error.

LaurentGoderre commented 9 years ago

Same here

msukmanowsky commented 9 years ago

Using Sauce Connect and also getting this error. Does seem to hit me when running >= 3 browsers or so. SauceLabs reporting The Sauce VMs failed to start the browser or device For more info, please check https://docs.saucelabs.com/reference/troubleshooting-common-error-messages/ in the interface despite the browsers I'm using being fully supported:

[
    {
        "browserName": "firefox",
        "platform": "Windows 8.1",
        "version": "15",
        "deviceName": ""
    },
    {
        "browserName": "chrome",
        "platform": "Windows 8.1",
        "version": "26",
        "deviceName": ""
    },
    {
        "browserName": "internet explorer",
        "platform": "Windows 8.1",
        "version": "11",
        "deviceName": ""
    },
    {
        "browserName": "firefox",
        "platform": "OS X 10.6",
        "version": "15",
        "deviceName": ""
    }
]
msukmanowsky commented 9 years ago

Feels as though one test encountered The Sauce VMs failed to start the browser or device For more info, please check https://docs.saucelabs.com/reference/troubleshooting-common-error-messages/ and the tunnel was immediately disconnected instead of allowing other tests to complete first.

Jonahss commented 9 years ago

Yeah, we should check the logic for closing tunnels, we should make sure the tunnel isn't closed until all tests have fully completed.

LaurentGoderre commented 9 years ago

Shouldn't that be a separate issue though?

Jonahss commented 9 years ago

The error is different, but the way we handle tunnels might be responsible for the same thing we see here.

On Thu, Jan 15, 2015 at 11:58 AM, Laurent Goderre notifications@github.com wrote:

Shouldn't that be a separate issue though?

— Reply to this email directly or view it on GitHub https://github.com/axemclion/grunt-saucelabs/issues/174#issuecomment-70150881 .

LaurentGoderre commented 9 years ago

Not sure, the suggested PR seems to be fixing this specific issue

Jonahss commented 9 years ago

See the discussion here. @gvas found that specific versions of Node.js cause issues.

Jonahss commented 9 years ago

This should be fixed in version 8.5.0

comment here if you still encounter ECONNRESET errors after updating.

LaurentGoderre commented 9 years ago

Thanks everyone for the help!!