# Troubleshooting

<table><thead><tr><th width="237.69140625">Issue</th><th width="221.05859375">Possible Cause</th><th>Resolution</th></tr></thead><tbody><tr><td><strong>JARs not found</strong></td><td>Incorrect paths to SeaLights JARs</td><td>Verify <code>sealightsBuildScannerJar</code> and <code>sealightsTestListenerJar</code> are correct and accessible</td></tr><tr><td><strong>Relative paths not working</strong></td><td>Paths resolved from project root</td><td>Ensure relative paths (e.g., <code>project/..</code>) are valid from the root project directory</td></tr><tr><td><strong>Tests are not instrumented</strong></td><td>Tests are not running in forked JVM</td><td>Ensure <code>fork := true</code> is set for test tasks and not overridden later</td></tr><tr><td><strong>No coverage reported</strong></td><td>Test Listener not running or misconfigured</td><td>Verify Test Listener is correctly configured and tests are executed</td></tr><tr><td><strong>Build succeeds but no data in SeaLights</strong></td><td>Missing or incorrect Build Session ID</td><td>Ensure Build Scanner ran successfully before tests</td></tr><tr><td><strong><code>testsonly</code> mode</strong></td><td>No previous scan exists</td><td>Run a full build or <code>scanonly</code> first to generate a Build Session ID</td></tr><tr><td><strong>SeaLights disabled unexpectedly</strong></td><td><code>sealightsDisabled</code> flag enabled</td><td>Check <code>sealightsDisabled := Some(true)</code> or <code>-DsealightsDisabled=true</code></td></tr><tr><td><strong>Plugin tasks not executed</strong></td><td>Incorrect SBT command or plugin not loaded</td><td>Verify plugin is added in <code>project/plugins.sbt</code> and run <code>sbt tasks</code> to confirm</td></tr><tr><td><strong>CI builds behave differently</strong></td><td>Environment differences (paths, permissions)</td><td>Verify JAR paths, config file location, and environment variables in CI</td></tr><tr><td><strong>Connection issues to SeaLights</strong></td><td>Network or proxy configuration</td><td>Ensure outbound connectivity and configure JVM proxy settings if needed</td></tr></tbody></table>

### Debugging Tips

#### Enable Debug Logging

Run the Build Scanner with debug logs:

```bash
java -jar sl-build-scanner.jar -sbt -configfile ./sl-config.json -logLevel debug -workspacepath ./my-project
```

#### Verify Build Scanner Execution

Make sure the Build Scanner runs successfully before tests:

* Check logs for Build Session ID generation
* Ensure no errors during scan phase

#### Verify Test Execution Flow

Confirm that:

* tests are actually executed
* tests run in forked JVMs
* Test Listener is attached

#### Validate Configuration

Double-check:

* `sl-config.json` path
* JAR locations
* execution mode (`scanonly`, `testsonly`, `full`)
