- ALM used: Azure DevOps
- CI system used Azure DevOps
- Scanner command used when applicable: SonarCloudAnalyze@1 for Azure pipelines
- Languages of the repository: Python
- Error observed
##[section]Starting: SC| Analize
==============================================================================
Task : Run Code Analysis
Description : Run scanner and upload the results to the SonarCloud server.
Version : 1.40.0
Author : sonarsource
Help : Version: 1.40.0. This task is not needed for Maven and Gradle projects since the scanner should be run as part of the build.
[More Information](https://docs.sonarcloud.io/advanced-setup/ci-based-analysis/sonarcloud-extension-for-azure-devops/)
==============================================================================
[command]/home/vsts/work/_tasks/SonarCloudAnalyze_xxxxx/1.40.0/sonar-scanner/bin/sonar-scanner
INFO: Scanner configuration file: /home/vsts/work/_tasks/SonarCloudAnalyze_xxxxx/1.40.0/sonar-scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: /home/vsts/work/1/s/MY_PROJECT/sonar-project.properties
INFO: SonarScanner 4.8.0.2856
INFO: Java 11.0.19 Eclipse Adoptium (64-bit)
INFO: Linux 5.15.0-1040-azure amd64
INFO: User cache: /home/vsts/.sonar/cache
INFO: Analyzing on SonarCloud
INFO: Default locale: "en", source code encoding: "UTF-8" (analysis is platform dependent)
INFO: Load global settings
INFO: Load global settings (done) | time=119ms
INFO: Server id: xxxx
INFO: User cache: /home/vsts/.sonar/cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=107ms
INFO: Load/download plugins (done) | time=22491ms
INFO: Loaded core extensions: developer-scanner
INFO: Found an active CI vendor: 'Azure DevOps'
INFO: Load project settings for component key: 'MY_PROJECT'
INFO: Load project settings for component key: 'MY_PROJECT' (done) | time=77ms
INFO: Process project properties
INFO: Execute project builders
INFO: Execute project builders (done) | time=1ms
INFO: Project key: MY_PROJECT
INFO: Base dir: /home/vsts/work/1/s/MY_PROJECT
2023-06-29T11:44:48.7397724Z INFO: Working dir: /home/vsts/work/1/s/MY_PROJECT/.scannerwork
INFO: Load project branches
INFO: Load project branches (done) | time=114ms
INFO: Check ALM binding of project 'MY_PROJECT'
INFO: Detected project binding: NOT_BOUND
INFO: Check ALM binding of project 'MY_PROJECT' (done) | time=91ms
INFO: Load project pull requests
INFO: Load project pull requests (done) | time=92ms
INFO: Load branch configuration
INFO: Load branch configuration (done) | time=1ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=188ms
INFO: Load active rules
INFO: Load active rules (done) | time=2573ms
INFO: Organization key: MY_ORGANIZATION_KEY
INFO: Branch name: MY_BRANCH_NAME, type: short-lived
INFO: Load project repositories
INFO: Load project repositories (done) | time=91ms
INFO: SCM collecting changed files in the branch
WARN: Could not find ref: main in refs/heads, refs/remotes/upstream or refs/remotes/origin
INFO: SCM collecting changed files in the branch (done) | time=52ms
INFO: Indexing files...
INFO: Project configuration:
INFO: Included sources: **/*.py
INFO: Excluded sources: **/build-wrapper-dump.json, **/*.txt, **/*.md, **/*.xlsx, **/*.xlsm
INFO: 8 files indexed
INFO: 0 files ignored because of inclusion/exclusion patterns
INFO: 2 files ignored because of scm ignore settings
INFO: Quality profile for py: Sonar way
INFO: ------------- Run sensors on module MY_PROJECT
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=92ms
INFO: Sensor cache enabled
INFO: Load sensor cache
INFO: Load sensor cache (15 KB) | time=504ms
INFO: Sensor C# Project Type Information [csharp]
INFO: Sensor C# Project Type Information [csharp] (done) | time=1ms
INFO: Sensor C# Analysis Log [csharp]
INFO: Sensor C# Analysis Log [csharp] (done) | time=12ms
INFO: Sensor C# Properties [csharp]
INFO: Sensor C# Properties [csharp] (done) | time=1ms
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=2ms
INFO: Sensor TextAndSecretsSensor [text]
INFO: 8 source files to be analyzed
INFO: 8/8 source files have been analyzed
INFO: Sensor TextAndSecretsSensor [text] (done) | time=48ms
INFO: Sensor VB.NET Project Type Information [vbnet]
INFO: Sensor VB.NET Project Type Information [vbnet] (done) | time=1ms
INFO: Sensor VB.NET Analysis Log [vbnet]
INFO: Sensor VB.NET Analysis Log [vbnet] (done) | time=13ms
INFO: Sensor VB.NET Properties [vbnet]
INFO: Sensor VB.NET Properties [vbnet] (done) | time=0ms
INFO: Sensor Python Sensor [python]
INFO: Starting global symbols computation
INFO: 6 source files to be analyzed
INFO: 6/6 source files have been analyzed
INFO: Starting rules execution
INFO: 8 source files to be analyzed
WARN: Unable to analyze file: mock_package/subpackage/module1_2.py
java.lang.IllegalArgumentException: No TypeShed symbol found for name: str
at org.sonar.python.types.TypeShed.typeShedClass(TypeShed.java:115)
at org.sonar.python.types.RuntimeType.getTypeClass(RuntimeType.java:142)
at org.sonar.python.types.RuntimeType.runtimeTypeSymbol(RuntimeType.java:150)
at com.sonarsource.dbd.frontend.python.A.A.A(na:500)
at com.sonarsource.dbd.frontend.python.A.A.A(na:3035)
at com.sonarsource.dbd.frontend.python.A.B.F.A(na:372)
at com.sonarsource.dbd.frontend.python.A.E.A(na:518)
at com.sonarsource.dbd.frontend.python.A.B.A.A(na:2240)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
at com.sonarsource.dbd.frontend.python.A.B.A.A(na:2808)
at com.sonarsource.dbd.frontend.python.A.B.A.A(na:1741)
at com.sonarsource.dbd.frontend.python.A.B.A.A(na:3294)
at com.sonarsource.dbd.frontend.python.A.E.A(na:518)
at com.sonarsource.dbd.frontend.python.A.A.L.A(na:1412)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at com.sonarsource.dbd.frontend.python.A.A.L.A(na:1412)
at com.sonarsource.dbd.frontend.python.A.E.A(na:1540)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at com.sonarsource.dbd.frontend.python.A.A.P.C(na:1825)
at com.sonarsource.dbd.frontend.python.A.A.P.B(na:3208)
at com.sonarsource.dbd.frontend.python.A.visitFunctionDef(na:1123)
at org.sonar.python.tree.FunctionDefImpl.accept(FunctionDefImpl.java:166)
at org.sonar.plugins.python.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:33)
at org.sonar.plugins.python.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:40)
at org.sonar.plugins.python.api.tree.BaseTreeVisitor.visitStatementList(BaseTreeVisitor.java:52)
at org.sonar.python.tree.StatementListImpl.accept(StatementListImpl.java:46)
at org.sonar.plugins.python.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:33)
at org.sonar.plugins.python.api.tree.BaseTreeVisitor.visitFileInput(BaseTreeVisitor.java:47)
at com.sonarsource.dbd.frontend.python.A.scanFile(na:866)
at com.sonarsource.dbd.frontend.python.rules.A.scanFile(na:615)
at org.sonar.plugins.python.PythonScanner.scanFile(PythonScanner.java:136)
at org.sonar.plugins.python.Scanner.execute(Scanner.java:59)
at org.sonar.plugins.python.PythonSensor.execute(PythonSensor.java:118)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:62)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:75)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:48)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:66)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:48)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:64)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:470)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:466)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:422)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:130)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:57)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:51)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
at org.sonarsource.scanner.cli.Main.execute(Main.java:126)
at org.sonarsource.scanner.cli.Main.execute(Main.java:81)
at org.sonarsource.scanner.cli.Main.main(Main.java:62)
# finally it keeps doing so for each analysed file
this above is just a piece, but it actually keeps returning the same error for every file parsed.
We got the first report this morning at 08 UTC.
- Steps to reproduce: Just launch an Analysis in pipeline
- Potential workaround: No found so far
Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!