CJK characters in project path cause errors

  • Operating system: macOS 15.4
  • SonarQube for IntelliJ plugin version: 10.20.0.80985
  • IntelliJ version: IntelliJ IDEA 2024.3.5 UE
  • Programming language: Java
  • SonarQube Community Build: v25.3.0.104237

It’s similar to what described in SLCORE-1009

When analyzing projects located under paths containing CJK characters (for example: /home/myuser/WorkSpace/中文字符/my-project), the plugin fails with the following stack trace.

Analysing 66 files (ID 0c009ff0-3f23-403b-aabe-e4a5821835b7)...
 [2025-04-09T16:18:43.152] [SonarLint Server RPC request executor] ERROR org.eclipse.lsp4j.jsonrpc.RemoteEndpoint - Internal error: java.lang.IllegalArgumentException: Bad escape
java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: Bad escape
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:649)
	at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.IllegalArgumentException: Bad escape
	at java.base/sun.nio.fs.UnixUriUtils.fromUri(UnixUriUtils.java:88)
	at java.base/sun.nio.fs.UnixFileSystemProvider.getPath(UnixFileSystemProvider.java:125)
	at java.base/java.nio.file.Path.of(Path.java:204)
	at org.sonarsource.sonarlint.core.analysis.AnalysisService.lambda$toInputFiles$42(AnalysisService.java:801)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:178)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1708)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:575)
	at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260)
	at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616)
	at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:622)
	at java.base/java.util.stream.ReferencePipeline.toList(ReferencePipeline.java:627)
	at org.sonarsource.sonarlint.core.analysis.AnalysisService.toInputFiles(AnalysisService.java:823)
	at org.sonarsource.sonarlint.core.analysis.AnalysisService.getAnalysisConfigForEngine(AnalysisService.java:279)
	at org.sonarsource.sonarlint.core.analysis.AnalysisService.analyze(AnalysisService.java:647)
	at org.sonarsource.sonarlint.core.rpc.impl.AnalysisRpcServiceDelegate.lambda$analyzeFilesAndTrack$7(AnalysisRpcServiceDelegate.java:131)
	at org.sonarsource.sonarlint.core.rpc.impl.AbstractRpcServiceDelegate.lambda$requestAsync$0(AbstractRpcServiceDelegate.java:67)
	at org.sonarsource.sonarlint.core.rpc.impl.AbstractRpcServiceDelegate.computeWithLogger(AbstractRpcServiceDelegate.java:135)
	at org.sonarsource.sonarlint.core.rpc.impl.AbstractRpcServiceDelegate.lambda$requestAsync$1(AbstractRpcServiceDelegate.java:65)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646)
	... 4 common frames omitted

Thank you for the great work on SonarQube and the IntelliJ plugin.

Best regards.

Hey @ddrpa, many thanks for your report. I can effectively reproduce the issue.

I re-opened this ticket that only partially fixed this problem, and I will work on a fix as soon as possible!

1 Like

Hey @ddrpa, we have just released SonarQube for IDE version 10.21, which contains a fix to this issue. Could you please try and see if still notice any problems? Thanks!

Nice work, thanks

I’ve tested it on my machine, and it works well.

  • Operating system: macOS 15.4.1
  • SonarQube for IntelliJ plugin version: 10.21.0.81149
  • IntelliJ version: IntelliJ IDEA 2025.1 UE & PyCharm 2025.1
  • Programming language: Java & Python
  • SonarQube Community Build: v25.3.0.104237

However, I occasionally encounter exceptions like: “File to analyze was not found in the file system”.

The issue usually resolves itself after manually triggering “Analyze all project files” or cleaning files under:

  • $HOME/.sonar/
  • $HOME/Library/Caches/JetBrains/IntelliJIdea2025.1/projects/
  • $PROJECT_DIR/.idea/

I used a freshly cloned project to avoid any caching problems:

[2025-04-17T14:12:08.211] [sonarlint-analysis-scheduler] ERROR sonarlint - File to analyze was not found in the file system: file:///Users/user/中文字符/jeecg-boot/jeecg-server-cloud/jeecg-visual/jeecg-cloud-test/jeecg-cloud-test-seata/jeecg-cloud-test-seata-account/src/main/java/org/jeecg/modules/test/seata/account/entity/SeataAccount.java

I haven’t been able to consistently reproduce it yet, but will update this thread if a reliable way was found.


Also, could this be affecting other language scanners as well? For example, a locustfile.py file cause error in my Java project, and I can reproduce it with Python project in PyCharm:

 [2025-04-17T11:43:27.425] [sonarlint-analysis-scheduler] WARN org.sonar.plugins.python.PythonScanner - Unable to analyze file: [uri=file:///Users/user/WorkSpace/中文字符测试/my-project/locustfile.py]
java.lang.IllegalArgumentException: Bad escape
	at java.base/sun.nio.fs.UnixUriUtils.fromUri(UnixUriUtils.java:88)
	at java.base/sun.nio.fs.UnixFileSystemProvider.getPath(UnixFileSystemProvider.java:125)
	at java.base/java.nio.file.Path.of(Path.java:204)
	at java.base/java.nio.file.Paths.get(Paths.java:98)
	at org.sonar.python.semantic.SymbolUtils.pathOf(SymbolUtils.java:186)
	at org.sonar.python.semantic.ClassSymbolImpl.<init>(ClassSymbolImpl.java:73)
	at org.sonar.python.semantic.Scope.addClassSymbol(Scope.java:318)
	at org.sonar.python.semantic.SymbolTableBuilder$FirstPhaseVisitor.visitClassDef(SymbolTableBuilder.java:352)
	at org.sonar.python.tree.ClassDefImpl.accept(ClassDefImpl.java:82)
	at org.sonar.plugins.python.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:29)
	at org.sonar.plugins.python.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:36)
	at org.sonar.plugins.python.api.tree.BaseTreeVisitor.visitStatementList(BaseTreeVisitor.java:48)
	at org.sonar.python.tree.StatementListImpl.accept(StatementListImpl.java:43)
	at org.sonar.plugins.python.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:29)
	at org.sonar.plugins.python.api.tree.BaseTreeVisitor.visitFileInput(BaseTreeVisitor.java:43)
	at org.sonar.python.semantic.SymbolTableBuilder$FirstPhaseVisitor.visitFileInput(SymbolTableBuilder.java:282)
	at org.sonar.python.tree.FileInputImpl.accept(FileInputImpl.java:75)
	at org.sonar.python.semantic.SymbolTableBuilder.visitFileInput(SymbolTableBuilder.java:135)
	at org.sonar.plugins.python.api.PythonVisitorContext.<init>(PythonVisitorContext.java:77)
	at org.sonar.plugins.python.PythonScanner.scanFile(PythonScanner.java:121)
	at org.sonar.plugins.python.Scanner.execute(Scanner.java:57)
	at org.sonar.plugins.python.PythonSensor.execute(PythonSensor.java:161)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.sensor.SensorsExecutor.executeSensor(SensorsExecutor.java:101)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.sensor.SensorsExecutor.executeSensors(SensorsExecutor.java:91)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.sensor.SensorsExecutor.execute(SensorsExecutor.java:78)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.AnalysisContainer.doAfterStart(AnalysisContainer.java:122)
	at org.sonarsource.sonarlint.core.plugin.commons.container.SpringComponentContainer.startComponents(SpringComponentContainer.java:180)
	at org.sonarsource.sonarlint.core.plugin.commons.container.SpringComponentContainer.execute(SpringComponentContainer.java:159)
	at org.sonarsource.sonarlint.core.analysis.container.module.ModuleContainer.analyze(ModuleContainer.java:75)
	at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.doRunAnalysis(AnalyzeCommand.java:178)
	at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.doExecute(AnalyzeCommand.java:146)
	at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:132)
	at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.lambda$execute$0(AnalyzeCommand.java:124)
	at org.sonarsource.sonarlint.core.commons.progress.TaskManager.runTask(TaskManager.java:36)
	at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:123)
	at org.sonarsource.sonarlint.core.analysis.AnalysisScheduler.executeQueuedCommands(AnalysisScheduler.java:75)
	at java.base/java.lang.Thread.run(Thread.java:1583)

Thanks again for your great work!

1 Like

Thanks for the feedback, I appreciate it. I’ll definitely dig deeper to understand why those files aren’t being found.

Also, could this be affecting other language scanners as well? For example, a locustfile.py file cause error in my Java project, and I can reproduce it with Python project in PyCharm:

Unfortunately, this is expected. SonarQube for IDE integrates analyzers that may have the same issue that we fixed. While I won’t elaborate on the reasons now, I will ensure this feedback reaches the responsible teams.

1 Like