Errors in solution that do not really exist
Hello,
For some reason, Rider goofed and keeps saying I have tons of errors in nearly every file, but when I open a file it realizes that there are no errors there and all the mentions and indicators of errors for that file go away, but that only happens if I actually open the file and give it a second to upadate.
Is there a way I can force the whole project to properly update? I tried to right-click on a folder and selected Inspect Code, then selected Whole Solution and it brought up a window and then scanned all files but they all came back with the same false errors and would go away and leave the list once I actually opened the file, but I don't want to have to go through and open every single file in a large Unity project with a lot of, not only my own code, but code from third party assets.
Thanks,
JetBrains Rider 2020.1.3
Build #RD-201.7846.1, built on May 15, 2020
Runtime version: 11.0.7+10-b765.53 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
.NET Framework 4.0.30319.42000
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 2900M
Cores: 32
Registry: debugger.new.debug.tool.window.view=true, ide.tree.horizontal.default.autoscrolling=false, performance.watcher.sampling.interval.ms=200, ide.tooltip.showAllSeverities=true, show.diff.preview.as.editor.tab=true, ide.borderless.title.product=false, ide.title.debug=true, light.edit.file.open.enabled=false, performance.watcher.unresponsive.interval.ms=1000, ide.tooltip.initialDelay.highlighter=0, search.everywhere.settings=true, show.diff.preview.as.editor.tab.with.single.click=true, parameter.info.max.visible.rows=10, vcs.log.show.diff.preview.as.editor.tab=true, ide.borderless.title.debug=true, ide.borderless.title.project.path=false, localHistory.daysToKeep=30, search.everywhere.pattern.checking=false, ide.tooltip.initialDelay=0, ide.borderless.title.classpath=false, ide.balloon.shadow.size=0, ide.require.transaction.for.model.changes=false
Non-Bundled Plugins: String Manipulation, org.intellij.plugins.markdown, com.chrisrm.idea.MaterialThemeUI, com.daylerees.rainglow, com.intellij.resharper.HeapAllocationsViewer, com.sburlyaev.terminal.plugin, com.wakatime.intellij.plugin, net.vektah.codeglance, com.jetbrains.rider.android, izhangzhihao.rainbow.brackets
Please sign in to leave a comment.
Hello,
Please try `File -> Invalidate caches/Restart`. Does it help?
Yes, that is what I ended up having to do, but I was just hoping that there might be a less extreme method to rescan the solution or similar. It does not sound like there is, though.
I'm afraid there is no other solution. It looks like your caches was corrupted, that is why Rider's analyser got confused. By the way, please let us know if you find steps to reproduce the issue. We'd be happy to fix it.
For me, this happens randomly and very infrequently when changing branches (working with Unity).
Hi Guney Ozsan!
What Rider version do you use? The described behavior was already fixed some time ago. Please let us know if you have it on Rider 2022.1 and drop a new issue with logs (which will be attached automatically) via Help | Report a bug.
Thank you in advance!
Hi Alexandra Guk, I encountered the issue again and filed a bug here with logs included: https://youtrack.jetbrains.com/issue/RIDER-77343/Rider-reports-many-code-errors-although-there-is-none
I am experiencing the same thing although invalidating caches doesn't really help (tried 2 times).
Hi Piotr Kolodziej!
This issue could be caused for many reasons. Let's check if you have the same. Please let us know if you have this problem on the latest Rider 2022.1 and drop a new issue with logs (which will be attached automatically) via Help | Report a bug.
Thanks!
I have the same issue at the moment. Latest Rider version. When switching between branches of a solutions with 20+ projects, mostly C# and JS), the analyst shows 15000 files in his progress, at some point it stars to show hundred of thousands of errors. Very rarely after that it starts clears them. Most of the time they are just there. Opening a file doesn't clear them. It starts to get very annoying - waiting minutes for the analyzer to finish, and then when it get it all wrong, to restart and wait again. Too much time is wasted this way. 99.9% of the time I work only with that one solution, just different branches. And steel getting these "errors"
For the last few days this is getting worse, that was the reason to search for it and finding this discussion.
We are sorry to hear that you have run into such a problem. Would you mind reporting a bug via Help | Report a bug and attaching Rider logs (Help | Collect Logs) to it?
Thank you in advance and have a nice day!
I've collected the logs, but in the archive there are too many files, some of them are over 50mb in size. And it's impossible for me to check if they contain any sensitive information. Because the project I'm working on is a banking software, I can't risk it to send something I shouldn't, so I can't send you the logs.
Hello Miroslav,
Regrettably, without seeing your logs, we cannot proceed with troubleshooting the issue you faced. Would you mind verifying if cleaning the old logs would help with checking the output for sensitive information?
Another option is to sign an NDA, so that you could share any information with us. Please let me know, if that option suits you.
Probably, you will find the following options useful:
Have a nice day!
I do have the same problem in the latest version of Rider. I am using Ubuntu 20.04
Maybe restart unity and then try `File -> Invalidate caches/Restart` would be helpful.
I have the same issue in 2023.2, nearly every time I switch git branch. It is very irritating, especially when the errors only go away when I invalidate caches. It is very time consuming.
Hello Abninandhu,
We are sorry to hear that you have run into such a problem. Would you mind reporting a bug via Help | Report a Bug? The logs would be attached automatically if you press "Yes" in the dialog open.
Have a nice day!
Is there a YouTrack issue we can track this bug with? We have a similar issue and it is very consistent. When "not doing anything" in the solution (with 100+ projects), the analyzer finishes, and everything is "okay". If we start a "dotnet publish" on one of the projects, the analyzer starts to mark various objects red. If we invalidate caches and restart, the analyzer takes some time and the errors go away. Sometimes, if we wait for the build to complete, opening each file causes the analyzer to remove the "red" objects and the projects look fine--but it is thousands of files.
Is there a way to configure the analyzer to stop analyzing during a build?
Hello Robert,
We would like to take a look at your scenario separately. Would you mind submitting a bug to our tracker?
Thank you in advance and have a nice day!
I'm affected by this as well.
Using avalonia, when I finish a release, hotfix or feature, and then switch branch, the analyzer starts marking controls in red, as if they were buggy. Yet the build works fine.
I think this stems from my main branch using Avalonia 0.10, and the release branch being Avalonia 11. The analyzer doesn't see that the “InitializeComponent” function is inherited from UserControl in avalonia11, when in avalonia 0.10 you were required to implement it yourself.
In short, the solution-wide analysis doesn't properly detect changes in nuget versions.
this is after invalidating the cache and restarting :
Hello Adrien,
The issue you described sounds similar to a known problem: Incorrect Solution Analysis behavior after switching Git branches.
Feel free to upvote it to demonstrate your interest.
Have a nice day!
Dmitry Kazantsev Do you really want me to switch to an issue left open for 7 years ?
The last update on it is from 2015.
Hello Adrien,
Apologies for confusion.
Do I understand correctly that you encounter such an issue in only the scenario described? I mean when switching between branches that target different versions of Avalonia packages?
Don't you encounter the same problem in other projects?
If so, we would appreciate it if you submit an issue to our tracker.
Have a good day!
Hi Dimitry,
I have the same problem when switching branches, a lot of fake errors. Sometimes just opening the files marked with error fix the analysis but mostly of the time doesn't. Even restarting Rider does not work. The only thing that fix it is invalidating the cache, but is annoying when I have to switch multiple branches. For me, the issue from 2015 still present.
Regards
Hello Scott,
We are sorry to hear that you experience such a problem.
We would like to take a look at your scenario separately. Would you mind submitting a bug to our tracker?
Thank you in advance and have a nice day!
Hi, I'm also getting this problem. I says I have problems in most of the files in one of the projects. If I open the file It shows no syntax errors but I get this:
When I open one of the files by clicking here it clears the error.
I tried invalidating cashes but it does not help. After restart the same files are mark as having errors again.
Even when I add a new file it looks like this
It happens very randomly. Once it was triggered by adding a single space to a comment in class.
I'm using:
JetBrains Rider 2024.1.2
Build #RD-241.15989.179, built on May 6, 2024
Hello Dariusz,
Would you mind enabling the SWEA trace scenario and submitting a bug after reproducing the issue? (Help | Report a bug)
Have a nice day!