Troubleshooting Guide
Common issues and their solutions when using Webshot Archive.
Authentication Issues
"Invalid client credentials" or "Authentication failed"
Symptoms:
- GitHub Action fails with authentication errors
- API calls return 401 Unauthorized
Solutions:
-
Check secret names:
# Make sure these match exactly in your workflow
clientId: ${{ secrets.WEBSHOT_ARCHIVE_CLIENT_ID }}
clientSecret: ${{ secrets.WEBSHOT_ARCHIVE_CLIENT_SECRET }} -
Verify secret values:
- Go to your GitHub repository → Settings → Secrets and variables → Actions
- Check that the secrets exist and have the correct values
- Ensure no extra spaces or characters were copied
-
Regenerate credentials:
- Go to Account Settings
- Find your service account
- Click "View / Add Credentials" → "Create Credentials"
- Update your GitHub secrets with the new values
-
Check project ID:
- Verify your
projectId
secret matches your actual project ID - Find your project ID in the Webshot Archive dashboard
- Verify your
"Project not found" or "Access denied"
Solutions:
-
Verify project ownership:
- Ensure you're using the correct project ID
- Check that your service account has access to the project
-
Check project status:
- Verify your project is active and not suspended
- Check your account status and usage limits
Screenshot Issues
"Screenshots folder not found"
Symptoms:
- GitHub Action fails with "No screenshots found"
- Empty or missing screenshot files
Solutions:
-
Check folder path:
# Make sure this path exists and contains screenshots
screenshotsFolder: cypress/screenshots -
Verify screenshot generation:
# Test locally first
pnpm cypress run
ls -la cypress/screenshots/ -
Common paths by framework:
- Cypress:
cypress/screenshots/
- Playwright:
test-results/
or custom path - Selenium:
screenshots/
- Cypress:
-
Check file permissions:
- Ensure the GitHub Action can read the screenshots folder
- Verify files are not empty (0 bytes)
"Screenshots are empty or corrupted"
Solutions:
-
Wait for page load:
// Add wait time for dynamic content
cy.wait(2000); // Wait 2 seconds
cy.screenshot('page-name'); -
Check viewport size:
// Set consistent viewport
cy.viewport(1280, 720);
cy.screenshot('page-name'); -
Handle animations:
// Wait for animations to complete
cy.get('.loading-spinner').should('not.exist');
cy.screenshot('page-name'); -
Check for errors:
- Look for JavaScript errors in the browser console
- Ensure the page is fully rendered before taking screenshots
Comparison Issues
"No diffs shown" or "No comparison made"
Symptoms:
- First run shows no visual differences
- Subsequent runs don't compare properly
Solutions:
-
First run behavior:
- The first screenshot has nothing to compare against
- This is normal - make a visual change and create another PR
-
Check commit SHA:
# Ensure these are set correctly
commitSha: ${{ github.event.pull_request.head.sha }}
compareCommitSha: ${{ github.event.pull_request.base.sha }} -
Verify branch comparison:
- Ensure you're comparing against the correct base branch
- Check that the base branch has previous screenshots
"Unexpected diffs" or "False positives"
Solutions:
-
Adjust diff threshold:
# Add to your workflow for more tolerance
diffThreshold: 0.1 # 10% toleranceThis can also be adjust on a per project basis in project settings on www.webshotarchive.com
-
Exclude dynamic content:
// Hide elements that change frequently
cy.get('.timestamp').invoke('hide');
cy.screenshot('page-name'); -
Use consistent data:
- Mock API responses for consistent content
- Use fixed dates and times in tests
GitHub Actions Issues
"Workflow not triggering"
Solutions:
-
Check trigger configuration:
on:
pull_request:
branches: [main, develop] # Specify branches
push:
branches: [main] -
Verify file path:
- Ensure the workflow file is in
.github/workflows/
- Check the file extension is
.yml
or.yaml
- Ensure the workflow file is in
-
Check permissions:
permissions:
contents: read
pull-requests: write
issues: write # If commenting on issues
"Action times out" or "Build fails"
Solutions:
-
Increase timeout:
- name: Run tests
timeout-minutes: 30
run: pnpm cypress:run -
Optimize build:
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
node_modules
~/.pnpm-store
key: ${{ runner.os }}-deps-${{ hashFiles('**/pnpm-lock.yaml') }} -
Use continue-on-error:
- name: Run tests
run: pnpm cypress:run
continue-on-error: true
Performance Issues
"Slow screenshot capture"
Solutions:
-
Optimize test setup:
// Use beforeEach for common setup
beforeEach(() => {
cy.visit('/');
cy.wait(1000);
}); -
Reduce viewport size:
// Smaller viewports = faster screenshots
cy.viewport(1024, 768); -
Use headless mode:
- name: Run tests
run: pnpm cypress run --headless
"Large file uploads"
Solutions:
-
Compress screenshots:
// Use PNG compression
cy.screenshot('page-name', {
compressionLevel: 6,
}); -
Reduce image quality:
// For Playwright
await page.screenshot({
path: 'screenshot.png',
quality: 80, // JPEG quality
});
API Issues
"Rate limit exceeded"
Solutions:
-
Check usage limits:
- Visit your account dashboard
- Review your current usage vs. limits
-
Optimize upload frequency:
- Only upload on significant changes
- Use conditional uploads based on file changes
-
Upgrade plan:
- Consider upgrading for higher limits
- Contact support for custom limits
"Network errors" or "Upload failed"
Solutions:
-
Retry logic:
- name: Upload with retry
uses: webshotarchive/github-[email protected]
with:
screenshotsFolder: cypress/screenshots
# ... other config
continue-on-error: true -
Check network connectivity:
- Verify GitHub Actions can reach external APIs
- Check for firewall or proxy issues
-
Use different action version:
uses: webshotarchive/github-[email protected] # Try latest version
Debugging Tips
Enable debug logging
- name: Upload with debug
uses: webshotarchive/github-[email protected]
env:
ACTIONS_STEP_DEBUG: true # Enable debug output
with:
# ... your config
Check action logs
- Go to your GitHub repository → Actions
- Click on the failed workflow run
- Expand the "Upload to Webshot Archive" step
- Look for error messages and debug output
Test locally first
# Test your setup locally before pushing
pnpm cypress run
ls -la cypress/screenshots/
Getting Help
If you're still having issues:
- Check the logs: Enable debug mode and review the output
- Search existing issues: GitHub Issues
- Join Discord: Community Discord
- Contact support: Email [email protected]
When reporting issues
Include:
- Your workflow configuration (with secrets redacted)
- Error messages and logs
- Steps to reproduce
- Expected vs. actual behavior
- Your testing framework and version