"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??
请先登录再写评论。
Please try File | Invalidate Caches | Invalidate and Restart.
That did it, thanks!
I have to admit that's pretty alarming, though. In JS context I rely on Find in Files a lot to "safely" refactor things, which is how I ran into this...
Caches can be corrupted on unexpected IDE shutdown or system crash.
same here. Invalidate caches & restart does not help.
Easy steps to reproduce:
1) rename existing .js file to .ts
2) revert or shelve the change
File will not be listed in Project search and in Ctrl-Shift-N search. In Tree view the file icon will have a cross at top left:
Looks like the revert action of the renamed file leads to exclusion of this file in project. What Version Control system do you use? Please follow the https://youtrack.jetbrains.com/issue/IDEA-192815 for updates.
Issue still presents (IDEA 2018.2.5 CE)
Invalidating cache doesn't help.
@Cheer4engineer please share a sample project and the exact steps to reproduce.
Ok. I'll try to do it later.
In my case I found an entry for the unindexed file in .idea/workspace.xml:
It's very likely that I tried converting that file to TypeScript in the past, but IDK why only that file has survived in the exclusion list - I've converted several other files as well. Removing the <option> element and restarting WebStorm made the file visible in Find in Files again.
Yea, this ish is broken.
I did the cache rebuild and I still get only a subset of the actual matches when I search on my root project directory. It misses matches which I can find if I instead search on subdirectories further down in the project.
In other words:
my_project (search here for "food" and find some stuff)
- source
--- js (search here for "food" and get matches the other search missed)
It would help a lot if you report it at https://youtrack.jetbrains.com/issues/IDEA with the reproducible test case, thank you.
This is an awful bug - I am relying on this search to make sure that I'v made changes to all the required places and now I cannot be sure about it anymore... Invalidate cache / Restart did not solved the issue on my side. Serge Baranov I would send a report with a reproducible test case but I don't know how and when it happened. In my case it is not finding properly occurrences in .java files that I pulled from Git repository - I did not make any changes on the files and did not renamed them. In some of the files it is finding the searched word and in some not without any special "rule". These are the version details:
Is it always reproducible?
>In some of the files it is finding the searched word and in some not without any special "rule".
Please specify the location of such files in the project - are they located under the source roots? And what exact text is not found (a screenshot of the fin window with the results). Also provide logs zipped: Help | Compress Logs and Show in ... action.
If you use 3rd plugins, disabling them may help.
It is always reproducible yes - the .java class that is not shown in the results is in the src root structure. The phrase that I am searching for represents a DB table name and is of format {aaa}_{bbb}. The table name is placed in an @SqlUpdate annotation (JDBI) that is placed above a method. I am sorry but I cannot send screen shots or logs because of an NDA agreement. I have only one plugin installed - Bitbucket but imho it should not cause any issues.
Double check the search pattern is correct and there is indeed text that matches it. Check also other search cafeterias (like file types, directory etc).
In case it is not a search issue but issue with an index of project files more details would be needed to investigate further.
I had the issue. I could see cross icon appear those js files.
Lachlan Stuart's solution works for me !!
I have this severe problem as well (maybe the root cause is different), and invalidating caches or editing the `.idea` folder don't work.
So I created an issue on the bug tracker, with a reproducible case - https://youtrack.jetbrains.com/issue/WEB-42580.
I have the same problem with Find using ctrl-shif-f, but found a workaround.
At the bottom of the Find pane, if I click "Open in Find Window", it goes to the Find box in the same window as the editor, and finds all the occurences.
Same problem in PyCharm. I try to search for a file called Jenkinsfile.HCI_RTFI_Only, which is a Groovy script for Jenkins pipelines.
It's open in my PyCharm code window and it's listed in the Project view but PyCharm can't find it! This is horrible. I have invalidated cache and restarted too.
I'm using PyCharm 2019.3 on Mac OS X Mojave. I can find the file in terminal too.
If Intellij doesn't fix this I will go to another IDE and not pay them money for this not being fixed.
I can happily add further details.
Are there any exceptions in the logs when this issue occurs? Help | Compress Logs and Show in ...
Yes,
Here is the top of the java_errot_in_pycharm:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x000000011178a50f, pid=41786, tid=16387
#
# JRE version: OpenJDK Runtime Environment (11.0.4+10) (build 11.0.4+10-b304.77)
# Java VM: OpenJDK 64-Bit Server VM (11.0.4+10-b304.77, mixed mode, tiered, compressed oops, concurrent mark sweep gc, bsd-amd64)
# Problematic frame:
# V [libjvm.dylib+0x50250f] _ZNK4Node2inEj+0xf
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
--------------- S U M M A R Y ------------
Command Line: -Xms128m -Xmx2048m -XX:ReservedCodeCacheSize=240m -XX:+UseCompressedOops -Dfile.encoding=UTF-8 -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -ea -XX:CICompilerCount=2 -Dsun.io.useCanonPrefixCache=false -Djava.net.preferIPv4Stack=true -Djdk.http.auth.tunneling.disabledSchemes="" -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Djdk.attach.allowAttachSelf -Dkotlinx.coroutines.debug=off -Xverify:none -XX:ErrorFile=/Users/andresmfernandez/java_error_in_pycharm_%p.log -XX:HeapDumpPath=/Users/andresmfernandez/java_error_in_pycharm.hprof -Djb.vmOptionsFile=/Users/andresmfernandez/Library/Preferences/PyCharm2019.2/pycharm.vmoptions -Didea.home.path=/Applications/PyCharm.app/Contents -Didea.executable=pycharm -Didea.platform.prefix=Python -Didea.paths.selector=PyCharm2019.2
Host: MacBookPro15,1 x86_64 2600 MHz, 12 cores, 32G, Darwin 18.7.0
Time: Wed Nov 13 15:10:35 2019 MST elapsed time: 1288 seconds (0d 0h 21m 28s)
Also... Troubleshootig.txt
=== About ===
Build version: PyCharm 2019.3 Build #PY-193.5233.109 November 28, 2019
Java version: 11.0.4+10-b520.11x86_64
Operating System: Mac OS X (10.14.6, x86_64)
JVM version: OpenJDK 64-Bit Server VM JetBrains s.r.o
=== System ===
Number of CPU: 12
Used memory: 244Mb
Free memory: 535Mb
Total memory: 779Mb
Maximum available memory: 1979Mb
=== Displays ===
Displays:
Display 0: 1920x1080; scale: 1.00
Display 1: 3360x2100; scale: 2.00
=== Plugins ===
Custom plugins: []
Disabled plugins:[]
=====DEPLOYMENT SETTINGS=====
Default Server : null
=====ADDITIONAL SETTINGS=====
Exclude items by name : .svn;.cvs;.idea;.DS_Store;.git;.hg;*.hprof;*.pyc
Operations logging : DETAILS
Stop operation on the first error : false
Overwrite up-to-date files : true
Preserve file timestamps : true
Delete target items when source do not exist : false
Create empty directories : false
Prompt when overwriting or deleting local items : true
Upload changed files automatically : Never
Upload external changes : false
Override default permissions on files : -1
Override default permissions on folders : -1
Warn when uploading over newer file : NONE
Notify of remote changes : false
=====PERFORMANCE SUMMARY=====
Filesystem Info:
File system is case sensitive: false
Are there symlinks: true
Number of files: 4331
Project Info:
Number of opened files: 10
File size (in lines): 173
File size in characters: 6269
Number of injections: 0
=== About ===
Build version: PyCharm 2019.3 Build #PY-193.5233.109 November 28, 2019
Java version: 11.0.4+10-b520.11x86_64
Operating System: Mac OS X (10.14.6, x86_64)
JVM version: OpenJDK 64-Bit Server VM JetBrains s.r.o
=== System ===
Number of CPU: 12
Used memory: 249Mb
Free memory: 530Mb
Total memory: 779Mb
Maximum available memory: 1979Mb
=== Displays ===
Displays:
Display 0: 1920x1080; scale: 1.00
Display 1: 3360x2100; scale: 2.00
=== Plugins ===
Custom plugins: []
Disabled plugins:[]
Quite a few threaddumps in PyCharm:
let me know if I should create a separate bug report
This file is not relevant to the problem, you should check idea.log instead. Please upload at https://uploads.services.jetbrains.com/ and specify the archive name.
uploaded the logs: https://uploads.services.jetbrains.com/?_ga=2.3897266.325718693.1577988687-1621127371.1571439021
What is the uploaded file name?
pycharm-logs-20200103-103219.zip
What file type is Jenkinsfile.HCI_RTFI_Only file associated with? See https://www.jetbrains.com/help/pycharm/creating-and-registering-file-types.html .
Since PyCharm has no Groovy support and this extension is not mapped to any file type by default, IDE will consider this file as a binary and will not perform text search inside it.
Does it help if you map this file/extension file type to Text?
This is a text file that uses Groovy inside of it for Jenkins CI/CD pipeline.
If you have a reproducible test case for this issue, please zip and upload the sample project with the exact steps to trigger the bug.
I just (re)purchased pycharm and updated to 2019.3.1 from 2018.2.3. The Navigate > File menu is not working as expected. It is not matching any of my files. It's almost like it's searching _inside_ the files for the filename I'm typing. Any suggestions?
Please contact support with the logs attached (Help | Compress Logs and Show in ...) and the short video of the issue: https://intellij-support.jetbrains.com/hc/requests/new .