java.lang.IllegalStateException: Failed to find all committed files

I am getting below error while execution sonarqube after compilation inside docker container

build 02-Apr-2024 18:21:47 Sonar Scanner …
build 02-Apr-2024 18:21:47 ======================================================================
error 02-Apr-2024 18:22:40 16:22:34.265 ERROR: Error during SonarScanner execution
error 02-Apr-2024 18:22:40 java.lang.IllegalStateException: Failed to find all committed files
error 02-Apr-2024 18:22:40 at org.sonar.scm.git.CompositeBlameCommand.collectAllCommittedFiles(CompositeBlameCommand.java:124)
error 02-Apr-2024 18:22:40 at org.sonar.scm.git.CompositeBlameCommand.blame(CompositeBlameCommand.java:76)
error 02-Apr-2024 18:22:40 at org.sonar.scanner.scm.ScmPublisher.publish(ScmPublisher.java:87)
error 02-Apr-2024 18:22:40 at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:373)
error 02-Apr-2024 18:22:40 at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
error 02-Apr-2024 18:22:40 at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
error 02-Apr-2024 18:22:40 at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:137)
error 02-Apr-2024 18:22:40 at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
error 02-Apr-2024 18:22:40 at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
error 02-Apr-2024 18:22:40 at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
error 02-Apr-2024 18:22:40 at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
error 02-Apr-2024 18:22:40 at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
error 02-Apr-2024 18:22:40 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
error 02-Apr-2024 18:22:40 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
error 02-Apr-2024 18:22:40 at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
error 02-Apr-2024 18:22:40 at java.base/java.lang.reflect.Method.invoke(Unknown Source)
error 02-Apr-2024 18:22:40 at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
error 02-Apr-2024 18:22:40 at com.sun.proxy.$Proxy0.execute(Unknown Source)
error 02-Apr-2024 18:22:40 at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
error 02-Apr-2024 18:22:40 at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
error 02-Apr-2024 18:22:40 at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
error 02-Apr-2024 18:22:40 at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
error 02-Apr-2024 18:22:40 at org.sonarsource.scanner.cli.Main.main(Main.java:61)
error 02-Apr-2024 18:22:40 Caused by: org.eclipse.jgit.errors.MissingObjectException: Missing unknown 202387b60ef6420275a7346ca6663e198fd29f64
error 02-Apr-2024 18:22:40 at org.eclipse.jgit.internal.storage.file.WindowCursor.open(WindowCursor.java:135)
error 02-Apr-2024 18:22:40 at org.eclipse.jgit.lib.ObjectReader.open(ObjectReader.java:214)
error 02-Apr-2024 18:22:40 at org.eclipse.jgit.revwalk.RevWalk.parseAny(RevWalk.java:1081)
error 02-Apr-2024 18:22:40 at org.eclipse.jgit.revwalk.RevWalk.parseCommit(RevWalk.java:992)
error 02-Apr-2024 18:22:40 at org.sonar.scm.git.CompositeBlameCommand.collectAllCommittedFiles(CompositeBlameCommand.java:111)
error 02-Apr-2024 18:22:40 … 22 more
error 02-Apr-2024 18:22:40 16:22:34.266 ERROR:
*********************************************************************************************
Iam downloading sonar in docker file and running inside docker through bamboo jobs
below is th dockerfile content for sonarqube download
#Install Sonar Scanner
RUN wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.6.2.2472-linux.zip -P /opt/
RUN unzip /opt/sonar-scanner-cli-4.6.2.2472-linux.zip -d /opt/
RUN mv /opt/sonar-scanner-4.6.2.2472-linux /opt/sonar-scanner
RUN rm -rf /opt/sonar-scanner-cli-4.6.2.2472-linux.zip
RUN cp -r /sys_fw_pc/sys_tools/sonar-scanner/sonar-scanner.properties /opt/sonar-scanner/conf/

ENV SONAR_HOME /opt/sonar-scanner
ENV PATH $PATH:/opt/sonar-scanner/bin

This is pipeline script where i run sonar scanner

func_sonar_analysis() {
  #Default Values
  flagSonar=0
  sonarStatus=0

  echo "======================================================================"
  echo "Sonar Scanner ..."
  echo "======================================================================"
  docker run --workdir /sys_smartlight --mount type=bind,source=$bamboo_directory,target=/sys_smartlight $pc_linux_docker gcovr --exclude-throw-branches --sonarqube test_coverage.xml
  docker run --workdir /sys_smartlight --mount type=bind,source=$bamboo_directory,target=/sys_smartlight $pc_linux_docker sonar-scanner -Dsonar.verbose=true -Dsonar.host.url=https://devstack.vwgroup.com/sonar -Dsonar.login= -Dsonar.projectKey=SL:SmartLight:SYS |
  #docker run --workdir /sys_smartlight --mount type=bind,source=$bamboo_directory,target=/sys_smartlight $pc_linux_docker sonar-scanner |

  while IFS= read -r line
  do
    if (echo "$line" | grep -q "EXECUTION SUCCESS") ; then
      flagSonar=1
    fi

    if [ "$flagSonar" ==  1 ];then
      sonarStatus=1
      return "$sonarStatus"
    fi
  done
}

#Sonar Scanner
func_sonar_analysis
sonarStatus=$?

#Download Sonar report
#docker run --workdir /sys_smartlight --mount type=bind,source=$bamboo_directory,target=/sys_smartlight $pc_linux_docker curl -u squ_11d829649f6f789d2a1f042c576c0a4995426d0a: -X GET -H   "Content-Type: application/json" "https://devstack.vwgroup.com/sonar/api/regulatory_reports/download?project=SL%3ASmartLight%3ASYS&branch=master" -L -o artifacts/reports/sonar/sonar_analysis.zip >> $bamboo_directory/temp_file.txt
docker run --workdir /sys_smartlight --mount type=bind,source=$bamboo_directory,target=/sys_smartlight $pc_linux_docker curl -u squ_11d829649f6f789d2a1f042c576c0a4995426d0a: -X GET -H   "Content-Type: application/json" "https://devstack.vwgroup.com/sonar/api/regulatory_reports/download?project=SL%3ASmartLight%3ASYS" -L -o artifacts/reports/sonar/sonar_analysis.zip >> $bamboo_directory/temp_file.txt
docker run --workdir /sys_smartlight --mount type=bind,source=$bamboo_directory,target=/sys_smartlight $pc_linux_docker unzip artifacts/reports/sonar/sonar_analysis.zip -d artifacts/reports/sonar/sonar_analysis >> $bamboo_directory/temp_file.txt
docker run --workdir /sys_smartlight --mount type=bind,source=$bamboo_directory,target=/sys_smartlight $pc_linux_docker cp -R artifacts/reports/sonar/sonar_analysis/report.pdf artifacts/reports/sonar/
docker run --workdir /sys_smartlight --mount type=bind,source=$bamboo_directory,target=/sys_smartlight $pc_linux_docker find -type f -name "sonar_analysis.zip" -exec rm -rf {} +
docker run --workdir /sys_smartlight --mount type=bind,source=$bamboo_directory,target=/sys_smartlight $pc_linux_docker find -type d -name "sonar_analysis" -exec rm -rf {} +

if [ "$sonarStatus" == 1 ]
then
    echo "======================================================================"
    echo "Sonar Execution is success - Find results here - https://devstack.vwgroup.com/sonar/dashboard?id=SL%3ASmartLight%3ASYS"
    echo "======================================================================"

    export SonarStatus=1
else
    echo "======================================================================"
    echo "Sonar Execution is not success - Find results here - https://devstack.vwgroup.com/sonar/dashboard?id=SL%3ASmartLight%3ASYS"
    echo "======================================================================"
fi
______----------------------------------------------------------------

Hey there.

As noted in the template post, what version of SonarQube are you using?

Also please don’t post tokens in a public community forum. I removed the one you posted (sonar.login) from this post, but you should consider the token compromised.

Also please don’t post tokens in a public community forum. I removed the one you posted (sonar.login ) from this post, but you should consider the token compromised.
— thank you it was by mistake

sonar version :4.6.2
i am donwloading sonar inside docker file and running inside docker container in bamboo(bamboo version: 9.2.12)
docker file:
RUN wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.6.2.2472-linux.zip -P /opt/
RUN unzip /opt/sonar-scanner-cli-4.6.2.2472-linux.zip -d /opt/
RUN mv /opt/sonar-scanner-4.6.2.2472-linux /opt/sonar-scanner
RUN rm -rf /opt/sonar-scanner-cli-4.6.2.2472-linux.zip
RUN cp -r /sys_fw_pc/sys_tools/sonar-scanner/sonar-scanner.properties /opt/sonar-scanner/conf/

This is the version of the scanner you’re using. You can find the SonarQube version in the footer of your SonarQube instance.