As soon as I added my project, it failed to analysis it with id:
Analysis ID “38152260-0ab1-4a18-846f-1f2371079b5f”
It’s my first time here, I don’t know how can I provide additional information.
As soon as I added my project, it failed to analysis it with id:
Analysis ID “38152260-0ab1-4a18-846f-1f2371079b5f”
It’s my first time here, I don’t know how can I provide additional information.
Hi,
Welcome to the community!
Can you provide the approximate date/timestamp of this failure?
Thx,
Ann
I was around 15 minutes ago
My second analysis just finished, and I got an error again:
Analysis ID “2c2caee7-1763-4d39-a02a-2e98f7e85899”
Hi,
I figured it was really recent. Thanks for the confirmation. I’ve flagged this for the folks with log access. And they probably won’t see it until Monday morning, EU-time.
BTW, there’s probably some misconfiguration at play & no point in retrying the analysis until we hear back.
Ann
I waiting for the sonaqube configuration in github actions, now that can check the log I got this as an error:
/Users/runner/work/_actions/SonarSource/sonarqube-scan-action/v4/scripts/run-sonar-scanner-cli.sh: line 80: scanner_args[@]: unbound variable
Hi,
Are you using automatic analysis or a CI-based analysis?
If the latter, can you provide the full job log?
Ann
If you need something different, just let me know! Thanks in advance.
Run SonarSource/sonarqube-scan-action@v4
Run ${GITHUB_ACTION_PATH}/scripts/sanity-checks.sh
Run actions/cache@v4
Cache not found for input keys: sonar-scanner-cli-6.2.1.4610-macOS-ARM64
Run ${GITHUB_ACTION_PATH}/scripts/install-sonar-scanner-cli.sh
+ mkdir -p /Users/runner/work/_temp/sonarscanner
+ cd /Users/runner/work/_temp/sonarscanner
+ SCANNER_FILE_NAME=sonar-scanner-cli-6.2.1.4610-macosx-aarch64.zip
+ SCANNER_URI=https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-6.2.1.4610-macosx-aarch64.zip
+ command -v wget
+ wget --no-verbose --user-agent=sonarqube-scan-action https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-6.2.1.4610-macosx-aarch64.zip
2025-02-07 18:00:43 URL:https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-6.2.1.4610-macosx-aarch64.zip [48366622/48366622] -> "sonar-scanner-cli-6.2.1.4610-macosx-aarch64.zip" [1]
+ unzip -q -o sonar-scanner-cli-6.2.1.4610-macosx-aarch64.zip
+ SCANNER_UNZIP_FOLDER=sonar-scanner-6.2.1.4610-macosx-aarch64
+ SCANNER_LOCAL_FOLDER=/Users/runner/work/_temp/sonar-scanner-cli-6.2.1.4610-macOS-ARM64
+ '[' -d /Users/runner/work/_temp/sonar-scanner-cli-6.2.1.4610-macOS-ARM64 ']'
+ mv -f sonar-scanner-6.2.1.4610-macosx-aarch64 /Users/runner/work/_temp/sonar-scanner-cli-6.2.1.4610-macOS-ARM64
Run echo "${RUNNER_TEMP}/sonar-scanner-cli-6.2.1.4610-macOS-ARM64/bin" >> $GITHUB_PATH
Run ${GITHUB_ACTION_PATH}/scripts/run-sonar-scanner-cli.sh
/Users/runner/work/_actions/SonarSource/sonarqube-scan-action/v4/scripts/run-sonar-scanner-cli.sh: line 80: scanner_args[@]: unbound variable
Error: Process completed with exit code 1.
Hi,
There’s a lot elided there under arrows. See how the line numbers jump?
Can you provide the full log?
Thx,
Ann
Here it is:
Run SonarSource/sonarqube-scan-action@v4
with:
scannerVersion: 6.2.1.4610
scannerBinariesUrl: https://binaries.sonarsource.com/Distribution/sonar-scanner-cli
env:
SONAR_TOKEN: ***
Run ${GITHUB_ACTION_PATH}/scripts/sanity-checks.sh
${GITHUB_ACTION_PATH}/scripts/sanity-checks.sh
shell: /bin/bash --noprofile --norc -e -o pipefail {0}
env:
SONAR_TOKEN: ***
INPUT_PROJECTBASEDIR:
Run actions/cache@v4
with:
path: /Users/runner/work/_temp/sonar-scanner-cli-6.2.1.4610-macOS-ARM64
key: sonar-scanner-cli-6.2.1.4610-macOS-ARM64
enableCrossOsArchive: false
fail-on-cache-miss: false
lookup-only: false
save-always: false
env:
SONAR_TOKEN: ***
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1
Cache not found for input keys: sonar-scanner-cli-6.2.1.4610-macOS-ARM64
Run ${GITHUB_ACTION_PATH}/scripts/install-sonar-scanner-cli.sh
${GITHUB_ACTION_PATH}/scripts/install-sonar-scanner-cli.sh
shell: /bin/bash --noprofile --norc -e -o pipefail {0}
env:
SONAR_TOKEN: ***
INPUT_SCANNERVERSION: 6.2.1.4610
INPUT_SCANNERBINARIESURL: https://binaries.sonarsource.com/Distribution/sonar-scanner-cli
+ mkdir -p /Users/runner/work/_temp/sonarscanner
+ cd /Users/runner/work/_temp/sonarscanner
+ SCANNER_FILE_NAME=sonar-scanner-cli-6.2.1.4610-macosx-aarch64.zip
+ SCANNER_URI=https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-6.2.1.4610-macosx-aarch64.zip
+ command -v wget
+ wget --no-verbose --user-agent=sonarqube-scan-action https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-6.2.1.4610-macosx-aarch64.zip
2025-02-07 18:00:43 URL:https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-6.2.1.4610-macosx-aarch64.zip [48366622/48366622] -> "sonar-scanner-cli-6.2.1.4610-macosx-aarch64.zip" [1]
+ unzip -q -o sonar-scanner-cli-6.2.1.4610-macosx-aarch64.zip
+ SCANNER_UNZIP_FOLDER=sonar-scanner-6.2.1.4610-macosx-aarch64
+ SCANNER_LOCAL_FOLDER=/Users/runner/work/_temp/sonar-scanner-cli-6.2.1.4610-macOS-ARM64
+ '[' -d /Users/runner/work/_temp/sonar-scanner-cli-6.2.1.4610-macOS-ARM64 ']'
+ mv -f sonar-scanner-6.2.1.4610-macosx-aarch64 /Users/runner/work/_temp/sonar-scanner-cli-6.2.1.4610-macOS-ARM64
Run echo "${RUNNER_TEMP}/sonar-scanner-cli-6.2.1.4610-macOS-ARM64/bin" >> $GITHUB_PATH
echo "${RUNNER_TEMP}/sonar-scanner-cli-6.2.1.4610-macOS-ARM64/bin" >> $GITHUB_PATH
shell: /bin/bash --noprofile --norc -e -o pipefail {0}
env:
SONAR_TOKEN: ***
Run ${GITHUB_ACTION_PATH}/scripts/run-sonar-scanner-cli.sh
${GITHUB_ACTION_PATH}/scripts/run-sonar-scanner-cli.sh
shell: /bin/bash --noprofile --norc -e -o pipefail {0}
env:
SONAR_TOKEN: ***
INPUT_PROJECTBASEDIR:
SONAR_SCANNER_JRE: /Users/runner/work/_temp/sonar-scanner-cli-6.2.1.4610-macOS-ARM64/jre
/Users/runner/work/_actions/SonarSource/sonarqube-scan-action/v4/scripts/run-sonar-scanner-cli.sh: line 80: scanner_args[@]: unbound variable
Error: Process completed with exit code 1.
Hi,
Well… That wasn’t as helpful as I hoped.
Can you share your pipeline?
Thx,
Ann
I’m using Sonarcube Cloud, and integrating with github actions. Is that what you want to know? Or that trying to run the action on an iOS App?
Build.yml:
name: SonarQube CI Action
on:
push:
branches:
- master
- develop
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarqube:
name: SonarQube
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v4
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
If you need my project properties as well:
sonar.projectKey=inpeaceapp_app-inpeaceapp-ios
sonar.organization=inpeaceapp
sonar.sources=Igrejas
sonar.swift.appScheme=Debug
sonar.swift.project=IgrejasDev.xcworkspace
Hi,
Can you add sonar.verbose=true
to your properties, run again and then post the log?
Thx,
Ann
It was 57 lines as well:
Run SonarSource/sonarqube-scan-action@v4
with:
scannerVersion: 6.2.1.4610
scannerBinariesUrl: https://binaries.sonarsource.com/Distribution/sonar-scanner-cli
env:
SONAR_TOKEN: ***
Run ${GITHUB_ACTION_PATH}/scripts/sanity-checks.sh
${GITHUB_ACTION_PATH}/scripts/sanity-checks.sh
shell: /bin/bash --noprofile --norc -e -o pipefail {0}
env:
SONAR_TOKEN: ***
INPUT_PROJECTBASEDIR:
Run actions/cache@v4
with:
path: /Users/runner/work/_temp/sonar-scanner-cli-6.2.1.4610-macOS-ARM64
key: sonar-scanner-cli-6.2.1.4610-macOS-ARM64
enableCrossOsArchive: false
fail-on-cache-miss: false
lookup-only: false
save-always: false
env:
SONAR_TOKEN: ***
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1
Cache not found for input keys: sonar-scanner-cli-6.2.1.4610-macOS-ARM64
Run ${GITHUB_ACTION_PATH}/scripts/install-sonar-scanner-cli.sh
${GITHUB_ACTION_PATH}/scripts/install-sonar-scanner-cli.sh
shell: /bin/bash --noprofile --norc -e -o pipefail {0}
env:
SONAR_TOKEN: ***
INPUT_SCANNERVERSION: 6.2.1.4610
INPUT_SCANNERBINARIESURL: https://binaries.sonarsource.com/Distribution/sonar-scanner-cli
+ mkdir -p /Users/runner/work/_temp/sonarscanner
+ cd /Users/runner/work/_temp/sonarscanner
+ SCANNER_FILE_NAME=sonar-scanner-cli-6.2.1.4610-macosx-aarch64.zip
+ SCANNER_URI=https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-6.2.1.4610-macosx-aarch64.zip
+ command -v wget
+ wget --no-verbose --user-agent=sonarqube-scan-action https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-6.2.1.4610-macosx-aarch64.zip
2025-02-07 19:11:10 URL:https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-6.2.1.4610-macosx-aarch64.zip [48366622/48366622] -> "sonar-scanner-cli-6.2.1.4610-macosx-aarch64.zip" [1]
+ unzip -q -o sonar-scanner-cli-6.2.1.4610-macosx-aarch64.zip
+ SCANNER_UNZIP_FOLDER=sonar-scanner-6.2.1.4610-macosx-aarch64
+ SCANNER_LOCAL_FOLDER=/Users/runner/work/_temp/sonar-scanner-cli-6.2.1.4610-macOS-ARM64
+ '[' -d /Users/runner/work/_temp/sonar-scanner-cli-6.2.1.4610-macOS-ARM64 ']'
+ mv -f sonar-scanner-6.2.1.4610-macosx-aarch64 /Users/runner/work/_temp/sonar-scanner-cli-6.2.1.4610-macOS-ARM64
Run echo "${RUNNER_TEMP}/sonar-scanner-cli-6.2.1.4610-macOS-ARM64/bin" >> $GITHUB_PATH
echo "${RUNNER_TEMP}/sonar-scanner-cli-6.2.1.4610-macOS-ARM64/bin" >> $GITHUB_PATH
shell: /bin/bash --noprofile --norc -e -o pipefail {0}
env:
SONAR_TOKEN: ***
Run ${GITHUB_ACTION_PATH}/scripts/run-sonar-scanner-cli.sh
${GITHUB_ACTION_PATH}/scripts/run-sonar-scanner-cli.sh
shell: /bin/bash --noprofile --norc -e -o pipefail {0}
env:
SONAR_TOKEN: ***
INPUT_PROJECTBASEDIR:
SONAR_SCANNER_JRE: /Users/runner/work/_temp/sonar-scanner-cli-6.2.1.4610-macOS-ARM64/jre
/Users/runner/work/_actions/SonarSource/sonarqube-scan-action/v4/scripts/run-sonar-scanner-cli.sh: line 80: scanner_args[@]: unbound variable
Error: Process completed with exit code 1.
Hi,
Is this actually defined?
Thx,
Ann
Well the github repo manager said it was. I guess I’ll have to check with him on monday… But the first time I analysed the repo, I made it through SonarQube Cloud directly. So it wasnt using github actions.
Hi,
I ask because the error message indicates the underlying script wasn’t passed any arguments and because the docs say this:
Users have reported that when working with GitHub Actions reusable workflows, your
SONAR_TOKEN
is not intrinsically passed to the reusable workflow. Even though yourSONAR_TOKEN
is defined in the source repository, GitHub Actions will output theSONAR_TOKEN
value with asterisks (which make it look like it is working as expected), when in fact it is not reusing the value.When setting up your GitHub reusable workflow, we recommend using the GitHub feature secret: inherit to completely remove the intrinsic sending of your
SONAR_TOKEN
.
Ann
Hi,
I checked with the manager, and the token is set corectly.
I was able to use debug log from github, and got a more complete log, in there I was able to see that there was an error about not being able to check C and C++ code. As that wasn’t the scope of the project, I excluded them as the logs sugested with:
sonar.c.file.suffixes=-
sonar.cpp.file.suffixes=-
But when I tried again, it wasn’t able to finish the pipeline anyways… And when I try to run it now it keeps failing, the only catch is that when I run it with debug logs, it succeeds. Even though I’m grateful that it succeeds I can’t keep retrying with debug logs all the time, because it was supposed to be an automated process.
Thanks,
Tadashi