zazu-file-finder
zazu-file-finder copied to clipboard
File Finder isn't finding anything
Hello, I have a problem with the file finder. It's enabled in the config (using default config) but it isn't finding anything I search for. I'm on Windows 10. Am I missing a configuration here? (Plugin Debugger isn't logging anything higher than info-level)
What terms are you searching for? For instance if you are searching for an application "Chrome" it won't return results until the index has been created. If you are looking for a file such as "find resume.docx" it'll be on the fly and should search common folders recursively.
Both aren't working. How can I see if indexing is done?
The json file it creates will exist in:
~/.zazu/plugins/tinytacoteam/zazu-file-finder/data/applications.json
For find resume.docx
can you give me an example of a file you are trying to find and where it's located?
In my case on Linux one of the issues was permissions in my applications folder. The files weren't owned by my user account or group, so Zazu didn't index them.
Not sure that applies to Windows 10 as well. Something to check?
Sidenote: through trial and error I figured out that until I set the permission for "others" to none, Zazu wouldn't index the files. Even if you're the owner and group, if permission for others is enabled, even as read only, it doesn't work for some reason. Now it's working perfectly for me.
Before changing file and folder permissions:
http://cld.wthms.co/1hMqC
After changing file and folder permissions:
http://cld.wthms.co/ymnf
The ~/.zazu/plugins/tinytacoteam/zazu-file-finder/data/applications.json seems to be the index for applications, is there also one for the files? Just curious.
For kicks I booted into Windows and gave Zazu a try.
Initially, I wasn't able to see any programs. However, once I took ownership of the Program Files and Program Files (x86) directories, I was able to start them just fine.
Windows isn't my primary OS, so I wasn't worried about borking it, but YMMV.
I wasn't able to edit the security settings by right-clicking on the folder and trying to edit the permissions. So I went by the advice here instead:
https://superuser.com/questions/418381/windows-7-change-folder-permissions-when-options-are-greyed-out
Explanation: https://technet.microsoft.com/en-us/library/cc753024(v=ws.11).aspx
Start a command prompt as administrator
Enter the following two commands:
takeown -f "c:\Program Files" /r /d y
and then:
takeown -f "c:\Program Files (x86)" /r /d y
That will take ownership recursively of both directories. Depending on how many files there are, it could take awhile.
I forgot to record a before video, but this is after taking ownership:
http://cld.wthms.co/m3td
I'm experiencing the same thing on W10. When i took ownership of the program folders, this solved the indexing problems with the applications but i still can't find any files. Any tips?
I think for Linux users this will fix most #13
Applications .desktop files need some work... Still not sure if it should be in this repository or stand on it's own
@JeroenBoersma does that mean I could theoretically just install everything, including my Steam folder, to ~/bin and Zazu will pick up the executables?
And/or add /usr/local/bin to my directories.js?
I wanted to test out the permissions on the file/open search in Windows 10.
I created three folders named Test. One in my home directory, one in C:\Test, and one in D:\Test. I took ownership of all three.
Then I added C:\Test and D:\Test to my directories.js manually.
I put a file named Bills.xlsx in all three Test directories. Then I reloaded the plugins and relaunched Zazu.
Expected Behavior
Launch Zazu. Type open/find bills. List of results come up that include the bills.xlsx. Type open/find test. List of results come up that include the Test directories.
Actual Behavior
Launch Zazu. Type open/find bills. No results. Type open/find test. No results.
Steps to reproduce the behavior
Launch Zazu. Type open/find bills or open/find test. Make a cup of tea just in case. No results, but tea is delicious.
Versions
- Zazu: 3.2
- OS: Windows 10
- GIT: 2.11 zazu.log.2017-01-11.txt directories - Copy.js.txt
@cecoates https://github.com/tinytacoteam/zazu-file-finder/issues/12#issuecomment-271741862
Everything in your ~/bin would be indexed if it has the correct permissions. I think /usr/games and /usr/local/games should be added too by default.
For those .desktop file on Linux.. I think it needs some extra work, ideas are already in my head(I think I can fix this, but it'll take a couple of days)
Sorry for the delay on this topic.
I looked at: ~/.zazu/plugins/tinytacoteam/zazu-file-finder/data/
and the direcotry is completly empty (only a .gitkeep
file inside).
Zazu: 3.2 OS: Windows 10 Insider Preview 15002 64 bit GIT: 2.11
I want to add that I am seeing similar issue on Windows 7. Zazu does appear to have indexed my applications, and there is an applications.json file in ~/.zazu/plugins/tinytacoteam/zazu-file-finder/data. However, searching for files/documents does not return results.
Zazu version: 3.2 Windows 7 Enterprise 64 bit Git 2.10.1.windows.1
Same error on Mac 10.11.6 (Capitan). Zazu doesn't find anything. The data folder is empty (only .gitkeep). I've changed the folder permissions to 777 but no file is created.
My config file looks like this:
{
"name": "tinytacoteam/zazu-file-finder",
"variables": {
"append": false,
"directories": {
"appPath": [
"/Applications"
]
}
}
}
Missing data\application.js
might because an error happened in the appCache.js
execution.
So, if you found data
folder is empty(except .gitkeep
), could you try run the following command under ~/.zazu/plugins/tinytacoteam/zazu-file-finder/
directory:
node appCache.js '{}'
And paste the result here please.
Here is the error:
./appCache.js:8
const { cwd } = pluginContext
^
SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
@x4vl that is caused by running it with the wrong node version, try switching to v6.5.0. This is easier with nvm, if you don't already have it. Thanks for helping debug this!
Hi, uhm, the plugin isn't finding anything for me too :/ I'm on Windows 10.
Mac 10.12.3 Sierra. I can search apps but I'm not able to search documents/file/etc. Maybe It will be good to recommend a "basic" mac installation. Thanks for the awesome product.
The same thing here... Only apps!
Windows 10 Default plugin installation.
@EvoWizz Could you check the comments above and give more information? is there a data\application.json
, and if not, what's the node appCache.js '{}'
output?
@setegonz @scheduardo If you can search app, but not documents/files, maybe it's another issue, could you provide the Zazu log under .zazu\log\
, thanks.
@scheduardo Thank you, there isn't any errors in the log indicating why fileFinder is not working, which is a problem, I will try to fix error logging problem first.
In the meantime, could you try node fileFinder.js 'planejamento' '{}'
under .zazu\plugins\tinytacoteam\zazu-file-finder\
directory and paste the output here? I think there might be some errors during the execution of this script.
@twang2218
undefined:1 '{}' ^
SyntaxError: Unexpected token ' in JSON at position 0
at Object.parse (native)
at __dirname (C:\Users\eduar.zazu\plugins\tinytacoteam\zazu-file-finder\fileFinder.js:45:52)
at Object.
@scheduardo Oops, does Windows not support quote in command line? sorry about that, I'm not using Windows anymore ;)
Could you try the command without the quote?
node fileFinder.js planejamento {}
No problem 😆
(node:12824) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: EPERM: operation not permitted, scandir 'C:\Users\eduar\Ambiente de Impressão'
PS: "Ambiente de Impressão" is "Printing Environment" in portuguese!
The error means listing folder contents of C:\Users\eduar\Ambiente de Impressão
is not permitted.
There are 2 possible reasons, one is that there is a Anti-Virus software blocking the way, another reason is that it is missing the listing permission.
For the AV software, maybe you can turn it off and try again.
For the missing permission problem, you can right click C:\Users\eduar\Ambiente de Impressão
folder, (or C:\Users\eduar
folder), then click Properties
, then Security
tab, then click the current user (or the group), and check the permissions below, if it is missing the List folder contents
, then check it and apply. Then try again.
@twang2218 Hi, I don't have the application.json
file, and running the command node appCache.js '{}'
doesn't work, the cmd tell that the command isn't recognized [...] Any idea to make the command working?
@EvoWizz Could you paste the output here? so I can see what exactly the error is. And could you check your node version by node --version
? You might have an outdated node version, I think node version should be 6+ to support ...
expansion.
@twang2218 I've updated node and it's working now, thanks :) So here is the output of the command node appCache.js '{}'
:
undefined:1
'{}'
^
SyntaxError: Unexpected token ' in JSON at position 0
at JSON.parse (<anonymous>)
at __dirname (C:\Users\XXX\.zazu\plugins\tinytacoteam\zazu-file-finder\appCache.js:50:52)
at Object.<anonymous> (C:\Users\XXX\.zazu\plugins\tinytacoteam\zazu-file-finder\appCache.js:59:3)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.runMain (module.js:605:10)
at run (bootstrap_node.js:418:7)
@EvoWizz Windows seems not support quoting, so please run the command without quoting, node appCache.js {}
.