This guide helps you troubleshoot common issues with code coverage in Qlty.Documentation Index
Fetch the complete documentation index at: https://docs.qlty.sh/llms.txt
Use this file to discover all available pages before exploring further.
Upload Issues
Coverage Report Not Being Detected
Symptoms:- “Unsupported format” errors
- “Unable to parse coverage report” messages
- No coverage data appears in Qlty after upload
- Unsupported coverage format
- Corrupt or incomplete coverage report
- Incorrect file path in upload command
- Verify your coverage format is supported
- Check that the coverage report file exists and is complete
- Try using the
--formatflag to explicitly specify the format: - Examine the report file for valid content
- Generate a fresh coverage report and try again
Authentication Failures
Symptoms:- “Authentication failed” errors
- “Invalid token” messages
- “Permission denied” errors
- Incorrect coverage token
- Expired or rotated token
- Missing environment variable
- Using a token with incorrect scope
- Verify your token is correct in your CI settings
- Check environment variable names (should be
QLTY_COVERAGE_TOKEN) - Regenerate your token in Qlty and update your CI configuration
- Ensure you’re using the token for the correct workspace or project
- If using OIDC, verify the permissions configuration in your GitHub workflow
OIDC Token Failures on Forked PRs
Symptoms:- Error:
Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable - Coverage upload failures specifically on forked pull requests
- OIDC authentication is working for regular PRs but failing on forks
- GitHub Actions security restrictions prevent OIDC token generation in workflows triggered by forked pull requests
Path Mapping Issues
Symptoms:- Coverage appears but doesn’t match files in your repository
- “File not found” errors when viewing coverage
- Coverage shown for files that don’t exist in your repo
- Coverage report contains absolute paths
- Path structure differs between build environment and repository
- Generated files with different paths
- See Path Fixing for detailed solutions.
S3 Upload Failures (403 Errors)
Symptoms:- HTTP 403 Forbidden errors during coverage upload
- “Access denied” messages when uploading to S3
- Coverage upload fails with permission errors
- Restrictive AWS VPC endpoint policies that block cross-account S3 operations
- VPC endpoint policy doesn’t allow
s3:PutObjectaction to other AWS accounts
Default Branch Coverage Not Displayed
Symptoms:- Banner shows “We’ve received coverage reports; we haven’t yet received a report for your default branch”
- Coverage uploads exist but the project dashboard doesn’t display default branch coverage
Coverage config not yet merged to default branch
The most common cause is that you’ve added coverage publishing to your CI config on a feature branch but haven’t merged it to your default branch yet. Until the config change is merged, only PR branches will produce coverage uploads. Once you merge the PR that adds coverage publishing to your CI pipeline, subsequent pushes to your default branch will generate coverage uploads and the banner will go away.Default branch also a base branch for a long lived PR
If you have an open pull request where your default branch is the head (source) branch (e.g., a long-lived PR frommain → production), some CI providers may inject the PR number into every build on your default branch. This causes Qlty to classify the upload as a pull request upload instead of a branch upload.
You can confirm this by visiting your coverage uploads page and checking whether uploads for your default branch show refs/pull/XXXX instead of refs/heads/<branch>.
To resolve this, publish coverage a second time on default branch builds using the --override-pr-number flag with an empty string. This forces the upload to be classified as a branch upload while preserving PR coverage from the first publish.
Add a second publish step after your existing coverage publish command:
main with your default branch name if different (e.g., master).
Missing Metadata
Symptoms:- Coverage is uploaded but not associated with the correct branch
- Coverage doesn’t appear in pull requests
- Coverage data shows with incorrect commit information
- CI system metadata not detected
- Shallow git clone in CI
- Custom CI setup not recognized by Qlty
- Manually specify metadata with override flags:
- Ensure your CI environment provides standard environment variables
- Use a deeper git clone in CI (or fetch git metadata)
- Check that the git repository is available in the CI environment
Viewing Issues
Coverage Not Showing in GitHub
Symptoms:- No coverage status checks on pull requests
- Missing coverage comments on pull requests
- Coverage data visible in Qlty but not in GitHub
- GitHub app permissions issues
- Coverage gates not enabled
- PR comments not configured
- Timing issues with CI and status reporting
- Verify GitHub integration settings in project settings
- Check that coverage gates are enabled in quality gates settings
- Ensure PR comments are enabled
- Check GitHub app permissions in your organization settings
- Try manually uploading coverage for the PR branch
Inconsistent Coverage Reports
Symptoms:- Coverage fluctuates between builds without code changes
- Test flakiness or non-deterministic tests
- Cache issues in tests
- Different coverage tool configurations
Missing Coverage for Some Files
Symptoms:- Some files show no coverage data
- Certain directories are missing from coverage reports
- Coverage appears for some languages but not others
- Include/exclude patterns filtering out files
- Multi-language projects with incomplete coverage setup
- Files not being exercised by tests
- Generated code or third-party code inclusion/exclusion
- Check your coverage tool’s include/exclude configuration. See Excluding Files from Coverage for language-specific examples.
- Verify that all relevant files are included in coverage report generation. See our documentation on Incomplete or Missing Coverage Reports for more detail.
- Set up coverage for each language in multi-language projects
- Use multiple coverage reports for different parts of the codebase
Quality Gate Issues
Failing Coverage Gates
Symptoms:- Pull requests failing due to coverage checks
- “Coverage decreased” warnings even with improved test coverage
- Diff coverage failing despite high coverage in changed files
- Thresholds set too high for your project’s current state
- Coverage decreasing in files not directly modified
- Base branch coverage calculation issues
- Coverage calculation includes excluded files
- Adjust coverage gate thresholds to realistic levels
- Investigate unexpected coverage changes
- Temporarily disable gates while building up coverage
- Exclude irrelevant files in your coverage tool so they don’t affect gates
- Focus on diff coverage rather than total coverage for incremental improvement
Coverage Badges Not Updating
Symptoms:- Outdated coverage percentage in badges
- Coverage badge shows “unknown” or “N/A”
- Badge doesn’t reflect recent coverage improvements
- Badge caching
- No coverage data for default branch
- Badge URL issues
- Ensure coverage is being uploaded for your default branch
- Check badge URLs and project settings
- Manually refresh cached badges
- Verify that the badge is pointing to the correct project and metric
- Wait for cache expiration (typically a few hours)
Merging
Coverage Data Missing
Presenting Problem- Qlty reports less coverage for a source file than expected. For example, a line is covered according to the raw coverage data, but Qlty shows the line as not covered
- Qlty does not show coverage data for a file
-
Ensure that Qlty has received all partial reports (uploads).
The best diagnostic tool is the list of coverage uploads browsable on qlty.sh at Project Settings => Code Coverage. Search for the commit sha, pull request (e.g.
refs/pull/5), or branch (e.g.refs/heads/branchName). You should see N “incomplete” reports representing the N uploads Qlty received as well as 1 “complete” report, representing a completion of the report. If you see less than you expect, check that:- Every upload attempt succeeded. Did the CLI report “Upload successful” at the end of its output? If not, what error occurred?
- Every coverage report attempted an upload. Providing a unique name with every coverage report (with
--name) can help pinpoint a missing coverage report. (The name will be show in the coverage upload detail page) - Each upload is associated with the same expected tag (or no tag)
- Investigate Incomplete or Missing Coverage Reports
Coverage Tag Issues
Symptoms:- Tagged coverage not appearing separately
- Incorrect coverage shown for specific tags
- Tags not filtering correctly in UI
- Incorrect tag specification during upload
- Mixing tagged and untagged uploads
- UI filtering confusion
- Verify tag naming in upload commands:
- Ensure consistent tag usage across uploads
- Check tag configuration in project settings
- Use different tags for different test types (unit, integration, etc.)
Large Repository Issues
Symptoms:- Coverage uploads timing out
- Very slow coverage rendering in UI
- Missing coverage for some files in large repositories
- Coverage reports too large
- Too many files included in coverage
- Performance limits in browser extensions
- Exclude irrelevant files in your coverage tool to limit coverage to relevant code
- Split large repositories into smaller projects
- Exclude generated code, vendor code, or test code from your coverage reports
- Use more specific coverage focus for very large repositories
- Contact Qlty support for help with large-scale deployments
Getting Additional Help
If you’ve tried the solutions above and are still experiencing issues:- Contact Support: Reach out to Qlty support
- Join Discord: Ask for help in our Discord community
- GitHub Issues: Submit a bug report on our GitHub issue tracker
- The exact command you’re running
- Any error messages (with sensitive information redacted)
- Your CI provider and configuration
- The coverage tool and language you’re using
- Steps you’ve already taken to troubleshoot