JFrog Xray "scan failed" in CI
Xray could not complete the scan. The target may not be indexed yet, Xray may be unreachable, or the build info Xray needs was not published before the scan ran.
What this error means
A jf scan, jf docker scan, or jf build-scan step fails with "Scan failed" or "The scan did not complete", sometimes noting the resource is not indexed.
jf
[Error] Xray scan failed:
The requested build 'my-build/12' was not found or has not been indexed by Xray yet.Common causes
The resource is not indexed yet
Xray indexes artifacts and builds asynchronously. Scanning immediately after publish can run before indexing completes.
Xray is unreachable or the watch is misconfigured
A wrong URL, a down Xray service, or a scan targeting a build that was never published fails the scan step.
How to fix it
Publish build info, then scan the build
- Publish build info before the scan so Xray has something to index.
- Scan the published build rather than an artifact that is not indexed.
- Allow indexing to complete before invoking the scan.
Terminal
jf rt build-publish my-build ${{ github.run_number }}
jf build-scan my-build ${{ github.run_number }}Verify Xray connectivity
Confirm the platform URL is correct and Xray is enabled; a misrouted request cannot scan.
Terminal
jf rt curl -XGET "/xray/api/v1/system/ping"How to prevent it
- Publish build info before invoking a build scan.
- Allow time for Xray indexing after publish.
- Verify the platform URL routes to a running Xray instance.
Related guides
JFrog Xray "violations found" blocking gate in CIFix JFrog Xray "violations found" failing a CI gate - a security or license policy watch flagged the build an…
Artifactory "build info not found" in CIFix Artifactory "build info not found" in CI - a promote, scan, or download-by-build step referenced a build…
JFrog "requires a valid license" feature error in CIFix JFrog "requires a valid license" in CI - a jf command used a feature (Xray, build promotion, distribution…