SonarLint cannot find file for analyzis

Please provide

  • Operating system: Ubuntu 22.04.4 LTS
  • SonarLint plugin version: 10.6.2.78685
  • Programming language you’re coding in: C#
  • Is connected mode used:
    • Connected to SonarCloud or SonarQube (and which version): SonarQube v10.5.1 (90531)

And a thorough description of the problem / question:
SonarLint plugin can’t find file to sent for analyzis but file path is valid. This applies to any file in solution.

 [2024-06-03T15:23:37.485] [sonarlint-file-exclusions] DEBUG sonarlint - Computing file exclusion for uri 'file:////home/user/pathToFolder/file.cs'
 [2024-06-03T15:23:37.485] [sonarlint-file-exclusions] DEBUG sonarlint - Unable to find client file for uri file:////home/user/pathToFolder/file.cs
 [2024-06-03T15:23:37.486] [SonarLint Server RPC request executor] ERROR sonarlint - File to analyze was not found in the file system: file:////home/user/pathToFolder/file.cs

However when I click on the file path in logs, file is opened in Rider.

2 Likes

Hello @Johny404, thanks for the report!

Could you please enable SonarLint logs and share them with us? This specific log might be misleading, as it might have been caused by another error.

Here are requested files. I hope I packed everything needed.

SonarLintLogs.zip (157.1 KB)

I have a similar problem that occurs regardless of the project’s bind to SonarQube.
Rider - Build #RD-241.15989.179, built on May 6, 2024
SonarLint - 10.6.2.78685.
Windows 11 Enterprise 21H2 22000.2960

Works fine: 10.5.0.78339.

Logs after update to 10.6.2.78685:
sonar log.txt (42.6 KB)

Thank you for your feedback. I was able to find the root cause, so I created this ticket. We will fix this for our next release. Sorry for the inconvenience.
In the meantime, I invite you to downgrade to SonarLint 10.5. To install a plugin from disk, you can follow this short documentation.

As a workaround, you could also try to manually modify the file in the editor; it should refresh the file in SonarLint and make it analyzable.

1 Like

i also having the same problem

same here! Sonarlint + phpStorm is not working at the moment. Since 10.5 and above suffer from repeated fiel notifications in phpStorm I need to go way back to 10.4 to have a working version.

This Warning might be related:

Migrate org.sonarlint.intellij.StartServicesOnProjectOpened to ProjectActivity [Plugin: org.sonarlint.idea]
	at com.intellij.ide.startup.impl.StartupManagerImpl.runPostStartupActivities(StartupManagerImpl.kt:276)
	at com.intellij.ide.startup.impl.StartupManagerImpl.access$runPostStartupActivities(StartupManagerImpl.kt:68)
	at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$3$2.invokeSuspend(StartupManagerImpl.kt:191)
	at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$3$2.invoke(StartupManagerImpl.kt)
	at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$3$2.invoke(StartupManagerImpl.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:167)
	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
	at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$3.invokeSuspend(StartupManagerImpl.kt:190)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.UndispatchedCoroutine.afterResume(CoroutineContext.kt:270)
	at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)

We have the same issue.

` [2024-06-11T15:36:03.03] [SonarLint Server RPC request executor] ERROR sonarlint - File to analyze was not found in the file system: file:///D:/Work/ASP.Ado/src/UI/UI.Api/Controllers/BaseController.cs
[2024-06-11T15:36:03.03] [SonarLint Server RPC request executor] INFO sonarlint - Triggering analysis with configuration: [
baseDir: D:\Work\ASP.Ado
extraProperties: {sonar.cs.internal.dotnetCliExeLocation=C:\Program Files\dotnet\dotnet.exe, sonar.cs.internal.solutionPath=D:\Work\ASP.Ado\ASP.Ado.sln, sonar.cs.internal.msBuildPath=C:\Program Files\dotnet\sdk\6.0.413}
activeRules: [secrets:S6292, Web:PageWithoutTitleCheck, csharpsquid:S4200, csharpsquid:S4201, csharpsquid:S2386, csharpsquid:S5773, csharpsquid:S3597, csharpsquid:S3598, csharpsquid:S3236, csharpsquid:S3358, csharpsquid:S3237, csharpsquid:S5659, secrets:S6290, Web:ItemTagNotWithinContainerTagCheck, csharpsquid:S1066, csharpsquid:S1186, csharpsquid:S4581, csharpsquid:S1185, csharpsquid:S3251, Web:FlashUsesBothObjectAndEmbedCheck, csharpsquid:S3241, csharpsquid:S3363, csharpsquid:S4210, csharpsquid:S1192{threshold=3}, csharpsquid:S2275, csharpsquid:S4211, csharpsquid:S3244, csharpsquid:S5542, csharpsquid:S3246, csharpsquid:S4456, csharpsquid:S3247, csharpsquid:S5547, csharpsquid:S3005, csharpsquid:S3249, Web:AvoidCommentedOutCodeCheck, csharpsquid:S1155, csharpsquid:S3450, csharpsquid:S6960, csharpsquid:S3451, csharpsquid:S6962, csharpsquid:S4663, csharpsquid:S6961, csharpsquid:S3453, csharpsquid:S2486, csharpsquid:S2365, csharpsquid:S2123, csharpsquid:S6964, csharpsquid:S4423, csharpsquid:S3456, csharpsquid:S6603, csharpsquid:S6966, csharpsquid:S4545, csharpsquid:S6965, csharpsquid:S6602, csharpsquid:S2368, csharpsquid:S3457, csharpsquid:S6605, csharpsquid:S6968, csharpsquid:S4426, csharpsquid:S3458, csharpsquid:S3217, csharpsquid:S3459, csharpsquid:S6967, csharpsquid:S3218, csharpsquid:S6607, csharpsquid:S4428, csharpsquid:S6609, csharpsquid:S6608, csharpsquid:S1048, csharpsquid:S1168, csharpsquid:S1163, csharpsquid:S2251, csharpsquid:S2372, csharpsquid:S1172, csharpsquid:S2252, csharpsquid:S3220, csharpsquid:S818, csharpsquid:S6610, csharpsquid:S3343, csharpsquid:S3464, csharpsquid:S4433, csharpsquid:S2376, csharpsquid:S6612, csharpsquid:S3466, csharpsquid:S3346, csharpsquid:S6613, csharpsquid:S2259, csharpsquid:S2139, csharpsquid:S6618, csharpsquid:S6617, csharpsquid:S1135, csharpsquid:S1134, csharpsquid:S1133, csharpsquid:S2583, csharpsquid:S2342{flagsAttributeFormat=^([A-Z]{1,3}[a-z0-9]+)([A-Z]{2})?s$, format=^([A-Z]{1,3}[a-z0-9]+)([A-Z]{2})?$}, csharpsquid:S2222, csharpsquid:S2344, csharpsquid:S2223, csharpsquid:S3433, csharpsquid:S2345, csharpsquid:S4524, csharpsquid:S2346, csharpsquid:S2225, csharpsquid:S2589, csharpsquid:S5856, csharpsquid:S1144, csharpsquid:S1264, csharpsquid:S3440, csharpsquid:S3442, csharpsquid:S3443, csharpsquid:S3444, csharpsquid:S2234, csharpsquid:S2114, csharpsquid:S3445, csharpsquid:S2115, csharpsquid:S2479, csharpsquid:S3447, csharpsquid:S3449, csharpsquid:S3329, csharpsquid:S1118, csharpsquid:S1117, csharpsquid:S1116, csharpsquid:S1479{maximum=30}, csharpsquid:S1110, csharpsquid:S2681, csharpsquid:S2201, csharpsquid:S6800, csharpsquid:S3897, csharpsquid:S3776{threshold=15, propertyThreshold=3}, csharpsquid:S2445, csharpsquid:S3655, csharpsquid:S2688, csharpsquid:S3415, csharpsquid:S2326, csharpsquid:S2328, csharpsquid:S1006, csharpsquid:S1125, csharpsquid:S1244, csharpsquid:S1123, Web:MouseEventWithoutKeyboardEquivalentCheck, csharpsquid:S1121, csharpsquid:S1481, csharpsquid:S2692, csharpsquid:S6931, csharpsquid:S6930, csharpsquid:S2696, csharpsquid:S4635, csharpsquid:S2699, csharpsquid:S6934, csharpsquid:S3427, csharpsquid:S2219, secrets:S6690, secrets:S6691, secrets:S6692, csharpsquid:S1699, csharpsquid:S1215, secrets:S6693, secrets:S6694, secrets:S6695, csharpsquid:S1696, secrets:S6696, secrets:S6334, secrets:S6697, csharpsquid:S1210, secrets:S6335, secrets:S6698, Web:S6848, secrets:S6336, secrets:S6699, Web:S6847, csharpsquid:S1450, secrets:S6337, Web:S6846, secrets:S6338, Web:S6845, Web:S6844, Web:S6843, Web:S6842, Web:S6841, csharpsquid:S3871, Web:S6840, csharpsquid:S3875, csharpsquid:S3998, csharpsquid:S3877, csharpsquid:S3878, csharpsquid:S2306, csharpsquid:S1104, secrets:S6684, secrets:S6686, secrets:S6687, secrets:S6688, secrets:S6689, Web:S6853, csharpsquid:S3881, Web:S6852, csharpsquid:S2551, Web:S6851, Web:S6850, csharpsquid:S3400, csharpsquid:S3885, csharpsquid:S3887, csharpsquid:S2436{max=2, maxMethod=3}, csharpsquid:S3889, csharpsquid:S2437, Web:S6827, Web:S6825, Web:S6824, Web:S4645, Web:S6823, Web:S6822{allowedRedundantRoles=nav=navigation}, Web:S6821, Web:S1134, Web:S1135, csharpsquid:S3971, csharpsquid:S2761, csharpsquid:S3972, csharpsquid:S3973, csharpsquid:S3610, csharpsquid:S1206, csharpsquid:S3981, csharpsquid:S4830, csharpsquid:S3984, csharpsquid:S3626, csharpsquid:S3869, csharpsquid:S1656, Web:S6807, csharpsquid:S927, csharpsquid:S2743, csharpsquid:S2629, Web:MetaRefreshCheck, Web:S6819, Web:S6811, csharpsquid:S3963, csharpsquid:S3600, csharpsquid:S2995, csharpsquid:S2996, csharpsquid:S2997, csharpsquid:S2755, csharpsquid:S3603, csharpsquid:S3966, csharpsquid:S3604, csharpsquid:S2757, csharpsquid:S1994, csharpsquid:S1751, csharpsquid:S1871, Web:DoctypePresenceCheck, csharpsquid:S907, csharpsquid:S1764, csharpsquid:S1643, csharpsquid:S2970, csharpsquid:S2971, csharpsquid:S2857, csharpsquid:S2737, csharpsquid:S3949, csharpsquid:S1854, secrets:S6731, secrets:S6732, secrets:S6733, csharpsquid:S2701, csharpsquid:S3928, csharpsquid:S1862, secrets:S6720, secrets:S6721, secrets:S6722, secrets:S6723, secrets:S6717, secrets:S6718, secrets:S6719, csharpsquid:S2953, csharpsquid:S3923, csharpsquid:S2955, csharpsquid:S3925, csharpsquid:S3926, csharpsquid:S3927, secrets:S6751, secrets:S6752, secrets:S6753, Web:ImgWithoutAltCheck, secrets:S6755, csharpsquid:S2925, csharpsquid:S1848, secrets:S6736, Web:UnsupportedTagsInHtml5Check, secrets:S6739, Web:S6793, csharpsquid:S2930, csharpsquid:S2933, csharpsquid:S2934, csharpsquid:S3903, csharpsquid:S3904, csharpsquid:S1607, secrets:S6771, secrets:S6773, secrets:S6777, secrets:S6769, csharpsquid:S1939, csharpsquid:S1944, csharpsquid:S1940, secrets:S6760, secrets:S6762, secrets:S6764, secrets:S6765, secrets:S6768, secrets:S6758, csharpsquid:S4070, csharpsquid:S5034, secrets:S6782, secrets:S6783, csharpsquid:S6588, csharpsquid:S4061, csharpsquid:S1905, csharpsquid:S3060, csharpsquid:S2094, csharpsquid:S3063, secrets:S6910, csharpsquid:S4143, csharpsquid:S4144, Web:S4084, Web:S1827, csharpsquid:S6580, csharpsquid:S4275, csharpsquid:S6575, csharpsquid:S4035, csharpsquid:S4277, csharpsquid:S4158, csharpsquid:S4159, csharpsquid:S2190, csharpsquid:S6670, csharpsquid:S6672, csharpsquid:S6420, csharpsquid:S3397, csharpsquid:S2187, csharpsquid:S4487, csharpsquid:S6422, csharpsquid:S3398, csharpsquid:S6664{informationThreshold=2, debugThreshold=4, warningThreshold=1, errorThreshold=1}, csharpsquid:S6667, csharpsquid:S6424, csharpsquid:S6669{format=^_?[Ll]og(ger)?$}, csharpsquid:S6668, csharpsquid:S125, csharpsquid:S127, csharpsquid:S110{max=5}, csharpsquid:S112, Web:FrameWithoutTitleCheck, csharpsquid:S4260, csharpsquid:S3172, csharpsquid:S6562, csharpsquid:S6561, csharpsquid:S6674, csharpsquid:S6673, csharpsquid:S2198, csharpsquid:S6797, csharpsquid:S6675, csharpsquid:S4136, csharpsquid:S3168, csharpsquid:S4015, csharpsquid:S6678, csharpsquid:S6798, csharpsquid:S6677, csharpsquid:S3169, Web:TableHeaderHasIdOrScopeCheck, csharpsquid:S4019, csharpsquid:S101, csharpsquid:S2290, csharpsquid:S1199, csharpsquid:S2291, secrets:S6710, csharpsquid:S3260, csharpsquid:S2292, csharpsquid:S3261, csharpsquid:S1075, csharpsquid:S3262, secrets:S6713, csharpsquid:S4583, csharpsquid:S4220, csharpsquid:S3010, secrets:S6703, csharpsquid:S3011, secrets:S6704, Web:S5257, secrets:S6705, Web:S5258, csharpsquid:S4586, csharpsquid:S2166, csharpsquid:S3376, secrets:S6706, Web:S5255, csharpsquid:S3256, Web:S5256, secrets:S6708, Web:S5254, csharpsquid:S108, csharpsquid:S107{max=7}, secrets:S6700, csharpsquid:S2183, secrets:S6701, csharpsquid:S2184, secrets:S6702, csharpsquid:S3263, csharpsquid:S2053, csharpsquid:S3264, csharpsquid:S3265, csharpsquid:S3267, csharpsquid:S2178, csharpsquid:S5445, Web:S5264, Web:S5260, csharpsquid:S6419]
inputFiles: [
]
]

[2024-06-11T15:36:03.03] [SonarLint Server RPC request executor] ERROR sonarlint - No file to analyze`

SonarLint plugin version: 10.6.2.78685
JetBrains Rider 2024.1.3

Thanks guys. :slight_smile:

We are facing same problem on Windows 11.
Your ticket only mentions the Linux platform.
Do you need additional information for Windows, @nicolas.quinquenel ? Kirill already uploaded some logs.

1 Like

We are currently working on the fix as described in my previous message, which will be included in the release next week. We have everything needed so far, and we appreciate your support and patience.