Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Failure: CodeQL detected code written in Java/Kotlin but could not process any of it. #2310

Closed
vorburger opened this issue Oct 26, 2023 · 4 comments
Assignees
Labels
type:bug Something isn't working type:build Issues related to code build

Comments

@vorburger
Copy link
Member

E.g. https://github.com/google/android-fhir/actions/runs/6653530183/job/18079682920?pr=2309 (for #2309) failed with:

/opt/hostedtoolcache/CodeQL/2.15.1/x64/codeql/codeql database finalize --finalize-dataset --threads=8 --ram=29865 /home/runner/work/_temp/codeql_databases/java
  CodeQL detected code written in Java/Kotlin but could not process any of it. Review our troubleshooting guide at https://gh.io/troubleshooting-code-scanning/no-source-code-seen-during-build.
  Error: Encountered a fatal error while running "/opt/hostedtoolcache/CodeQL/2.15.1/x64/codeql/codeql database finalize --finalize-dataset --threads=8 --ram=29[86](https://github.com/google/android-fhir/actions/runs/6653530183/job/18079682920?pr=2309#step:7:87)5 /home/runner/work/_temp/codeql_databases/java". Exit code was 32 and last log line was: CodeQL detected code written in Java/Kotlin but could not process any of it. Review our troubleshooting guide at https://gh.io/troubleshooting-code-scanning/no-source-code-seen-during-build. See the logs for more details.
@vorburger vorburger added type:bug Something isn't working type:build Issues related to code build labels Oct 26, 2023
@vorburger vorburger self-assigned this Oct 26, 2023
@vorburger
Copy link
Member Author

This seems to be caused since #2307 was just merged, and GitHub appears to get a bit confused... 😭

... because it still wants to run the old (now deleted) CodeQL related action (which doesn't exist anymore now).

I had hoped that a git rebase from master (locally, or by clicking that Update branch button) would fix this...

... but apparently that is not so?! Hm.

@vorburger
Copy link
Member Author

I raised #2311 to re-create PR #2309 to see if that helps, but it does not - exact same problem.

Apparently GitHub is somehow "hard-coded"?! Just for the record, the exact problem is that:

  1. The Build Action, which WORKED in Merge CodeQL & Build GitHub Actions (re. #2294) #2307, now for new PRs fails, with:
Run github/codeql-action/analyze@v2
/opt/hostedtoolcache/CodeQL/2.15.1/x64/codeql/codeql version --format=json
{
  "productName" : "CodeQL",
  "vendor" : "GitHub",
  "version" : "2.15.1",
  "sha" : "9e282a764bc1d84cc6bf2902fd2048[63](https://github.com/google/android-fhir/actions/runs/6653690139/job/18080196026?pr=2311#step:7:64)d1a[64](https://github.com/google/android-fhir/actions/runs/6653690139/job/18080196026?pr=2311#step:7:65)6e5",
  "branches" : [
    "codeql-cli-2.15.1"
  ],
  "copyright" : "Copyright (C) 2019-2023 GitHub, Inc.",
  "unpackedLocation" : "/opt/hostedtoolcache/CodeQL/2.15.1/x64/codeql",
  "configFileLocation" : "/home/runner/.config/codeql/config",
  "configFileFound" : false,
  "features" : {
    "featuresInVersionResult" : true,
    "indirectTracingSupportsStaticBinaries" : false,
    "supportsPython312" : true,
    "mrvaPackCreate" : true
  }
}
Finalizing java
  /opt/hostedtoolcache/CodeQL/2.15.1/x64/codeql/codeql database finalize --finalize-dataset --threads=8 --ram=298[65](https://github.com/google/android-fhir/actions/runs/6653690139/job/18080196026?pr=2311#step:7:66) /home/runner/work/_temp/codeql_databases/java
  CodeQL detected code written in Java/Kotlin but could not process any of it. Review our troubleshooting guide at https://gh.io/troubleshooting-code-scanning/no-source-code-seen-during-build.
  Error: Encountered a fatal error while running "/opt/hostedtoolcache/CodeQL/2.15.1/x64/codeql/codeql database finalize --finalize-dataset --threads=8 --ram=29[86](https://github.com/google/android-fhir/actions/runs/6653690139/job/18080196026?pr=2311#step:7:87)5 /home/runner/work/_temp/codeql_databases/java". Exit code was 32 and last log line was: CodeQL detected code written in Java/Kotlin but could not process any of it. Review our troubleshooting guide at https://gh.io/troubleshooting-code-scanning/no-source-code-seen-during-build. See the logs for more details.
  1. GitHub still tries to run the "Code scanning results / CodeQL" Action, and fails to with:
Error when processing the SARIF file
This check concluded as neutral.

even though .github/workflows/codeql.yaml was deleted in #2307. This is weird!

I'm going to revert #2307...

@vorburger
Copy link
Member Author

#2312 "fixed" this, and e.g. #2298 and #2309 are building normally again now, so I'm going to close this bug again now.

@vorburger
Copy link
Member Author

FTR: I'm tetrying this in #2314 (but a little bit differently; hoping I now better understood the problem).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working type:build Issues related to code build
Projects
Status: Complete
Development

No branches or pull requests

1 participant