Error:java.lang.IllegalArgumentException: Unable to create symbol on file

We have had sonar cloud setup in our CI for years. For no reason the code scan started to fail on a file that was not changed, with the below error.

Error:java.lang.IllegalArgumentException: Unable to create symbol on file

How would I go about fixing this problem?

Hi,

Welcome to the community!

Could you provide the full analysis log, as well as some details on the file (e.g. language)?

The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.

This guide will help you find them.

 
Ann

See Error during sonar-scanner analysis: Unable to create symbol on file - #4 by saberduck

Adding sonar.sourceEncoding=utf-8 fixes it.
Must be some recent bug in sonarcloud’s plugins as neither the source nor scanner version was changed.

1 Like