saucelabs / saucelabs/node-saucelabs

Could not report results to Saucelabs: Error: Failed calling updateJob: Response code 404 (Not Found)

Open
#238 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
98
Forks
44
Avg merge
3d 23h
Merged PRs (30d)
10

Description

Expected Behavior

Expected Android Real device testing to report success in the en.

Actual Behavior

After saucelab succeds with job on real android device, the console stucks in infinite loop.

After debug I see that, the url should be of an available job instead. The saucelab class SauceLab._get on

throw new Error(Failed calling ${propName}: ${err.message}, ${err.response && err.response.body}); catches an failed request error.

Details of the requst of console.log({ method, uri, body }) before that line are for example:

{
  method: 'put',
  uri: 'https://api.us-west-1.saucelabs.com/rest/v1/username/jobs/5e69e7ae-7f29-4fc0-b4e3-a3b9019ce5d1',
  body: {
    id: '5e69e7ae-7f29-4fc0-b4e3-a3b9019ce5d1',
    passed: true,
    'custom-data': BrowserResult {
      startTime: 1708902358057,
      total: 399,
      success: 398,
      failed: 0,
      skipped: 1,
      totalTime: 9596,
      netTime: 9362,
      error: false,
      disconnected: false
    }
  }
}

The body.id is a faulty one, it should be:a999b57568ab4f44839858e8b879675f. Endpoint responsds with 404 and then karma-sauce-launcher keeps spamming to check the log if any updates did happen… (which is another problem)

It only happens when I am testing real andorid deivces even with latest saucelabs npm package!

Steps to Reproduce the Problem

  1. use karma-sauce-launcher latest

  2. apply package.json:overrides property if necessary to set different versions of webdriver/io

    For example in my case I did:

```
"overrides": {
  "webdriver": "^8.32.3",
  "webdriverio": "^8.32.3",
  "saucelabs": "^4.7.8",
 // or use latest, same result tried both
  "saucelabs": "^7.5.0",
},
```
  1. setup for karma sauce launcher such browser capability
    android: {
      base: 'SauceLabs',
      platformName: 'Android',
      browserName: 'Chrome',
      deviceName: 'Samsung Galaxy S21 5G',
      version: '13.0',
      automationName: 'UiAutomator2',
   }
  ```

## Specifications

- Version: latest
- Platform: MacOS 13
- Subsystem: node v20

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the SauceLab._get method and reproduce the updateJob request with the real Android device configuration described in the issue. Compare the job ID sent in the request body with the available Sauce Labs job ID; done means the result update succeeds without a 404 or an infinite log-checking loop.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.