https://cypress.io logo
Error: Resource not accessible by integration
# cypress-cloud
s
When setting the parallel: true in the workflow, I am getting "Error: Resource not accessible by integration" Error.
t
Did you follow all the documentation on parallelisation? https://docs.cypress.io/guides/guides/parallelization It also depends on which CI you are using: https://docs.cypress.io/guides/continuous-integration/introduction
s
Yes @thousands-house-85089 I have followed the documentation correctly, not sure why it's showing "Resource not accessible by integration". As soon as I set parallel: true the above error is shown
a
@salmon-king-61507 Can you provide your .yml file redacted of any sensitive data
s
Copy code
name: 'XYZ Automation Test'

on:
  push:
    branches: [ main ]
  workflow_dispatch:
  schedule:
    - cron:  '0 2 * * 1-5'
jobs:
  test:
    name: End to End Test
    runs-on: ubuntu-20.04
    strategy:
      fail-fast: false
      matrix:
        containers: [1, 2]
    env:
      CYPRESS_USER_EMAIL: ${{ secrets.PRODUCTION_USER_EMAIL }}
      CYPRESS_USER_PASSWORD: ${{ secrets.PRODUCTION_USER_PASSWORD }}
      CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Cypress run
        uses: cypress-io/github-action@v4
        with:
          record: true
          parallel: true
          spec: cypress/e2e/user-journey/*.cy.js
          config: baseUrl=https://test.xyz.com
      - name: Save screenshot
        uses: actions/upload-artifact@v2
        if: failure()
        with:
          name: cypress-screenshots
          path: cypress/screenshots
      - name: Save video
        uses: actions/upload-artifact@v2
        if: always()
        with:
          name: cypress-videos
          path: cypress/videos
      - name: Merge & Generate combined HTML report
        run: npm run mochawesome:merge
      - name: Save report
        uses: actions/upload-artifact@v2
        if: always()
        with:
          name: cypress-mochawesome-report
          path: mochawesome-report
I tried removing
parllel:true
it didn't show the integration issue but all the specs were executed in both machines. I think the culprit here is
parallel: true
. Do I need to give additional permissions to Cypress Cloud?
a
Can you send me a PM with your Organization ID? You can find the organization ID using the instructions here: https://docs.cypress.io/guides/dashboard/organizations.html#Organization-ID
s
Please check @adventurous-dream-20049
a
Got it. Thanks @salmon-king-61507
@salmon-king-61507 It looks like the
CYPRESS_RECORD_KEY
and
GITHUB_TOKEN
env vars are out of scope for
github-action@4
It should be nested within
jobs.test.steps
like in the example here: https://github.com/cypress-io/github-action#record-test-results-on-cypress-cloud I'm also not sure of your use case, but if it is to just record to the Cypress Cloud, you will not need to add
CYPRESS_USER_EMAIL
or
CYPRESS_USER_PASSWORD
Copy code
name: 'XYZ Automation Test'

on:
  ...
jobs:
  test:
    ...
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Cypress run
        uses: cypress-io/github-action@v4
        with:
          record: true
          parallel: true
          spec: cypress/e2e/user-journey/*.cy.js
          config: baseUrl=https://test.xyz.com
        env:
          CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      ...
Can you try that out?
s
Sure will do that!
Hi @adventurous-dream-20049 , it's still showing the same
Error: Resource not accessible by integration
a
Can you confirm you set your record key as a GitHub secret: https://docs.github.com/en/rest/actions/secrets?apiVersion=2022-11-28 It must be in the current repo. The record key is not scoped for you entire GitHub Organization.
s
Okay, I will try that 🙇‍♂️
q
Good afternoon, sorry what is the purpose of using cypress.cloud?
t
It's a reporting dashboard for your test executions
a
In addition to giving you online access to your recorded test results and providing analytics and diagnostics, the Cloud also orchestrates test runs across multiple machines using intelligent load balancing that can save your team valuable time and money with such features as running longer running specs first, auto cancellation after a failed spec, and running failed specs first with spec prioritization. These can also be integrated with many of your favorite tools such as source control, jira, and slack. You can read more about it here: https://docs.cypress.io/guides/cloud/introduction
5 Views