IAR compiler and IllegalStateException: unexpanded response file

I’m seeing a very similar issue (same exception) on a project with IAR ARM 8.50.5.

Can you provide some additional guidance on how to best troubleshoot the machine, log files, or what specific rules would need to be investigated surrounding antivirus blocking or similar?

error	13-Oct-2020 07:01:41	02:01:41.699 ERROR: Error during SonarQube Scanner execution
error	13-Oct-2020 07:01:41	java.lang.IllegalStateException: unexpanded response file
error	13-Oct-2020 07:01:41		at com.sonar.cpp.analyzer.IarDriver.onCapture(IarDriver.java:92)
error	13-Oct-2020 07:01:41		at com.sonar.cpp.plugin.CFamilySensor.process(CFamilySensor.java:430)
error	13-Oct-2020 07:01:41		at com.sonar.cpp.plugin.CFamilySensor.execute(CFamilySensor.java:277)
error	13-Oct-2020 07:01:41		at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
error	13-Oct-2020 07:01:41		at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
error	13-Oct-2020 07:01:41		at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:62)
error	13-Oct-2020 07:01:41		at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82)

Hi @tnordberg,

do you have any antivirus or anything that could affect build-wrapper file access? If yes, would you be able to try to disable it?

Hi @mpaladin -

Our build / analysis is running as part of a bamboo job on a server / workstation. It has a fairly standard corporate image on the machine and the user account running it has administrative rights. Any installed IT security tools are kind of invisible to us, although I know we have some version of a Crowdstrike binary scanner installed and possibly a variant of Windows Defender. I don’t have an obvious way to disable it at this time, but I could ask our IT department for more help if I knew what I was specifically requesting a deviation for.

Hi @tnordberg,

could you try to analyze the project on an environment (your machine maybe?) you control and where can disable easily eventual protections? To understand where the issue is coming from.

Unfortunately, even my local machine is controlled in a very similar manner. If I were to ask for some kind of exception on security tools I really feel like I would need to know what I was specifically asking for to be turned off or disabled.

Another odd thing is that our daily analysis task passes once in awhile without this error (on the same machine). Is there some way to get a better output that can more clearly tell us what the problem is or what file / process is causing the issue?

I don’t think it has anything to do with the code being analyzed as the changes each day are relatively small, it is generally always compiling fine and the tool error output (when failing) does not seem to indicate a specific issue with the code vs when it is passing.

Hi @tnordberg,

out of curiosity, have you tried to reproduce it locally?

Hard to say as I don’t know the protection you have installed, if such protection is blocking the build-wrapper to read the response file during build this is the cause of the issue.

I confirm that.