Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

When GitHub Actions says a Cypress screenshot path does not exist, the dependable fix is to stop guessing the filename. First determine whether Cypress failed to create a screenshot or a later workflow step looked in the wrong place. Then read the path Cypress resolved, use that path inside the producing job, and explicitly upload and download the directory when another job needs the files. Cypress normally starts at cypress/screenshots, but the spec-derived subdirectory can change with the set of specs selected for a run.

The shortest reliable fix

  1. Find the exact step that reports the missing path. It may be Cypress saving a screenshot, or a shell/action step trying to find, copy, upload, or publish one.
  2. Check the active screenshotsFolder, screenshotOnRunFailure, and trashAssetsBeforeRuns settings.
  3. Do not reconstruct the subdirectory from memory. Log the path supplied by Cypress’s screenshot callback or after:screenshot event.
  4. In the same job, pass that path to the next step relative to the job’s current working directory.
  5. Across jobs, upload the generated directory in the Cypress job and download the named artifact into the path expected by the consuming job.

The common mistake is treating a screenshot as a fixed repository-root file such as cypress/screenshots/spec-name/failure.png. Cypress derives part of that path from the selected spec set, so a matrix change or a different --spec value can legitimately move the file.

1. Identify which command is failing

Cypress did not save a screenshot

Automatic failure screenshots are associated with cypress run. They are enabled by default unless screenshotOnRunFailure is set to false. A workflow that uses cypress open should not assume the same automatic failure-capture behavior.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Manual calls such as cy.screenshot('checkout/error') have their own name and options. A missing image may therefore be caused by the test never reaching that call, by screenshot capture being disabled, or by an error while the page is being captured.

#1 Best Overall
Sale
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents

A later step looked in the wrong place

If Cypress completed but an upload, copy, shell test -f, or publishing action reports “Path Does Not Exist,” the capture may already be present under another path. Inspect the producing job immediately after the Cypress command before changing configuration.

2. Confirm the active Cypress destination

Cypress stores screenshots in the configured screenshotsFolder. If no custom value is present, the documented default is cypress/screenshots. Check the configuration that the CI command actually loads; a different config file, package script, or working directory can make a locally correct path wrong on the runner.

const { defineConfig } = require('cypress');

module.exports = defineConfig({
  screenshotsFolder: 'cypress/screenshots',
  screenshotOnRunFailure: true,
  trashAssetsBeforeRuns: true,
  e2e: {
    setupNodeEvents(on, config) {
      return config;
    }
  }
});

The explicit values above match Cypress defaults. Keep trashAssetsBeforeRuns: true unless you have a deliberate retention design: Cypress clears the screenshots folder before a run by default. Turning cleanup off does not repair a wrong path and can make an old image look like a successful current capture.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

3. Understand how Cypress builds the filename

The spec-derived directory is not always stable

Below the screenshots folder, Cypress creates a directory derived from the spec path. It removes path segments common to all specs selected for that run. Selecting one spec, a whole directory, or a different matrix slice can therefore produce different repository-relative paths even when the test file itself has not moved.

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
  • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors

For example, a run selecting specs under cypress/e2e/account/ may strip a different common ancestor than a run selecting both cypress/e2e/account/ and cypress/e2e/admin/. A glob that worked for the first run is not proof that the same glob is valid for the second.

Names can add another directory

The argument to cy.screenshot() is relative to the screenshots folder and the spec-derived directory. A slash in the name creates nested directories. Thus cy.screenshot('checkout/error') intentionally creates an checkout directory beneath the directory Cypress chose for the spec.

it('captures the validation state', () => {
  cy.visit('/checkout');
  cy.get('[data-testid="submit"]').click();
  cy.screenshot('checkout/validation-error');
});

Do not replace the spec-derived portion with a hard-coded filename unless the selected-spec set is guaranteed not to change.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

4. Log the path Cypress actually used

Use the screenshot callback

A manual screenshot can report its resolved details through the callback. Log the path in CI while diagnosing the failure, then remove or reduce the logging once the workflow consumes the correct location.

Rank #3
Sale
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.
cy.screenshot('checkout/validation-error', {}, (details) => {
  cy.task('log', `Cypress wrote: ${details.path}`);
});

The callback details are preferable to rebuilding a path from the spec name because they reflect the active configuration, selected specs, and requested screenshot name.

Use the Node after:screenshot event

The Node event receives screenshot details and can inspect the filesystem from the runner. This is useful for both automatic failure screenshots and manual captures.

const { defineConfig } = require('cypress');

module.exports = defineConfig({
  e2e: {
    setupNodeEvents(on, config) {
      on('after:screenshot', (details) => {
        console.log(`Cypress screenshot: ${details.path}`);
        console.log(`Dimensions: ${details.dimensions.width}x${details.dimensions.height}`);
        return details;
      });
      return config;
    }
  }
});

Use the emitted path as the source for a copy or archive operation. If your logger prints an absolute path, convert it to the repository or job workspace path expected by the next command; do not silently prepend the repository root twice.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

5. Check every GitHub Actions path boundary

Steps in one job

Steps in the same job normally share the workspace, but a step can change its working-directory. A path printed by Cypress from the repository root is not the same string when a later step runs inside a subdirectory. Print the current directory and use paths relative to that step’s location.

Rank #4
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient
- name: Run Cypress
  run: npx cypress run

- name: List screenshots
  if: always()
  run: |
    pwd
    find cypress/screenshots -type f -print

- name: Publish a known file
  if: always()
  run: node scripts/publish-screenshot.js

The temporary listing distinguishes “Cypress created nothing” from “the next command searched elsewhere.” Keep it immediately after the Cypress step so cleanup or another command cannot obscure the result.

Separate producer and consumer jobs

A later job does not inherit files from the earlier job’s runner. Transfer them explicitly. The artifact’s name and both paths must match the workflow you actually run.

jobs:
  cypress:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Install dependencies
        run: npm ci
      - name: Run Cypress
        run: npx cypress run
      - name: Upload Cypress screenshots
        if: always()
        uses: actions/upload-artifact@v4
        with:
          name: cypress-screenshots
          path: cypress/screenshots
          if-no-files-found: warn

  consume:
    needs: cypress
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Download Cypress screenshots
        uses: actions/download-artifact@v4
        with:
          name: cypress-screenshots
          path: cypress/screenshots
      - name: List downloaded files
        run: find cypress/screenshots -type f -print

If screenshotsFolder is custom, replace both artifact paths with that directory. If the producer uploads build/screens but the consumer downloads to cypress/screenshots, the files may exist while the consuming command still checks the wrong location.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

6. A diagnostic workflow for the failing run

  1. Record the Cypress command, selected specs, config file, and each step’s working-directory.
  2. Check whether the failure is during capture or after Cypress exits.
  3. Print the resolved path from after:screenshot or the screenshot callback.
  4. Immediately run pwd and a recursive listing of the configured screenshots folder.
  5. Compare the printed path with the path consumed by the next command, including any custom folder and nested name.
  6. If another job is involved, verify that the producer uploads the actual directory and the consumer downloads the same artifact name to the directory its command checks.
  7. After the fix, remove noisy listings but retain a concise path log if future matrix changes are likely.

Common causes and matching fixes

Symptom Likely cause Fix
cypress/screenshots is absent The folder is customized, the run produced no screenshot, or the command ran from another directory. Read screenshotsFolder, confirm the run mode and failure setting, then list from the step’s working directory.
A failure occurred but no image exists The command was not cypress run, or screenshotOnRunFailure is disabled. Run in the intended mode and restore the setting if automatic failure images are required.
The folder exists but the exact filename does not The spec-derived directory or a slash in the screenshot name was omitted. Use the callback/event path rather than a guessed filename.
The path changed after a matrix or glob change Common-ancestor stripping depends on the selected spec set. Resolve the path at runtime and archive the resulting directory.
An older image disappeared The default cleanup ran before the new Cypress run. Use the current run’s output; do not depend on stale files.
A later job cannot find a file that existed earlier Jobs have separate workspaces. Upload an artifact in the Cypress job and download it by the same name and compatible destination.

Make the workflow resilient to future changes

  • Archive the configured screenshots directory instead of one guessed filename when a run can execute multiple specs.
  • Derive downstream inputs from Cypress’s reported path, especially when tests are selected by a matrix or dynamic glob.
  • Keep artifact names unique when several jobs upload different screenshot sets; include the matrix key in the artifact name if needed.
  • Use if: always() on diagnostic and upload steps so a failed test still produces evidence, while using if-no-files-found: warn only when an empty run is an expected possibility.
  • Document custom screenshotsFolder and workflow working directories beside the YAML so a path change is visible during review.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If you need a clean image of a public page rather than Cypress test-run artifacts, ScreenshotNeo provides a website screenshot API. It accepts consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the result with X-Page-Verdict and X-Billed headers. Its MCP server exposes take_screenshot, get_page_info, and capture_pdf to Claude, Cursor, and other MCP clients.

One GET request

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for authentication and options. The same endpoint supports PNG, JPEG, WebP, or PDF output and options such as full-page capture with lazy images loaded, CSS-selector element capture, dark mode, device presets, arbitrary viewports, retina scale, custom CSS and JavaScript, click-before-capture, hidden selectors, selector/delay/network-idle waits, request and resource blocking, headers, cookies, user agents, authorization, timezone, geolocation, transparent backgrounds, resizing, chosen cache TTLs, signed links, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, usage data, and an OpenAPI specification. Parameter names used by other screenshot APIs also work to ease migration.

Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.

Python

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Node.js

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

Plans include 1,000 screenshots per month free with no card, Starter at $5 for 3,000, Growth at $15 for 15,000, Pro at $39 for 60,000, Scale at $99 for 250,000, and Business at $249 for 1,000,000. Yearly billing gives two months free, and every feature is included on every plan. Sign up for the free plan to get 1,000 screenshots a month without adding a card.

FAQ

Does changing the runner operating system guarantee a different screenshot path?

No. The decisive variables are the active Cypress configuration, selected spec set, screenshot name, and workflow working directory. Check the path reported in the failing job rather than inferring it from the runner label.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Can ScreenshotNeo preserve Cypress’s test-specific failure context?

No. ScreenshotNeo is a separate website-capture service. Use Cypress artifacts when you need the browser state and test metadata from a failing test; use ScreenshotNeo when a direct URL capture and its cleanup, billing, and MCP behavior fit the job.

Frequently Asked Questions

Does changing the runner operating system guarantee a different screenshot path?

No. The decisive variables are the active Cypress configuration, selected spec set, screenshot name, and workflow working directory. Check the path reported in the failing job rather than inferring it from the runner label.

Can ScreenshotNeo preserve Cypress’s test-specific failure context?

No. ScreenshotNeo is a separate website-capture service. Use Cypress artifacts when you need browser state and test metadata from a failing test; use ScreenshotNeo for direct URL captures.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.