GithubHelp home page GithubHelp logo

Comments (5)

leinardi avatar leinardi commented on August 22, 2024 1

Hi @FriggaHel, typo fixed, everything seems fine now.

from saucectl-run-action.

cameronbrandcoders avatar cameronbrandcoders commented on August 22, 2024

Can confirm, I am seeing the same thing. One difference, I am authenticating with this action, and am running saucectl in a separate step.

- name: 'Authenticate Saucelabs'
        uses: saucelabs/saucectl-run-action@v2
        with:
          skip-run: true
          sauce-username: ${{ secrets.SAUCELABS_USERNAME }}
          sauce-access-key: ${{ secrets.SAUCELABS_ACCESSKEY }}

then separately later in the action

- name: 'Run The Test'
  env:
    {stuff}
  run: saucectl run --config .sauce/sanity-test.yml --select-suite "$SUITE" --env latest=1 --env environment="$ENVIRONMENT" --env versionnumber="$VERSIONNUMBER" --env repository="$REPOSITORY" --env githubref="$GITHUBREF" --env githubsha="$GITHUBSHA" --env buildnumber="$BUILDNUMBER"

But the outcome is the same, occasionally I am seeing the api limit error.

from saucectl-run-action.

FriggaHel avatar FriggaHel commented on August 22, 2024

Hi !

We've updated the action to use GITHUB_TOKEN, so this error is far less likely to happen.
Note: the GITHUB_TOKEN needs to be explicitly provided to the step.
Example here: https://github.com/saucelabs/saucectl-run-action/tree/main#basic

from saucectl-run-action.

leinardi avatar leinardi commented on August 22, 2024

Hi @FriggaHel,

after adding the GITHUB_TOKEN the action is now always failing with the error Bad credentials:

Run saucelabs/saucectl-run-action@v2
  with:
    sauce-username: ***
    sauce-access-key: ***
    select-suite: PR_TEST
    saucectl-version: latest
    working-directory: .
    config-file: .sauce/config.yml
    skip-run: false
    showConsoleLog: false
  env:
    ORG_GRADLE_PROJECT_GRADLE_BUILD_CACHE_NODE_USR: ***
    ORG_GRADLE_PROJECT_GRADLE_BUILD_CACHE_NODE_PWD: ***
    JAVA_TOOL_OPTIONS: -Xmx4g
    TERM: dumb
    JAVA_HOME: /opt/hostedtoolcache/Java_Adopt_jdk/11.0.14-101/x64
    JAVA_HOME_11_X64: /opt/hostedtoolcache/Java_Adopt_jdk/11.0.14-101/x64
    GRADLE_BUILD_ACTION_SETUP_COMPLETED: true
    GRADLE_BUILD_ACTION_CACHE_RESTORED: true
    GITHUB_TOKEN: $***
/home/runner/work/_actions/saucelabs/saucectl-run-action/v[2](https://github.com/veeva-oncology-link/link2-android/actions/runs/4010129265/jobs/6886544905#step:8:2)/dist/main/index.js:7792
      const error = new requestError.RequestError(toErrorMessage(data), status, {
                    ^

RequestError [HttpError]: Bad credentials
    at /home/runner/work/_actions/saucelabs/saucectl-run-action/v2/dist/main/index.js:7792:21
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async selectCompatibleVersion (/home/runner/work/_actions/saucelabs/saucectl-run-action/v2/dist/main/index.js:16[3](https://github.com/veeva-oncology-link/link2-android/actions/runs/4010129265/jobs/6886544905#step:8:3)78:22)
    at async saucectlInstall (/home/runner/work/_actions/saucelabs/saucectl-run-action/v2/dist/main/index.js:16393:21)
    at async run (/home/runner/work/_actions/saucelabs/saucectl-run-action/v2/dist/main/index.js:1672[4](https://github.com/veeva-oncology-link/link2-android/actions/runs/4010129265/jobs/6886544905#step:8:4):10) {
  status: 401,
  response: {
    url: 'https://api.github.com/repos/saucelabs/saucectl/releases',
    status: 401,
    headers: {
      'access-control-allow-origin': '*',
      'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset',
      connection: 'close',
      'content-length': '80',
      'content-security-policy': "default-src 'none'",
      'content-type': 'application/json; charset=utf-8',
      date: 'Wed, 2[5](https://github.com/veeva-oncology-link/link2-android/actions/runs/4010129265/jobs/6886544905#step:8:5) Jan 2023 21:54:01 GMT',
      'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
      server: 'GitHub.com',
      'strict-transport-security': 'max-age=3153[6](https://github.com/veeva-oncology-link/link2-android/actions/runs/4010129265/jobs/6886544905#step:8:6)000; includeSubdomains; preload',
      vary: 'Accept-Encoding, Accept, X-Requested-With',
      'x-content-type-options': 'nosniff',
      'x-frame-options': 'deny',
      'x-github-media-type': 'github.v3; format=json',
      'x-github-request-id': '3040:66C0:613[7](https://github.com/veeva-oncology-link/link2-android/actions/runs/4010129265/jobs/6886544905#step:8:7)71:C664A5:63D1A4F9',
      'x-ratelimit-limit': '60',
      'x-ratelimit-remaining': '57',
      'x-ratelimit-reset': '16746[8](https://github.com/veeva-oncology-link/link2-android/actions/runs/4010129265/jobs/6886544905#step:8:8)6212',
      'x-ratelimit-resource': 'core',
      'x-ratelimit-used': '3',
      'x-xss-protection': '0'
    },
    data: {
      message: 'Bad credentials',
      documentation_url: 'https://docs.github.com/rest'
    }
  },
  request: {
    method: 'GET',
    url: 'https://api.github.com/repos/saucelabs/saucectl/releases',
    headers: {
      accept: 'application/vnd.github.v3+json',
      authorization: 'token [REDACTED]'
    },
    request: { hook: [Function: bound bound register] }
  }
}

Is it referring to the sauce-username and sauce-access-key? I checked and those are correctly defined inside the GitHub Settings. Can you please tell me where should I get the values from, just to be sure that I have the right values?

from saucectl-run-action.

FriggaHel avatar FriggaHel commented on August 22, 2024

Hi @leinardi !

My bad, I introduced a typo in the README.md.

Expected env needs to be

env:
  GITHUB_TOKEN: ${{ github.token }}

and not:

env:
  GITHUB_TOKEN: $${{ github.token }}

I will update the doc accordingly.

According to your output, it looks like you replicated my mistake.

env:
[...]
    GITHUB_TOKEN: $***

At this stage this is not an error on Sauce Labs authentication.

from saucectl-run-action.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.