atom-youcompleteme
atom-youcompleteme copied to clipboard
Failure to generate an Hmac
I get the following error in Atom each time YCM attempts to run: TypeError: Key must be a buffer at TypeError (native) at new Hmac (crypto.js:90:16) at Object.Hmac (crypto.js:88:12) at generateHmac (/Users/peterl/.atom/packages/you-complete-me/lib/handler.coffee:102:12) at signMessage (/Users/peterl/.atom/packages/you-complete-me/lib/handler.coffee:113:65) at /Users/peterl/.atom/packages/you-complete-me/lib/handler.coffee:164:7
Atom version 1.12.3. YCM Version 0.7.11 - OS MacOS Seira 10.12.1. YCM Installed through Vim using Vundle.
same problem!
Same problem here too. How do I go about debugging this?
I think I have fixed it and have no ideas why the issue persists. If you would like to help and look into it, you should check if this mechanism to keep ycmd server alive works correctly for you: https://github.com/Qusic/atom-youcompleteme/blob/master/lib/handler.coffee#L89-L98
I'd love to help debugging this. I know JS but coffeescript confuses me. Can you suggest some console.log statements or a even tiny patch I could add locally?
(I'm happy to debug live on IRC (freddyb on mozilla-irc, freenode, efnet during EU daytime) if that helps.)
If you know js then coffeescript is quite easy to pick up. http://coffeescript.org/
This error occurred because prepare
might be incorrectly resolved when it is called while the server is still in the process of launching, which results in an empty secret
. But after this commit, it has been working well for me.
Basically you can set a breakpoint here and check why the secret
doesn't get a valid value.
rebuild ycmd work fine