Error 'WARN: Could not find ref: Develop in refs/heads or refs/remotes/origin' after updating to 7.6


(David Rodriguez) #1

After upgrading to SonarQube Develop 7.6 our SonarScanner runs in Jenkins no longer calculate code coverage. When looking at the Jenkins build logs I see the following new warning message, which I assume is related:

WARN: Could not find ref: Develop in refs/heads or refs/remotes/origin

These are the current versions of tools we are using.

  • SonarQube Developer Edition 7.6
  • SonarQube Scanner for Jenkins 2.8.1
  • SonarQube Scanner

(G Ann Campbell) #2


I think the log line you’re reporting is unrelated to the (apparent) main complaint about code coverage. To be clear, SonarQube hasn’t calculated coverage for a very long time, and then only for Java. The log warning you cite sounds like it’s SCM-related.


(Janos Gyerik) #3

As Ann said, the missing coverage and the warning looks unrelated.

This warning can happen during the analysis of a pull request. The consequence is that new code in the pull request may not be computed correctly. The resolution is to fetch the target branch before running analysis, for example git fetch origin Develop.

(David Rodriguez) #4

Thanks for the response and apologies for the confusion on the code coverage calculation. I will try the ‘fetch’ resolution and update if it works. I assumed it was related to SonarQube upgrade to 7.6 since the PR analysis worked before and that was our only environmental change.