File not found /bw-output/build-wrapper-dump.json

INFO: Using build-wrapper output: /Users/david/Documents/Code/Phoenix-iOS/bw-output/build-wrapper-dump.json
INFO: 0 compilation units analyzed
INFO: PCH: 0 + 0 + 0 , 0 - 0 - 0 - 0
INFO: ------------------------------------------------------------------------
INFO: ------------------------------------------------------------------------
INFO: Total time: 23.897s
INFO: Final Memory: 68M/1202M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
ERROR: /Users/david/Documents/Code/Phoenix-iOS/bw-output/build-wrapper-dump.json (No such file or directory)
ERROR: Caused by: /Users/david/Documents/Code/Phoenix-iOS/bw-output/build-wrapper-dump.json (No such file or directory)

There is no directory /Users/david/Documents/Code/Phoenix-iOS/bw-output/

Why not?


You are showing us the output of the scanner command. What would be interesting to understand your issue is to know what happened when running the build-wrapper tool.

Could you share with us your build-wrapper command line? (I was going to ask for your logs, but they would be in the folder that does not exist, so you don’t have them, which probably indicates an issue with your command line).

I only run one command:


This had worked from March 2018 until a few weeks ago.

I don’t know exactly what worked, and to which extent it worked, but if your project says it uses Using build-wrapper output: /Users/david/Documents/Code/Phoenix-iOS/bw-output/build-wrapper-dump.json, it means that this file has to be generated somehow. Maybe you had an old one generated a long time ago which was still relevant enough to allow you to analyze your code?

Anyway, your best option now is to generate a new one (this should be done for each analysis). You seem to be on IOS, so you should follow those instructions.

I solved the issue. Turns out running sonar-scanner started to fail after I added a bridging header to my project. A bridging header gives your Swift code access to Objective-C code. The bridging header is interpreted as C code and my sonar-scanner wasn’t configured to scan C code.

Everything ran correctly after I excluded the bridging header file. I don’t need my bridging header to be analyzed so this is a satisfactory solution.