Closed martinbaranek closed 4 years ago
Thank you for reporting this.
Which os are you using?
Win 10 1903 Ultimate. Python 3.7 installed only (without Anaconda)
It would be great if you can download the latest tabnine binary here. You can download it to any folder you want.
Run it on the command line. If it works correctly it should just sit waiting for user input.
Paste this as its input
{"request":{"Autocomplete":{"before":"tabnine::version","after":"","filename":"a.js","region_includes_beginning":true,"region_includes_end":true,"max_num_results":5}},"version":"2.0.2"}
If it works correctly, it should return a json containing 2.5.1 as the version.
It it emits an error at any point, paste it here, and we'll take it from there.
Thanks a lot!
I've tried to run it in powershell (admin mode and non-admin mode) and instantly after i ran ./TabNine.exe it started returning: PdhCollectQueryData error: 800007d5 0x13ba1c0 repeatedly.
Just to make sure, can you run it in the regular windows command line and not in powershell?
It is more similar to how it is run from an editor
Thanks
Here you go.
One more thing - Can you close all editors that have a tabnine plugin, then run again from the command line, and see how many tabnine processes you see? There should be two
Thanks
Yes, works. After launching the .exe, two TabNine.exe show up in task manager.
But the error persists, right?
Yes, still the same error. Does not matter whether cmd/powershell.
Thank you for your input. Investigating this error.
Could this be a permissions issue? Is your user limited in some way that you are aware of?
Not really, the cmd i've sent was run under admin privileges. Running just basic windows defender AV, and 2.2.2 version works just fine.
Yes, the code that uses the PdhCollectQueryData was added in 2.3.
Can you run the windows command line "as administrator" and see if it works?
Is there any "intermediate" version (like 2.5.0) binary, so i could check when the bug appears? (I'm git beginner, I've found just the 2.2.2)
Already done, does not work. (Check the image i've sent before, it's Admin: command prompt)
@martinbaranek I'm pretty sure it will reproduce with 2.3.2.
Can you try running the windows command line "as administrator" and see if it fixes the issue?
Oh, nevermind, the 2.3.2 works.
what about 2.3.7?
2.3.7 throws the same error as 2.5.1. So it's definitely between 2.3.2 and 2.3.7
I'm guessing TabNine.exe has a lower integrity level because it was downloaded, and so does not inherit the administrator priveleges.
Can you try using a tool like chml to check the TabNine.exe integrity level and change it?
Can you temporarily lower UAC and see if it fixes the issue?
I have UAC turned off completely since the beginning.
Oh, that changes everything :-)
Can you open perfmon, and try to monitor %CPU for the TabNine process? (I can send moredetailed instructions if needed)
On i5-7200u (2 cores, 4 threads) 2.5.1 exe: Error, 15% CPU (constant load, varies between 10-20%, did not stop after 2 minutes)
OK, Thank you.
I'll try to reproduce it on my own windows machine with all the data you gave me. Hope I can fix it soon, I'll keep you updated
Great! If you need any testing, I'm available most of the time.
Great!
Thanks a lot for all your help and responsiveness.
One last question - are you an administrator of the machine you are running on?
I am not logged in as the "hidden windows superadmin", but i have admin privileges, and ran all the commands from admin command prompt (cmd -> run as admin)
Sorry, one more thing.
Can you run TabNine --inner
and see if this way it works?
Yes, it works on 2.5.1! No error, returns {"old_prefix":"","results":[{"new_prefix":"2.5.1","old_suffix":"","new_suffix":""}],"user_message":[],"docs":[]}
I'll explain what's going on, and maybe you can figure out what's going on on your machine.
When you run TabNine, it is basically a monitor process.
It runs TabNine --inner
as a child process, and monitors it for CPU, using performance counters.
I tested it on my windows 10 machine, as an admin user and a regular user, with UAC enabled or disabled. On my machine it always seem to work.
On your machine, trying to collect performance counter returns PDH_NO_DATA (0x800007D5). According to the docs, this might happen when running without an elevated token, but you have UAC disabled and you are an admin, so that does not seem to be the case.
Any idea what's different between our machines? Maybe you have some security software that recognizes this is a downloaded binary and limits its access or something like that?
Ah, I have just found out - I am sorry for misleading info - i have disabled notifications about UAC, but not UAC itself. Maybe is that a difference?
To my knowledge, that is how you disable UAC. I know the wording is "disable notifications" but I think it actually means "Do not block when...".
Any other security software there? Antivirus? something else?
No, only Windows defender. I treid to disable it completely, did not help. There was a security warning on the file, but i checked it, the security disappeared, but still not working.
I can start sending you binaries disabling some code, to check exactly which line of code causes the error. It will require probably some back and forth several times, to nail the exact line of code. Will that work for you?
OK. I've maybe found the problem, and you're probably not in fault in here: I have never seen this before. I will do reboot (since I am so stupid i haven't done it before i posted it here :( ) and will give you results. Maybe windows something freaked up in recent update.
maybe this will help?
maybe this will help?
On second attempt, restoring the values doing that tutorial fixed problems in performance monitor and also fixed running TabNine (2.5.1 now does not throw errors and returns nice JSON).
I am really sorry that my crappy windows took so much of your time. I don't know, what caused it. I will try to reinstall it in Sublime and will close this thread if it works. THanks for your help!
Glad to hear!
Do not worry about it - I'm pretty sure you are not the only one with this issue. On my end, I'll try to reproduce, and see if I can recognize the situation in code, and make sure TabNine functions even in such a case.
Thanks for all your feedback and troubleshooting
Everything works, TabNine auto updated to 2.5.1, config web browser window successfuly opens.
So it was the bad pointers so system wasnt able to read memory/CPU data. cmd lodctr /r fixed it. Thanks again for everything and I am glad I could help you a little bit.
After fresh install of Sublime 3 v3211 and package TabNine 2.5.1, i got error: Started TabNine v2.5.1 Failed to communicate with TabNine subprocess: No JSON could be decoded (i forgot to save the error). and this goes over and over. Tried to manually clone repo with 2.5.1, same error. Issue fixed with installing older version - TabNine v2.2.2 and denying write access to binaries (to stop auto-update). 2.2.2 seems to be working, no error in sublime console.