question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error on using `skip` in `chromaui/action@v1`

See original GitHub issue

I tried to avoid ui testing when the branch name matches the nostorybook/** pattern. So I used the skip option in the chromaui/action@v1 Github action but failed.

Here is the log of the error:

Run chromaui/action@v1
  with:
    token: ***
    projectToken: ***
    autoAcceptChanges: master|develop
    skip: nostorybook/**
    exitZeroOnChanges: true
    storybookBuildDir: storybook-static
  env:
    NPM_CONFIG_USERCONFIG: /home/runner/work/_temp/.npmrc

Chromatic CLI v5.7.0
https://www.chromatic.com/docs/cli

Authenticating with Chromatic
    → Connecting to https://index.chromatic.com
Authenticated with Chromatic
    → Using project token '********'
Retrieving git information
Skipping build
    → Skipping build for commit d93560e due to --skip
Skipping build
    → Skipped build for commit d93560e due to --skip
Error: Cannot read property 'toString' of undefined
Error: TypeError: Cannot read property 'toString' of undefined
    at /home/runner/work/_actions/chromaui/action/v1/action/main.js:203:58
    at step (/home/runner/work/_actions/chromaui/action/v1/action/main.js:44:23)
    at Object.next (/home/runner/work/_actions/chromaui/action/v1/action/main.js:25:53)
    at fulfilled (/home/runner/work/_actions/chromaui/action/v1/action/main.js:16:58)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
Error: Cannot read property 'toString' of undefined

And here is an example workflow with its yml config

┆Issue is synchronized with this Asana task by Unito

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
jrolfscommented, Oct 19, 2021

Good catch! I thought I had double-checked that, but it was incorrect. Here’s the final, working, workaround for pull_request events:

      - name: Skip Chromatic
        if:
          ${{
            contains(github.head_ref, 'dependabot-') ||
            contains(github.head_ref, 'changeset-release')
          }}
        run: yarn chromatic --project-token=$PROJECT_TOKEN --build-script-name='build:storybook:export' --skip
        env:
          PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
          CHROMATIC_BRANCH: ${{ github.head_ref }}
          CHROMATIC_SHA: ${{ github.event.pull_request.head.sha }} # <--------
          CHROMATIC_SLUG: ${{ github.repository }}

Thanks again for the attentiveness @tmeasday. I’ll be happy to test a fix for the skip option when it’s available.

0reactions
tmeasdaycommented, Oct 19, 2021

Hi @jrolfs - I can’t see the commit in the second screenshot – are you sure it is the same one (c867f06b)?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Laravel Undefined offset when using Skip() in database query
Hopefully a simple one, but I'm getting nowhere fast with it,. I need to perform a query in Laravel where I skip the...
Read more >
limit and skip doesn't work on mongodb 3.2 #3763 - GitHub
It seem like mongodb 3.2, limit and skip field must be numeric number. ... while the same code breaks with Mongoose 4.13 with...
Read more >
Restricting return values with the SKIP, LIMIT, and FIRST options
You can use the SKIP, LIMIT, and FIRST options to restrict the number of return values. The SKIP option excludes the first specified...
Read more >
skip take error - Laracasts
Hello, In order to limit my query in my controller I'm using skip take but skip make it fail. What is my mistake...
Read more >
Query optimization while using skip and limit in Atlas search
HI I am trying to $skip and $limit after $search in the aggregation. Each and every time when I try to increase my...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found