"Find in Path" not showing results in some files
I've run into a problem where "Find in Path" is not showing results in a particular set of files. I can't figure out why.
The files are .js files. They are named like "foo.steps.js", but if I rename to simply "foo.js" the same problem happens.
The files show up in the Projects view. They are in a sub-directory of a module source root. There are sibling sub-directories whose files do show up in "Find in Path" (mostly *.feature files). I can't see any reason why these files don't show up.
The directory and files are not part of .gitignore. They have have not been marked as Excluded. The "Find in Files" dialog has no file mask, is set to find "anywhere" in "Project". Yet a search for some text that appears in these files simply doesn't show up!
For example, highlighted is one of the files:
And this "Find in Files" for "verifyNumberOfCards" should show several results in the file, but it doesn't:
I should see this result from "portfolioPlans.steps.js":
I'm at a loss. What other reason might these files not show up in Find in Files??
请先登录再写评论。
I just experienced the exact same issue, i fixed it by editing out the
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
<option name="exactExcludedFiles">
<list>
<option value="$PROJECT_DIR$/...blabla.js" />
in .idea/workspace.xml
i've been doing a lot of rebasing old branches lately maybe something went wrong there.
See also this comment in a related request (to include excluded directories by default).
I'm seeing the same problem in IntelliJ with "webpack.config.js" I invalidated caches but still nothing.
Is there any ignore option that I may have accidentally enabled?
Clehene Please check the enabled filter: https://i.imgur.com/zX9Ras1.png
This is a very annoying and dangerous bug, it caused a couple of hours and a lot trouble for me. Please do whatever it takes to get rid of such kind of bugs. If I search something in the whole project, I want to trust my IDE.
It would be very helpful and greatly appreciated if you report such cases with IDE log directory zipped (Help | Collect Logs and Diagnostic Data action) and screenshots/screencast showing the steps and the expected/actual result you see. Thank you.
Andrey Dernov after invalidating caches and restarting twice the issue is gone for now, but until then I already lost at least two hours trying to find out the problem. If it happens again, I'll take screenshots and upload the logs. But, hey this issue is more than 3 years old. I find it disappointing that such critical bugs can survive so long.
Many issues has been named in this thread. Also the problem of no results in Find in Path could be caused by different problems including not expected settings used for context or directory has been excluded from project, if there are more than n results - they may not all be shown in Find popup, etc. It sometimes happens that there is no bug in IDE but user could select wrong options. And such issues also make sense for us b/c obviously they are UI/UX issues. So it is better to look into each case specifically to be able to tell something meaningful about the it.
We have tried to reproduce similar reported problem here https://youtrack.jetbrains.com/issue/IDEA-190842 but were unable to. If it is your bug, the more information we gather for it the better chances to reproduce and fix this. Thank you.
Today I have a similar issue, that the file search is not working. See the attached screenshot. Where should I send the logs and which parts of the logs are needed? I don't want to send any sensitive data about the project.
> It sometimes happens that there is no bug in IDE but user could select wrong options
No, if it was a problem of a wrong setting, it would persist after invalidating the caches and restart. Obviously it is a BUG in IDE.
> If it is your bug, the more information ...
Again, no, it is NOT my bug. It's PhpStorm's bug.
>Again, no, it is NOT my bug. It's PhpStorm's bug.
>Where should I send the logs and which parts of the logs are needed? I don't want to send any sensitive data about the project.
It would be more convenient to continue in a separate space in YouTrack. Please file an issue at https://youtrack.jetbrains.com/issues/IDEA with Help | Collect Logs and Diagnostic Data .zip attached (it can be attached with developers only visibility) and screenshot showing the full IDE window of not working navigation action. Thank you.
Created an issue at https://youtrack.jetbrains.com/issue/IDEA-257976
I couldn't upload the log file privately. It cancels the request if I select the visibility to jetbrains-team and want to save the form.
Hey. I have recently also encountered similar issue - I think after upgrading to 2021.1.2. Certain files didn't show in "Search Everywhere" action's results. I have invalidated/cleared cache twice - nothing changed. I have started to play around a little with "Search Everywhere" action's dialog and noticed that for Files tab filter settings had all it's types unselected by default, so I have "Inverted" selection (select all in effect) and now "the missing files" are there. Hopefully this will be useful workaround for some of you. Cheers.
I get a similar thing too. Also it's not as simple as "just raise a bug ticket with a reproducible bug". I can't show my code because it'd break intellectual property laws, and I can't reproduce it - the code base is very large & complex for which this issue occurs.
Benphillips
It would help a lot if you could try and reproduce it in a smaller project that you can actually share.
If it's a no go, then creating a new YouTrack issue with a detailed description of the problem, a screenshot of your project tree, and the logs (can be attached privately or uploaded to https://uploads.jetbrains.com/) would give us a clue in which direction to move with the troubleshooting.
Dear team of Webstorm
The bug was detected by author at 2017
Today is 2022. And the bug is still exists.
Are not you gonna solve this bug ??
It takes hours for me, to face this bug. And now I am in case where I can not trust Webstorm
There is issue on YouTrack: https://youtrack.jetbrains.com/issue/IDEA-257976. But there was no answer for some time
It is now 2023 and this bug persists. I am using RubyMine 2022.2.4 on Mac OS. I usually use Project scope but I also experience the problem with Directory scope.
I have 2 code bases I'm working with; one has about 200 occurrences of "logger" and the other has about 900. In both cases, Find in Files (Project) reports between about 100 and about 115 occurrences. If I toggle the Cc (case significant) flag, the number of occurrences jumps around to many different numbers in that range.
Invalidating the cache and restarting does not help.
I tried Bret Hess' suggestion to click "Open in Find Window", and it does indeed show occurrences that were not in the first display. However, the number of results (665) is still less than the total that exist (911). [I was wrong about this. Please see my next message.]
Unfortunately, this code base is proprietary and I cannot send it to you.
As others have pointed out, this is a very serious problem. I believe it's important enough to stop developing new features to resolve it. I will now have to use a different editor to edit my code.
My apologies, my previous message contained an error. I said:
"I tried Bret Hess' suggestion to click "Open in Find Window", and it does indeed show occurrences that were not in the first display. However, the number of results (665) is still less than the total that exist (911)."
...but have since found out that I was wrong about this. This is the corrected version of that paragraph:
"I tried Bret Hess' suggestion to click "Open in Find Window", and it works. It shows all occurrences found on the command line with `grep 'logger\.' **/*.rb | wc -l` (on Mac OS)."
I apologize for any confusion or wasted time this caused anyone.
So, the originally reported problem that the initial found file popup has incorrect results is still a problem, but for me, clicking "Open in Find Window" shows all the files it needs to.
From a user experience perspective, until this is fixed I think the right thing to do is to either show a warning in the file dialog, or disable it completely and go right to displaying the Find window. Or perhaps provide an option to disable it if you don't want to unconditionally disable it. Perhaps the application could compare counts of the two windows and provide the workaround behavior only if they differ.
Keithrbennett please upvote IDEA-196723. Unfortunately there's still no stable reproducer and the only workaround known is to Invalidate caches and restart. Sorry for the inconvenience.
October 7th, 2024 - Android Studio Ladybug. Still having this issue and it caused serious troubles in our projects. It kind of broke the trust on this tool and until there is a news about getting it fixed I can't rely on it anymore.