404 Not found Error


(Andrew Langford) #1

While running sonar scanner during our appveyor build on various projects we are starting to get a 404 error while the sonar scanner is calling the sonar cloud endpoints.

below is the logs of the sonar scanner

SonarScanner for MSBuild 4.3.1
Using the .NET Framework version of the Scanner for MSBuild
Default properties file was found at C:\ProgramData\chocolatey\lib\sonarscanner-msbuild-net46\tools\SonarQube.Analysis.xml
Loading analysis properties from C:\ProgramData\chocolatey\lib\sonarscanner-msbuild-net46\tools\SonarQube.Analysis.xml
Post-processing started.
SONAR_SCANNER_OPTS is not configured. Setting it to the default value of -Xmx1024m
Calling the SonarQube Scanner...
INFO: Scanner configuration file: C:\ProgramData\chocolatey\lib\sonarscanner-msbuild-net46\tools\sonar-scanner-3.2.0.1227\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: C:\sources\.sonarqube\out\sonar-project.properties
INFO: SonarQube Scanner 3.2.0.1227
INFO: Java 1.8.0_162 Oracle Corporation (64-bit)
INFO: Windows Server 2016 10.0 amd64
INFO: SONAR_SCANNER_OPTS=-Xmx1024m
INFO: User cache: C:\Users\appveyor\.sonar\cache
INFO: SonarQube server 7.6.0
INFO: Default locale: "en_US", source code encoding: "windows-1252" (analysis is platform dependent)
INFO: Issues mode
WARNING: WARN: The use of the issues mode (sonar.analysis.mode=issues) is deprecated. This mode will be dropped in the future.
INFO: Load global settings
INFO: Load global settings (done) | time=1028ms
INFO: Server id: xxxxxx
INFO: User cache: C:\Users\appveyor\.sonar\cache
INFO: Exclude plugins: devcockpit, ldap, authgithub, authbitbucket, pdfreport, authaad, googleanalytics, governance
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=260ms
INFO: Load/download plugins (done) | time=43379ms
INFO: Loaded core extensions: branch-scanner
INFO: Process project properties
INFO: Execute project builders
INFO: Execute project builders (done) | time=86ms
WARNING: WARN: Failed to set working directory hidden: C:\sources\.sonarqube\out\.sonar
INFO: Project key: Cricut.Tasks.FontProcessing
INFO: Base dir: C:\sources\Cricut.Tasks.FontProcessing
INFO: Working dir: C:\sources\.sonarqube\out\.sonar
WARNING: WARN: Failed to set working directory hidden: C:\sources\.sonarqube\out\.sonar\Cricut.Tasks.FontProcessing_Cricut.Tasks.FontProcessing_xxxxxx
INFO: Load project settings
INFO: Load project settings (done) | time=192ms
INFO: Load project branches
INFO: Load project branches (done) | time=183ms
INFO: Load project pull requests
INFO: Load project pull requests (done) | time=181ms
INFO: Load branch configuration
INFO: Load branch configuration (done) | time=6ms
INFO: Load project repositories
INFO: Load project repositories (done) | time=269ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=204ms
INFO: Load active rules
INFO: Load active rules (done) | time=5082ms
INFO: Organization key: cricutsonarcloud
WARNING: WARN: Property 'sonar.abap.file.suffixes' is not declared as multi-values/property set but was read using 'getStringArray' method. The SonarQube plugin declaring this property should be updated.
INFO: Indexing files...
INFO: Project configuration:
INFO: Indexing files of module 'Cricut.Tasks.FontProcessing'
INFO:   Base dir: C:\sources\Cricut.Tasks.FontProcessing
INFO:   Source paths: Config/ConfigurationManager.cs, Program.cs, Properties/Assemb...
INFO: Indexing files of module 'Cricut.Tasks.FontProcessing'
INFO:   Base dir: C:\sources\Cricut.Tasks.FontProcessing
INFO: 11 files indexed
INFO: Quality profile for cs: Cricut Way
INFO: ------------- Run sensors on module Cricut.Tasks.FontProcessing
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=192ms
INFO: Sensor C# Properties [csharp]
INFO: Sensor C# Properties [csharp] (done) | time=19ms
INFO: Sensor JavaXmlSensor [java]
INFO: Sensor JavaXmlSensor [java] (done) | time=1ms
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=22ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=5ms
INFO: ------------- Run sensors on module Cricut.Tasks.FontProcessing
INFO: Sensor JavaXmlSensor [java]
INFO: Sensor JavaXmlSensor [java] (done) | time=0ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=1ms
INFO: Sensor C# [csharp]
INFO: Importing results from 6 proto files in 'C:\sources\.sonarqube\out\0\output-cs'
INFO: Importing 1 Roslyn report
INFO: Sensor C# [csharp] (done) | time=774ms
INFO: Sensor JavaSecuritySensor [security]
INFO: Reading UCFGs from: C:\sources\.sonarqube\out\.sonar\ucfg2\java
INFO: 20:46:35.624 Building Type propagation graph
INFO: 20:46:35.643 Running Tarjan on 0 nodes
INFO: 20:46:35.645 Tarjan found 0 components
INFO: 20:46:35.645 Variable type analysis: done
INFO: UCFGs: 0, excluded: 0, source entrypoints: 0
INFO: No UCFGs have been included for analysis.
INFO: Sensor JavaSecuritySensor [security] (done) | time=31ms
INFO: Sensor CSharpSecuritySensor [security]
INFO: Reading UCFGs from: C:\sources\.sonarqube\out\ucfg_cs2
INFO: 20:46:35.895 Building Type propagation graph
INFO: 20:46:35.92 Running Tarjan on 149 nodes
INFO: 20:46:35.926 Tarjan found 149 components
INFO: 20:46:35.929 Variable type analysis: done
INFO: UCFGs: 33, excluded: 33, source entrypoints: 0
INFO: No UCFGs have been included for analysis.
INFO: Sensor CSharpSecuritySensor [security] (done) | time=310ms
INFO: ------------- Run sensors on project
INFO: No SCM system was detected. You can use the 'sonar.scm.provider' property to explicitly specify it.
INFO: Load server issues
INFO: Load server issues (done) | time=944ms
INFO: Performing issue tracking
INFO: 0/13 components tracked
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 1:13.089s
INFO: Final Memory: 32M/363M
INFO: ------------------------------------------------------------------------
SonarScanner.MSBuild.exe : ERROR: Error during SonarQube Scanner execution
At line:1 char:1
+ SonarScanner.MSBuild.exe end /d:sonar.login='xxxxxxxxxxx ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (ERROR: Error du...anner execution:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
ERROR: Error 404 on https://sonarcloud.io/api/sources/hash?key=project%2FAssemblyInfo.cs : {"errors":[{"msg":"Component key 'project/AssemblyInfo.cs' not found"}]}
ERROR: 

The SonarQube Scanner did not complete successfully

20:46:37.878  Creating a summary markdown file...
20:46:37.88  Post-processing failed. Exit code: 1

but when going to that project the file exists


(Julien Henry) #2

Hi @alangford

I see you are using the issues/preview mode. Is it intentional? This feature is deprecated for a long time and will be removed very soon.

In any case, in a recent deployment we made some changes to the database model that requires a “normal” analysis to be executed, before being able to use the preview mode again. Can you try to run a normal analysis, and then tell me if you still have your issue in preview/issues mode?