Issue during Complete SonarQube Analysis step in TFS build definition

743 views
Skip to first unread message

dorai...@gmail.com

unread,
Jul 12, 2017, 5:06:48 AM7/12/17
to SonarQube
We are using Github as the code repository for one of the project, created the TFS build definition for that project and added the SonarQube begin and end analysis steps in the build.

Begin analysis is successful whereas the complete analysis fails every time. Below is the error that we are getting,

2017-07-11T10:44:16.5882998Z ##[error]ERROR: Error during SonarQube Scanner execution
2017-07-11T10:44:16.5882998Z ##[error]java.lang.NullPointerException
.
.
2017-07-11T10:44:16.5882998Z ##[error]ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
2017-07-11T10:44:16.5882998Z ##[error]The SonarQube Scanner did not complete successfully
2017-07-11T10:44:16.5882998Z 12:44:16.572  Creating a summary markdown file...
2017-07-11T10:44:16.5882998Z ##[error]12:44:16.572  Post-processing failed. Exit code: 1
2017-07-11T10:44:16.5882998Z ##[error]System.Exception: Unexpected exit code received from batch file: 1
2017-07-11T10:44:16.8070479Z ##[error]System.Management.Automation.RuntimeException: Cannot determine if the analysis has finished. Possible cause: your SonarQube server version is lower than 5.3 - for more details see https://go.microsoft.com/fwlink/?LinkId=722407 ---> System.Management.Automation.RuntimeException: Cannot determine if the analysis has finished. Possible cause: your SonarQube server version is lower than 5.3 - for more details see https://go.microsoft.com/fwlink/?LinkId=722407

Even though we have all the latest versions installed in the server, getting the error.

Below are the configurations used in TFS server:

TFS - 2015
Visual Studio  version - latest/2017
MSBuild architecture - MSBuild x86
MSBuild version - latest/MSBuid 15.0
SonarQube scanner for MSBuild - 2.1.2 version

Can someone help me in resolving this issue?

G. Ann Campbell

unread,
Jul 12, 2017, 5:38:49 AM7/12/17
to SonarQube
Hi,

First, please be aware that the standard courtesies (Hi, Thanks, ...) are appreciated in this group.

The error message you're getting cites as a possible cause a too-low version of the SonarQube server. What version of SonarQube are you running?


Ann

Dorai Pandi

unread,
Jul 12, 2017, 6:49:41 AM7/12/17
to SonarQube
Hello Ann,

I had typed it in notepad and pasted it over here, while copying I missed it. Sorry for that.

We are using SonarQube 5.6 version in the server.

Attached the log file of the build for your reference.

Thanks and Regards,
Dorai Pandi.P
logs_736302.zip

Julien HENRY

unread,
Jul 12, 2017, 7:45:32 AM7/12/17
to SonarQube
Hi,

The error occurs while parsing the Roslyn report of your "Management" project. Could you please give us the version of the SonarC# plugin installed on your SonarQube server?

Also, it would be great for us if you could share the roslyn report (should be located in location like: <your solution>/Management/bin/Debug/Management.dll.RoslynCA.json). You can send me the report privately if needed.

++

Julien

Dorai Pandi

unread,
Jul 14, 2017, 12:38:46 AM7/14/17
to SonarQube
Hello Julien,

Greetings of the day.

I am waiting input from the team responsible for this, once I get the required details will share it with you.

Regards,
Dorai Pandi.P

Dorai Pandi

unread,
Jul 14, 2017, 5:55:44 AM7/14/17
to SonarQube, do...@danskeit.co.in
Julien,

SonarC# 5.3.1 is the version installed in sonarqube server.

Regards,
Dorai Pandi.P

On Wednesday, 12 July 2017 17:15:32 UTC+5:30, Julien HENRY wrote:

Dorai Pandi

unread,
Jul 17, 2017, 5:58:17 AM7/17/17
to SonarQube, do...@danskeit.co.in
Hi Julien,

Greetings of the day.

There are build errors due to which I am not able to get the <your solution>/Management/bin/Debug/Management.dll.RoslynCA.json.

Would that help if I provide you the bin/release/Management.exe.RoslynCA.json?.

AlsoI have to check with my manager/lead about sharing the details.

Regards,
Dorai Pandi. P

sunil...@gmail.com

unread,
Oct 11, 2017, 9:33:03 AM10/11/17
to SonarQube

Hi Ann,


I am also facing the similar issue.I am trying to integrate VSTS with SonarQube Server.Begin Analysis Task completed successfully but on End Analysis it is showing me this error.I have checked and my Sonarqube server is greater than 5.3.Can you help me to resolve this issue.I am not sure whether we have installed SonarC# on SonarQube Server.


System.Exception: Unexpected exit code received from batch file: 1

System.Management.Automation.RuntimeException: Cannot determine if the analysis has finished. Possible cause: your SonarQube server version is lower than 5.3 - for more details see https://go.microsoft.com/fwlink/?LinkId=722407 ---> System.Management.Automation.RuntimeException: Cannot determine if the analysis has finished. Possible cause: your SonarQube server version is lower than 5.3 - for more details see https://go.microsoft.com/fwlink/?LinkId=722407


On Wednesday, 12 July 2017 15:08:49 UTC+5:30, G. Ann Campbell wrote:

G. Ann Campbell

unread,
Oct 11, 2017, 12:03:09 PM10/11/17
to sunil...@gmail.com, SonarQube
Hi,

I believe the error message includes instructions on turning on debug logging...?


Ann



---
G. Ann Campbell | SonarSource
Product Manager
@GAnnCampbell

--
You received this message because you are subscribed to a topic in the Google Groups "SonarQube" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarqube/FcOOnzEj8jQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/68fe9342-0065-4ac7-9da8-654b2496b64f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

sunil kumar

unread,
Oct 11, 2017, 11:37:06 PM10/11/17
to G. Ann Campbell, SonarQube
I am sorry ,i am not getting you.could you please eleborarte how i can solve this issue.

G. Ann Campbell

unread,
Oct 12, 2017, 7:25:54 AM10/12/17
to sunil kumar, SonarQube
Hi,

Try turning on debug logging in your analysis to get more information about the problem.


Ann



---
G. Ann Campbell | SonarSource
Product Manager
@GAnnCampbell

Reply all
Reply to author
Forward
0 new messages