codeql-action icon indicating copy to clipboard operation
codeql-action copied to clipboard

[bug] CodeQL error says goto `https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning/automatic-build-failed.`

Open SwuduSusuwu opened this issue 1 year ago • 2 comments

[WeblQL gives a clickable link which ends with .] If you remove the trailing . the URL ( https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning/automatic-build-failed ) launches. https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning/automatic-build-failed. is from https://github.com/SwuduSusuwu/SubStack/actions/runs/9693135643/job/26747940322

  [2024-06-27 08:20:32] [build-stderr] cpp/autobuilder: using built-in deptrace DB
  [2024-06-27 08:20:33] [build-stderr] cpp/autobuilder: launched deptrace server
  [2024-06-27 08:20:34] [build-stderr] cpp/autobuilder: Build will be attempted from '.' even though no build system was found there.
  [2024-06-27 08:20:34] [build-stdout] ~/work/SubStack/SubStack ~/work/SubStack/SubStack
  [2024-06-27 08:20:34] [build-stdout] ~/work/SubStack/SubStack
  [2024-06-27 08:20:34] [build-stderr] cpp/autobuilder: No supported build system detected.
  [2024-06-27 08:20:34] [build-stderr] cpp/autobuilder: deptrace was enabled.
  [2024-06-27 08:20:34] [build-stderr] cpp/autobuilder: autobuild summary.
  Error: 6-27 08:20:34] [ERROR] Spawned process exited abnormally (code 1; tried to run: [/opt/hostedtoolcache/CodeQL/2.17.5/x64/codeql/tools/linux64/preload_tracer, /opt/hostedtoolcache/CodeQL/2.17.5/x64/codeql/cpp/tools/autobuild.sh])
  A fatal error occurred: Exit status 1 from command: [/opt/hostedtoolcache/CodeQL/2.17.5/x64/codeql/cpp/tools/autobuild.sh]
  Error: We were unable to automatically build your code. Please replace the call to the autobuild action with your custom build steps. We were unable to automatically build your code. Please change the build mode for this language to manual and specify build steps for your project. For more information, see https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning/automatic-build-failed. Encountered a fatal error while running "/opt/hostedtoolcache/CodeQL/2.17.5/x64/codeql/codeql database trace-command --use-build-mode --working-dir /home/runner/work/SubStack/SubStack -O=cpp.trap.cache.dir=/home/runner/work/_temp/trapCaches/cpp -O=cpp.trap.cache.bound=1024 -O=cpp.trap.cache.write=true /home/runner/work/_temp/codeql_databases/cpp". Exit code was 2 and error was: A fatal error occurred: Exit status 1 from command: [/opt/hostedtoolcache/CodeQL/2.17.5/x64/codeql/cpp/tools/autobuild.sh] See the logs for more details.

https://github.com/orgs/community/discussions/129953#discussioncomment-9893577 has fix for this specific error, but CodeQL's URL schema could confuse others (presume that this affects all URLs from CodeQL's stderr)

SwuduSusuwu avatar Jun 27 '24 13:06 SwuduSusuwu

Hi @SwuduSusuwu ,

Thanks for opening this issue. I'll let the responsible engineering team know about this.

jketema avatar Jun 27 '24 13:06 jketema

Opened up a PR to fix this by rewording the message at https://github.com/github/codeql-action/pull/2355.

angelapwen avatar Jun 27 '24 14:06 angelapwen