Skip to main content
Version: 1.6.0

Troubleshooting

Common failures across safe setup, safe analyse and safe sca, with the message SAFE prints, what causes it, and what to do. Language-specific entries are marked.

Every safe analyse error exits 1; exit code 2 means the analysis succeeded and found vulnerabilities.


License and fingerprint

MessageCauseFix
License not found. Please ensure you have a valid license set in the SAFE_LICENSE environment variable.SAFE_LICENSE is unsetSet it — in CI, as a secret. Gleam projects never need it during the free beta
License signature verification failed... / Failed to decode license: Invalid base64 encoding.The license string is truncated or corruptedRe-copy it whole; watch for line breaks added by CI variable editors
License fingerprint does not match the current project...The license was issued for a different projectRe-run safe setup, send the new fingerprint.json to safe@erlang-solutions.com
Your license has expired on <date>...Validity period endedContact us to renew
Your project's Lines of Code (LOC) of N has exceeded the licensed amount...The codebase outgrew the licenseAnalysis continues while the overage is small; the command starts failing 1,500 lines over, and stops analysing 2,000 over. Upgrade the license
The Gleam free beta ended on <date>...The free beta for Gleam analysis has ended (Gleam)Update SAFE to the current release, or get a license and run safe setup gleam

Configuration

MessageCauseFix
Config file not found at <path>...No .safe/config.json where SAFE lookedRun safe setup, or pass --config-path. For a Gleam project run without a config, it also means no built project in the current directory — cd to the root holding gleam.toml
Failed to parse config: Invalid JSON format.Malformed config.jsonValidate the JSON
--config-path and --config-json cannot be used together.Both flags givenPass one
The --project-root argument is required when using --config-json.Inline config without a rootAdd --project-root
Could not find an .app file for app "<app>"...The app name in the config does not match the build output, or the project is not compiledCompile, then check apps and paths in the config
No source files were found to analyse. SAFE could not generate a project fingerprint.apps/paths point somewhere with no compiled codeCompile (mix compile, rebar3 compile, gleam build), then check the paths the message lists

Compilation and analysis

MessageCauseFix
One or more beam files are missing abstract code...BEAMs compiled without debug_info — often a vendored or pre-built dependencyRecompile with debug_info, or re-run with --no-abstract-code-check to skip those files
The <beam> file for app "<app>" was not compiled with debug_info...Same, caught at setup timeAs above
An unexpected error occurred while analysing your project...Unhandled failureRe-run after safe analyse clean; if it persists, send us the command and output
A finding you already fixed is still reportedSAFE analysed stale build outputRebuild before analysing. If it persists, safe analyse clean and re-run
An ignore comment has no effectIt names a function SAFE did not report, or sits on the wrong lineThere is no warning when a comment fails to match — see Ignore false positives
Results look wrong after a big restructureStale analysis databasesafe analyse clean, then analyse again
Incremental analysis

SAFE keeps its state in ~/.safe. Caching that directory between CI runs speeds up later analyses; safe analyse clean wipes it when you need a cold start.


Supply Chain Analysis

MessageCauseFix
Could not find mix.lock, rebar.lock, or manifest.toml file...No lock file in the current directorycd to the project root, or pass --lock-file
Found more than one of mix.lock, rebar.lock, and manifest.toml...Several lock files side by sideName the one to scan with --lock-file
Failed to fetch the advisory database...No network accesssafe sca needs a connection; allow it through the proxy or firewall
Invalid .safe/sca_ignore.json file...Malformed ignore fileSee Suppressing SCA findings for the expected structure
Dependencies reported as warnings, not scannedNon-Hex sources — :git, :path, and Gleam local/git entriesExpected: they have no Hex identity to match against advisories. Suppress accepted ones with ignored_non_hex_packages

Gleam-specific

See Gleam projects for the workflow these refer to.

SymptomCauseFix
... no compiled output was found at build/dev/erlangNot built for the Erlang targetRun gleam build. The JavaScript target produces nothing SAFE can read
No gleam.toml found at <root>...safe setup gleam run outside a project rootcd to the root, or pass --root
Failed to read gleam.toml: <reason>...Invalid TOML, or no name fieldFix gleam.toml
License not found... on a Gleam projectSAFE could not confirm a Gleam project, so the ordinary licensed path appliesCheck gleam.toml sits at the project root and that gleam build has compiled every app the config names. A build tree mixing Gleam with Erlang or Elixir apps is not covered by the beta
No report file after safe analyseRun without a config, SAFE prints to the console onlyGenerate a config with safe setup gleam; it stays free during the beta
The reported line is not where the call isFindings anchor to the function declaration, not the callRead the whole snippet — see Gleam projects
A finding points into test/ or dev/The module was in additional_includes, or SAFE could not match the compiled modules to the package's sources and analysed all of them rather than under-report (it logs a warning)Remove it from the config, or check the sources sit beside the build output
Findings you expected are missingOnly src/ is analysedAdd the module's .beam to additional_includes
An // safe-ignore comment does nothingIt must name the Erlang function (binary_to_atom/1, not atom.create/1) and sit immediately above pub fnSee Ignore false positives

Still stuck?

Contact safe@erlang-solutions.com with the command you ran and the output you got. Include .safe/config.json if you have one — and if the run produced a log, redact it first.