# WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succedeed?

**URL:** <https://community.sonarsource.com/t/warn-unable-to-locate-report-task-txt-in-the-workspace-did-the-sonarscanner-succedeed/8472>\
**Category:** SonarQube Cloud\
**Tags:** sonarqube\
**Created:** [April 4, 2019, 9:13am UTC](https://community.sonarsource.com/t/warn-unable-to-locate-report-task-txt-in-the-workspace-did-the-sonarscanner-succedeed/8472 "2019-04-04T09:13:01Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rajaneesh\_k](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/rajaneesh_k/32/4657_2.png) [@Rajaneesh\_k](https://community.sonarsource.com/u/Rajaneesh_k)\
**Post date:** [April 4, 2019, 9:13am UTC](https://community.sonarsource.com/t/warn-unable-to-locate-report-task-txt-in-the-workspace-did-the-sonarscanner-succedeed/8472/1 "2019-04-04T09:13:01Z")

</div>

ERROR: Error during SonarQube Scanner execution  
ERROR: Insufficient privileges  
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.

WARN: Unable to locate ‘report-task.txt’ in the workspace. Did the SonarScanner succedeed?  
ERROR: SonarQube scanner exited with non-zero code: 1

Finished: FAILURE

---

<div class="post-metadata">

**Author:** ![Scott](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/scott/32/3175_2.png) [@Scott](https://community.sonarsource.com/u/Scott)\
**Post date:** [April 4, 2019, 11:22am UTC](https://community.sonarsource.com/t/warn-unable-to-locate-report-task-txt-in-the-workspace-did-the-sonarscanner-succedeed/8472/2 "2019-04-04T11:22:05Z")

</div>

**ERROR: Insufficient privileges**

With that amount of explication, this is the only help we can give you.

You checked if you’re passing the `sonar.login` property correctly? Are you using `sonar-scanner`, `SonarScanner.MSBuild` or what?

---

<div class="post-metadata">

**Author:** ![Rajaneesh\_k](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/rajaneesh_k/32/4657_2.png) [@Rajaneesh\_k](https://community.sonarsource.com/u/Rajaneesh_k)\
**Post date:** [April 4, 2019, 4:05pm UTC](https://community.sonarsource.com/t/warn-unable-to-locate-report-task-txt-in-the-workspace-did-the-sonarscanner-succedeed/8472/3 "2019-04-04T16:05:34Z")

</div>

We are using Sonar-scanner which we have configured in Jenkins global tool configuration.

---

<div class="post-metadata">

**Author:** ![Scott](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/scott/32/3175_2.png) [@Scott](https://community.sonarsource.com/u/Scott)\
**Post date:** [April 4, 2019, 4:06pm UTC](https://community.sonarsource.com/t/warn-unable-to-locate-report-task-txt-in-the-workspace-did-the-sonarscanner-succedeed/8472/4 "2019-04-04T16:06:56Z")

</div>

I bet that the value of sonar.login is wrong.

---

<div class="post-metadata">

**Author:** ![Rajaneesh\_k](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/rajaneesh_k/32/4657_2.png) [@Rajaneesh\_k](https://community.sonarsource.com/u/Rajaneesh_k)\
**Post date:** [April 4, 2019, 4:07pm UTC](https://community.sonarsource.com/t/warn-unable-to-locate-report-task-txt-in-the-workspace-did-the-sonarscanner-succedeed/8472/5 "2019-04-04T16:07:53Z")

</div>

I will check on that and get back to you.

Thanks

---

<div class="post-metadata">

**Author:** ![Rajaneesh\_k](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/rajaneesh_k/32/4657_2.png) [@Rajaneesh\_k](https://community.sonarsource.com/u/Rajaneesh_k)\
**Post date:** [April 5, 2019, 6:51am UTC](https://community.sonarsource.com/t/warn-unable-to-locate-report-task-txt-in-the-workspace-did-the-sonarscanner-succedeed/8472/6 "2019-04-05T06:51:59Z")

</div>

for Sonar.login a token is provided but it is throwing same error

Analysis report generated in 3772ms, dir size=5 MB  
INFO: Analysis reports compressed in 3992ms, zip size=2 MB  
INFO: ------------------------------------------------------------------------  
INFO: EXECUTION FAILURE  
INFO: ------------------------------------------------------------------------  
INFO: Total time: 3:45.270s  
INFO: Final Memory: 53M/1616M INFO: ------------------------------------------------------------------------  
ERROR: Error during SonarQube Scanner execution  
ERROR: Insufficient privileges  
ERROR: ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.  
WARN: Unable to locate ‘report-task.txt’ in the workspace. Did the SonarScanner succedeed?  
ERROR: SonarQube scanner exited with non-zero code: 1  
Finished: FAILURE

---

<div class="post-metadata">

**Author:** ![anon67236913](https://avatars.discourse-cdn.com/v4/letter/a/c37758/32.png) [@anon67236913](https://community.sonarsource.com/u/anon67236913)\
**Post date:** [April 5, 2019, 7:35am UTC](https://community.sonarsource.com/t/warn-unable-to-locate-report-task-txt-in-the-workspace-did-the-sonarscanner-succedeed/8472/7 "2019-04-05T07:35:39Z")

</div>

Hi,

‘Insufficient privileges’  
Check the global permissions [https://yoursonarhost/admin/permissions](https://yoursonarhost/admin/permissions), the user needs ‘Execute Analysis’ and ‘Create Projects’ (if initial scan) permission. Our Jenkins user is in the admin group and has all permissions.

Regards,  
Gilbert

---

<div class="post-metadata">

**Author:** ![Rajaneesh\_k](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/rajaneesh_k/32/4657_2.png) [@Rajaneesh\_k](https://community.sonarsource.com/u/Rajaneesh_k)\
**Post date:** [June 17, 2019, 5:19pm UTC](https://community.sonarsource.com/t/warn-unable-to-locate-report-task-txt-in-the-workspace-did-the-sonarscanner-succedeed/8472/8 "2019-06-17T17:19:17Z")

</div>

Error during SonarQube Scanner execution  
ERROR: Could not find branches. A regular analysis is required before creating branches.

Can you please help on this.

---

<div class="post-metadata">

**Author:** ![janos](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/janos/32/60_2.png) [@janos](https://community.sonarsource.com/u/janos)\
**Post date:** [June 18, 2019, 5:26am UTC](https://community.sonarsource.com/t/warn-unable-to-locate-report-task-txt-in-the-workspace-did-the-sonarscanner-succedeed/8472/9 "2019-06-18T05:26:41Z")

</div>

> [@Rajaneesh\_k](#):
>
> ERROR: Could not find branches. A regular analysis is required before creating branches.

Before analyzing a feature branch or pull request, do an analysis of the master branch.

---

<div class="post-metadata">

**Author:** ![anon67236913](https://avatars.discourse-cdn.com/v4/letter/a/c37758/32.png) [@anon67236913](https://community.sonarsource.com/u/anon67236913)\
**Post date:** [June 18, 2019, 7:53am UTC](https://community.sonarsource.com/t/warn-unable-to-locate-report-task-txt-in-the-workspace-did-the-sonarscanner-succedeed/8472/10 "2019-06-18T07:53:51Z")

</div>

Hi @janos,

this will - hopefully soon - be fixed with [https://jira.sonarsource.com/browse/SONAR-11155](https://jira.sonarsource.com/browse/SONAR-11155) !?  
One of the most annoying gotchas since the introduction of the branching feature ☹

Gilbert

---

<div class="post-metadata">

**Author:** ![Lohita\_Kolli](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/lohita_kolli/32/5130_2.png) [@Lohita\_Kolli](https://community.sonarsource.com/u/Lohita_Kolli)\
**Post date:** [July 13, 2019, 3:24pm UTC](https://community.sonarsource.com/t/warn-unable-to-locate-report-task-txt-in-the-workspace-did-the-sonarscanner-succedeed/8472/11 "2019-07-13T15:24:34Z")

</div>

I am getting error like this:

```auto
INFO: Scanner configuration file: /opt/sonar_scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarQube Scanner 3.2.0.1227
INFO: Java 1.8.0_121 Oracle Corporation (64-bit)
INFO: Linux 3.10.0-957.21.3.el7.x86_64 amd64
INFO: User cache: /var/lib/jenkins/.sonar/cache
INFO: SonarQube server 6.4.0
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Load global settings
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 0.789s
INFO: Final Memory: 8M/224M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
ERROR: Not authorized. Please check the properties sonar.login and sonar.password.
ERROR: 
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succeeded?
ERROR: SonarQube scanner exited with non-zero code: 1
Finished: FAILURE

```

Analysis properties:

```auto
# must be unique in a given SonarQube instance
sonar.projectKey=my project

# --- optional properties ---

# defaults to project key
sonar.projectName=My project
# defaults to 'not provided'
sonar.projectVersion=1.0
 
# Path is relative to the sonar-project.properties file. Defaults to .
sonar.sources=.
 
# Encoding of the source code. Default is default system encoding
sonar.sourceEncoding=UTF-8

```

---

<div class="post-metadata">

**Author:** ![alian](https://avatars.discourse-cdn.com/v4/letter/a/57b2e6/32.png) [@alian](https://community.sonarsource.com/u/alian)\
**Post date:** [March 25, 2020, 8:24am UTC](https://community.sonarsource.com/t/warn-unable-to-locate-report-task-txt-in-the-workspace-did-the-sonarscanner-succedeed/8472/12 "2020-03-25T08:24:11Z")

</div>

i have Solve the problem，jenkins Prepare SonarQube Scanner environment must true

---

<div class="post-metadata">

**Author:** ![linl12138](https://avatars.discourse-cdn.com/v4/letter/l/d78d45/32.png) [@linl12138](https://community.sonarsource.com/u/linl12138)\
**Post date:** [October 30, 2020, 3:09am UTC](https://community.sonarsource.com/t/warn-unable-to-locate-report-task-txt-in-the-workspace-did-the-sonarscanner-succedeed/8472/13 "2020-10-30T03:09:07Z")

</div>

This problem may be caused by “Analysis properties”，you need set it first

---

<div class="post-metadata">

**Author:** ![Premkumar\_Mani](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/premkumar_mani/32/16522_2.png) [@Premkumar\_Mani](https://community.sonarsource.com/u/Premkumar_Mani)\
**Post date:** [November 1, 2020, 8:19pm UTC](https://community.sonarsource.com/t/warn-unable-to-locate-report-task-txt-in-the-workspace-did-the-sonarscanner-succedeed/8472/14 "2020-11-01T20:19:34Z")

</div>

I am also facing the same problem, can you please guide to me to resolve.

---

<div class="post-metadata">

**Author:** ![janos](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/janos/32/60_2.png) [@janos](https://community.sonarsource.com/u/janos)\
**Post date:** [November 25, 2020, 4:22pm UTC](https://community.sonarsource.com/t/warn-unable-to-locate-report-task-txt-in-the-workspace-did-the-sonarscanner-succedeed/8472/17 "2020-11-25T16:22:07Z")

</div>

> [@Lohita\_Kolli](#):
>
> ```auto
> ERROR: Not authorized. Please check the properties sonar.login and sonar.password.
> 
> ```

As the error message says, make sure to configure the `sonar.login` and `sonar.password` properties.

Our [documentation page for Jenkins](https://sonarcloud.io/documentation/analysis/scan/sonarscanner-for-jenkins/) explains how to configure credentials.

---

<div class="post-metadata">

**Author:** ![green](https://avatars.discourse-cdn.com/v4/letter/g/54ee81/32.png) [@green](https://community.sonarsource.com/u/green)\
**Post date:** [October 5, 2021, 6:47am UTC](https://community.sonarsource.com/t/warn-unable-to-locate-report-task-txt-in-the-workspace-did-the-sonarscanner-succedeed/8472/19 "2021-10-05T06:47:09Z")

</div>

What does this mean? Where did you set it?
