Common problems, root causes, and fixes. If your issue isn't here, please open a bug report.
Cause: .env is missing or doesn't contain values for the active
ENVIRONMENT prefix.
Fix:
cp .env.example .env
# Then edit .env if you need non-default valuesIf you're targeting production, ensure every PRODUCTION_* variable is set.
Cause: ENVIRONMENT in .env is not one of staging / production.
Fix: Set ENVIRONMENT=staging (or production) in .env.
Cause: Playwright browsers weren't installed.
Fix:
npx playwright install --with-deps chromiumOn Linux runners, you may need --with-deps to also install OS libraries.
Cause: No internet access or the demo target is temporarily down.
Fix: Verify connectivity with curl -I https://opensource-demo.orangehrmlive.com.
If the site is down, retry later or point at your own OrangeHRM instance via
STAGING_BASE_URL.
Cause: The setup-auth project hasn't run yet (e.g. you launched the
authenticated project in isolation).
Fix:
npx playwright test --project=setup-auth
# or just:
npx playwright testPlaywright will resolve the dependency chain automatically.
Cause: UI animation, slow API response, or an unstable selector.
Fixes (in order):
- Confirm the locator with
npx playwright codegen <url>. - Use
Wait.forVisible(locator)/Wait.forURL(...)instead of fixed sleeps. - Prefer role-based locators (
getByRole('button', { name: 'Login' })) over CSS chains. - If the element is inside a slow widget, increase that specific assertion's timeout — never globally.
Cause #1: Different viewport. CI uses headless 1440×900 by default;
some UI elements collapse below specific widths.
→ Reproduce locally with npm run test:headed.
Cause #2: Race with auth setup. Specs ran before setup-auth finished.
→ Don't pass --project=authenticated in isolation; let Playwright resolve
dependencies.
Cause #3: Network jitter. OrangeHRM demo can be slow.
→ Use Wait.* helpers and the per-call timeout option; avoid global bumps.
Cause: Allure's CLI requires a Java runtime.
Fix: Install Java 8+ (e.g. Temurin, Oracle, Zulu) and re-run.
Cause: Tests ran but allure-results/ was wiped before generation.
Fix: Don't call npm run clean between the test run and
allure:generate. Inside CI, the regression workflow merges per-shard
results before generating the combined report.
Cause: package-lock.json is out of sync with package.json.
Fix:
npm install
git add package-lock.json
git commit -m "chore: refresh package-lock"Cause: package-lock.json changed (any dependency bump invalidates the
key, by design).
This is expected — caches refresh whenever the lockfile changes. The
workflow falls back to npx playwright install --with-deps, which is slower
but always correct.
Cause: Default-branch protection prevented the checkout from running.
Fix: Ensure Settings → Actions → General allows contents: read for
GitHub Actions on the repo.
- Search open issues.
- Ask in Discussions.
- File a bug using the Bug Report template.