Skip to content
This repository has been archived by the owner on Nov 29, 2020. It is now read-only.

Failure to generate an Hmac #75

Open
plafosse opened this issue Nov 15, 2016 · 6 comments
Open

Failure to generate an Hmac #75

plafosse opened this issue Nov 15, 2016 · 6 comments

Comments

@plafosse
Copy link

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.

@seanchann
Copy link

same problem!

@ccnokes
Copy link

ccnokes commented Jan 24, 2017

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

@Qusic
Copy link
Owner

Qusic commented Jan 26, 2017

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

@mozfreddyb
Copy link

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

@Qusic
Copy link
Owner

Qusic commented Jan 26, 2017

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.

@seanchann
Copy link

rebuild ycmd work fine

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants