Unable to execute Analysis because of special characters: java.nio.file.InvalidPathException

  • Versions used: SonarQube Server 7.9.1.27448, Scanner 4.0.0.1744-linux, SonarQube Jenkins Plugin 2.8.1

In an evaluation process we tried to scan the OWASP Juice Shop, but it failed with the following error:
ERROR: Error during SonarQube Scanner execution
java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: frontend/src/assets/public/images/uploads/my-rare-collectors-item!-[???????(????-????-????-????????)???????]-1572603645543.jpg

This is the project that shall be scanned:

I can’t propose a possible workaround, the filenames have to be parsed correctly.

  • Scanner command: sonar-scanner -Dsonar.host.url=$SONAR_HOST_URL -Dsonar.projectKey=$SONAR_PROJECTKEY -Dsonar.login=$SONAR_AUTH_TOKEN

Hi,

Welcome to the community!

Your best bet here is to configure some exclusions. Off-hand, it looks like **/*.jpg would be a good start. It’s easiest to manage long-term if you configure exclusions at the Project level in the UI. If your project doesn’t exist in SonarQube yet, you can bootstrap that by provisioning it.

 
HTH,
Ann