atom-youcompleteme icon indicating copy to clipboard operation
atom-youcompleteme copied to clipboard

Failure to generate an Hmac

Open plafosse opened this issue 7 years ago • 6 comments

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.

plafosse avatar Nov 15 '16 20:11 plafosse

same problem!

seanchann avatar Jan 12 '17 03:01 seanchann

Same problem here too. How do I go about debugging this?

ccnokes avatar Jan 24 '17 21:01 ccnokes

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

Qusic avatar Jan 26 '17 03:01 Qusic

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.)

mozfreddyb avatar Jan 26 '17 11:01 mozfreddyb

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.

Qusic avatar Jan 26 '17 14:01 Qusic

rebuild ycmd work fine

seanchann avatar Feb 07 '17 07:02 seanchann