# Build wrapper dump json file is found empty

**URL:** <https://community.sonarsource.com/t/build-wrapper-dump-json-file-is-found-empty/14770>\
**Category:** SonarQube Server / Community Build\
**Tags:** cfamily, sonarqube, scanner, sonarqube-cloud\
**Created:** [September 26, 2019, 1:20pm UTC](https://community.sonarsource.com/t/build-wrapper-dump-json-file-is-found-empty/14770 "2019-09-26T13:20:53Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Play9win](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/play9win/32/7721_2.png) [@Play9win](https://community.sonarsource.com/u/Play9win)\
**Post date:** [September 26, 2019, 1:20pm UTC](https://community.sonarsource.com/t/build-wrapper-dump-json-file-is-found-empty/14770/1 "2019-09-26T13:20:53Z")

</div>

I am trying my ios build with build wrapper for objective C but getting an error :  
java.lang.IllegalStateException: The “build-wrapper-dump.json” file was found empty. Please make sure that:

3327 \* you are using the latest version of the build-wrapper and the SonarCFamily analyzer

3328 \* your compiler is supported

3329 \* you are wrapping your build correctly

3330 \* you are wrapping a full/clean build

Can you guide me what I am doing wrong here ? This objective C code analysis on sonar has already taken so much of our time. Really appreciate your help.

Version of the scanner is 4.0… and build wrapper is directly taken from the sonar cloud. So ideally , there should not be any problem.  
Must-share information (formatted with [Markdown](https://commonmark.org/help/)):

- which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
- what are you trying to achieve
- what have you tried so far to achieve this

---

<div class="post-metadata">

**Author:** ![mpaladin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mpaladin/32/118_2.png) [@mpaladin](https://community.sonarsource.com/u/mpaladin)\
**Post date:** [September 26, 2019, 1:27pm UTC](https://community.sonarsource.com/t/build-wrapper-dump-json-file-is-found-empty/14770/2 "2019-09-26T13:27:21Z")

</div>

Hi @Play9win,

> [@Play9win](#):
>
> Can you guide me what I am doing wrong here ? This objective C code analysis on sonar has already taken so much of our time. Really appreciate your help.

sorry to hear that, unfortunately, the same way as this other post of yours ([java.lang.IllegalStateException: java.nio.file.NoSuchFileException: /Users/travis/build/[secure]/.../bw\_output/build-wrapper-dump.json](https://community.sonarsource.com/t/java-lang-illegalstateexception-java-nio-file-nosuchfileexception-users-travis-build-secure-bw-output-build-wrapper-dump-json/14526)), if you don’t provide any detail it is not easy to help you.

Please check this post [ERROR: Error during SonarQube Scanner execution (java.lang.IllegalStateException: The "build-wrapper-dump.json" file was found but 0 C/C++/Objective-C files were analyzed.)](https://community.sonarsource.com/t/error-error-during-sonarqube-scanner-execution-java-lang-illegalstateexception-the-build-wrapper-dump-json-file-was-found-but-0-c-c-objective-c-files-were-analyzed/14718), it seems like that you are not correctly setting up the wrapping of your build.

---

<div class="post-metadata">

**Author:** ![Play9win](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/play9win/32/7721_2.png) [@Play9win](https://community.sonarsource.com/u/Play9win)\
**Post date:** [September 26, 2019, 2:51pm UTC](https://community.sonarsource.com/t/build-wrapper-dump-json-file-is-found-empty/14770/3 "2019-09-26T14:51:22Z")

</div>

Thanks for replying and sorry about that.

I am building on travis Ci and this is the script I am using for build wrapper:

mkdir /scanner

mkdir /bw

sudo wget [https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.0.0.1744-macosx.zip](https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.0.0.1744-macosx.zip)

sudo unzip sonar-scanner-cli-4.0.0.1744-macosx.zip -d /scanner

sudo wget [https://sonarcloud.io/static/cpp/build-wrapper-macosx-x86.zip](https://sonarcloud.io/static/cpp/build-wrapper-macosx-x86.zip)

sudo unzip build-wrapper-macosx-x86.zip -d /bw

/bw/build-wrapper-macosx-x86/build-wrapper-macosx-x86 --out-dir bw\_output xcodebuild build

---

<div class="post-metadata">

**Author:** ![Play9win](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/play9win/32/7721_2.png) [@Play9win](https://community.sonarsource.com/u/Play9win)\
**Post date:** [September 26, 2019, 2:51pm UTC](https://community.sonarsource.com/t/build-wrapper-dump-json-file-is-found-empty/14770/4 "2019-09-26T14:51:51Z")

</div>

Please revert asap. Will be really grateful.

---

<div class="post-metadata">

**Author:** ![mpaladin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mpaladin/32/118_2.png) [@mpaladin](https://community.sonarsource.com/u/mpaladin)\
**Post date:** [September 26, 2019, 3:26pm UTC](https://community.sonarsource.com/t/build-wrapper-dump-json-file-is-found-empty/14770/5 "2019-09-26T15:26:12Z")

</div>

> [@Play9win](#):
>
> /bw/build-wrapper-macosx-x86/build-wrapper-macosx-x86 --out-dir bw\_output xcodebuild build

Do you have any sort of build cache? Could you run `xcodebuild clean build` instead? Are you sure at least an Objective-C file gets compiled?

> [@Play9win](#):
>
> Please revert asap. Will be really grateful.

Revert what sorry?

---

<div class="post-metadata">

**Author:** ![mpaladin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mpaladin/32/118_2.png) [@mpaladin](https://community.sonarsource.com/u/mpaladin)\
**Post date:** [September 27, 2019, 7:15am UTC](https://community.sonarsource.com/t/build-wrapper-dump-json-file-is-found-empty/14770/6 "2019-09-27T07:15:51Z")

</div>

Split this topic on September 27, 2019, 7:15am UTC

A post was split to a new topic: [Empty build-wrapper-dump.json on Azure DevOps](https://community.sonarsource.com/t/empty-build-wrapper-dump-json-on-azure-devops/14801)

---

<div class="post-metadata">

**Author:** ![Play9win](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/play9win/32/7721_2.png) [@Play9win](https://community.sonarsource.com/u/Play9win)\
**Post date:** [September 27, 2019, 2:53am UTC](https://community.sonarsource.com/t/build-wrapper-dump-json-file-is-found-empty/14770/7 "2019-09-27T02:53:07Z")

</div>

Ran xcodebuild clean build. Still getting the same error. Json file is empty.

---

<div class="post-metadata">

**Author:** ![Play9win](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/play9win/32/7721_2.png) [@Play9win](https://community.sonarsource.com/u/Play9win)\
**Post date:** [September 27, 2019, 2:55am UTC](https://community.sonarsource.com/t/build-wrapper-dump-json-file-is-found-empty/14770/8 "2019-09-27T02:55:06Z")

</div>

Please be informed that this is also what I am getting :

 ![image.png](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/2X/1/132774c554261d0724bb3ca3def12da8c88250d0.png)

---

<div class="post-metadata">

**Author:** ![mpaladin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mpaladin/32/118_2.png) [@mpaladin](https://community.sonarsource.com/u/mpaladin)\
**Post date:** [September 27, 2019, 7:15am UTC](https://community.sonarsource.com/t/build-wrapper-dump-json-file-is-found-empty/14770/9 "2019-09-27T07:15:00Z")

</div>

Hi @Play9win,

> [@Play9win](#):
>
> ![image.png](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/2X/1/132774c554261d0724bb3ca3def12da8c88250d0.png)
> 
> image.png1298×194 16.2 KB

In your screenshot I can see:

```auto
xcodebuild: error: The directory ... does not contain an Xcode project

```

You should looking at having a successful xcode build.

---

<div class="post-metadata">

**Author:** ![Play9win](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/play9win/32/7721_2.png) [@Play9win](https://community.sonarsource.com/u/Play9win)\
**Post date:** [September 27, 2019, 7:37am UTC](https://community.sonarsource.com/t/build-wrapper-dump-json-file-is-found-empty/14770/10 "2019-09-27T07:37:34Z")

</div>

Done that the build is now failing because of :

error: No profile for team ‘ **’ matching ‘AppStore’ found: Xcode couldn’t find any provisioning profiles matching '** \*/AppStore’. Install the profile (by dragging and dropping it onto Xcode’s dock item) or select a different one in the General tab of the target editor. (in target ‘\*\*\*\*\*’)

---

<div class="post-metadata">

**Author:** ![mpaladin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mpaladin/32/118_2.png) [@mpaladin](https://community.sonarsource.com/u/mpaladin)\
**Post date:** [September 27, 2019, 7:40am UTC](https://community.sonarsource.com/t/build-wrapper-dump-json-file-is-found-empty/14770/11 "2019-09-27T07:40:44Z")

</div>

Hi @Play9win,

> [@Play9win](#):
>
> error: No profile for team ‘ **’ matching ‘AppStore’ found: Xcode couldn’t find any provisioning profiles matching ’** \*/AppStore’. Install the profile (by dragging and dropping it onto Xcode’s dock item) or select a different one in the General tab of the target editor. (in target ‘\*\*\*\*\*’)

I am not here to fix your xcodebuild issues, you should first focus to get a successful xcodebuild for your project before even trying to analyze it.

---

<div class="post-metadata">

**Author:** ![Play9win](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/play9win/32/7721_2.png) [@Play9win](https://community.sonarsource.com/u/Play9win)\
**Post date:** [October 6, 2019, 10:00am UTC](https://community.sonarsource.com/t/build-wrapper-dump-json-file-is-found-empty/14770/12 "2019-10-06T10:00:33Z")

</div>

Sorry about that. Actually I am using travis CI for build and it executes the build automatically, I just have to mention the dependencies but doing that the error throws :  
build-wrapper-dump.json file was found to be empty.

I don’t know why is that happening and how to stop it. I cannot use an explicit build command because whenever I use I get the above error.

---

<div class="post-metadata">

**Author:** ![mpaladin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mpaladin/32/118_2.png) [@mpaladin](https://community.sonarsource.com/u/mpaladin)\
**Post date:** [October 7, 2019, 7:16am UTC](https://community.sonarsource.com/t/build-wrapper-dump-json-file-is-found-empty/14770/13 "2019-10-07T07:16:28Z")

</div>

Hi @Play9win,

could you please share the `.travis.yml` file you were using before setting up the analysis? The one which works.

---

<div class="post-metadata">

**Author:** ![Play9win](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/play9win/32/7721_2.png) [@Play9win](https://community.sonarsource.com/u/Play9win)\
**Post date:** [October 7, 2019, 12:30pm UTC](https://community.sonarsource.com/t/build-wrapper-dump-json-file-is-found-empty/14770/14 "2019-10-07T12:30:02Z")

</div>

Thank you for your response. Actually nothing works for objective C project since we moved to sonarcloud. Here is the travis yml :

```auto
language: objective-c

osx_image: xcode10.1

sudo: false 

addons:

  sonarcloud:

    organization: "............."

cache: 

- cocoapods

- bundler

before_install:

- pod repo update

- pod install --project-directory=./ooid-ios/ooid/

- chmod +x ./scripts/travis/testflight.sh

- chmod +x ./scripts/travis/build.sh

notifications:

  email:

    recipients:

    - amit.yadav@sourcefuse.com

    on_success: always

    on_failure: always

script:

- export SONAR_HOST_URL="[https://sonarcloud.io](https://sonarcloud.io)"

- export SONAR_TOKEN=$SONAR_TRAVIS_TOKEN

- "./scripts/travis/build.sh"

after_success:

- bash ./scripts/travis/testflight.sh

env:

  global:

  - PRODUCTION_RELEASES_BRANCH_NAME=mastersf

  - DEV_BRANCH=dev

  - GIT_RELEASES_BRANCH_NAME=qa

  - BRANCH=$TRAVIS_BRANCH

  - JOB_URL=$TRAVIS_JOB_WEB_URL

  - GIT_REPOSITORY_NAME="..................."

  - secure: .................................................................

  - secure: .................................................................

  - secure: .................................................................

  - secure: ;.................................................................

```

The build.sh script contains the sonar scanner command with all its properties.

---

<div class="post-metadata">

**Author:** ![mpaladin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mpaladin/32/118_2.png) [@mpaladin](https://community.sonarsource.com/u/mpaladin)\
**Post date:** [October 7, 2019, 3:08pm UTC](https://community.sonarsource.com/t/build-wrapper-dump-json-file-is-found-empty/14770/15 "2019-10-07T15:08:53Z")

</div>

Hi @Play9win,

> [@Play9win](#):
>
> “./scripts/travis/build.sh”

and this script content?

---

<div class="post-metadata">

**Author:** ![Play9win](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/play9win/32/7721_2.png) [@Play9win](https://community.sonarsource.com/u/Play9win)\
**Post date:** [October 9, 2019, 5:32am UTC](https://community.sonarsource.com/t/build-wrapper-dump-json-file-is-found-empty/14770/16 "2019-10-09T05:32:01Z")

</div>

The script contains the sonar-scanner command:

```auto
if [["$TRAVIS_PULL_REQUEST" != "false" && "$TRAVIS_BRANCH" = "${DEV_BRANCH}"]]; then

  sonar-scanner -D sonar.github.pullRequest="$TRAVIS_PULL_REQUEST" \

  #-D sonar.github.login="$GITHUB_USER_NAME" \

  -D sonar.github.repository="$GIT_REPOSITORY_NAME" \

  -D sonar.github.oauth="$GITHUB_ACCESS_TOKEN" \

  -D sonar.host.url="$SONAR_HOST_URL" \

  -D sonar.login="$SONAR_TOKEN" \

  -D sonar.organization="........." -X

else

  if [["$TRAVIS_BRANCH" = "${PRODUCTION_RELEASES_BRANCH_NAME}" || "$TRAVIS_BRANCH" = "${DEV_BRANCH}"]]; then

    sonar-scanner -D sonar.host.url=$SONAR_HOST_URL -D sonar.login=$SONAR_TOKEN -D \

-D sonar.organization="........." -X

  fi

fi

```

---

<div class="post-metadata">

**Author:** ![mpaladin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mpaladin/32/118_2.png) [@mpaladin](https://community.sonarsource.com/u/mpaladin)\
**Post date:** [October 9, 2019, 7:41am UTC](https://community.sonarsource.com/t/build-wrapper-dump-json-file-is-found-empty/14770/17 "2019-10-09T07:41:47Z")

</div>

Hi @Play9win,

I don’t see any `xcodebuild` call neither any `sonar.cfamily.build-wrapper-output`. It is extremely difficult to follow and try to help you as you have troubles building your project.

---

<div class="post-metadata">

**Author:** ![mpaladin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mpaladin/32/118_2.png) [@mpaladin](https://community.sonarsource.com/u/mpaladin)\
**Post date:** [October 15, 2019, 2:18pm UTC](https://community.sonarsource.com/t/build-wrapper-dump-json-file-is-found-empty/14770/18 "2019-10-15T14:18:18Z")

</div>

Split this topic on October 15, 2019, 2:18pm UTC

A post was split to a new topic: [Empty build-wrapper-dump.json file](https://community.sonarsource.com/t/empty-build-wrapper-dump-json-file/15466)
