New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Username and password required #204
Comments
Hmmm...is it possible that you've got some old |
I deleted the two packages through the |
Yep, it certainly seems to on my machine. I'll see if I can replicate what you're seeing. |
Any news? |
I'm afraid not. I can't replicate what you're seeing. As you've pointed out, this has the exact feel of an earlier defect which had to do with server/client mismatch. If you do |
The command opens |
And once emacs has started |
Seems like it.
|
Note that I'm also recently seeing an increased number of users reporting this problem. I can't repro myself, though... Server/client versions definitely match for those users, as we do an internal packaging / rollout. |
I experienced this too, but I don't have a repro. The issue just appears and if I close the server buffer or the current buffer it disappears. |
@Valloric for ideas |
Zero ideas, sorry. Something in emacs is sending requests to ycmd without the correct x-ycmd-hmac header. That's the best I got. We also know it's not a ycmd issues because to the best of my knowledge, this has never happened with YCM. |
This one is a doozy. I'm now able to reproduce the bad behavior to a degree. Essentially, there appear to be certain problematic HMAC values, and if we randomly generate one of them then YCMD and emacs seem to disagree on the HMAC value. The bad-hmac branch has a replacement for Could someone(s) please try this out and report if the "bad" HMAC value there reproduces the problem on their machine? If it does, then I think we're on the right track. If not...I might retire and become a florist or something... |
@abingham I can reproduce the problem with the "bad" hmac value. I get a prompt for entering username and password |
Notes to myself: I was able to collect a few HMAC strings which produce the bad behavior. Each of these lists of 16 bytes are "bad" HMAC secrets:
One pattern I've noticed is that each of them contains Possibilities: encoding issue with options file. Bug in hashing on one side of transaction. Bug in construction of content to be hashed. |
@abingham I too can reproduce the problem in the bad-hmac branch, but there's still something strange:
When I now use the "good" value it's not working anymore. |
@halbtuerke I'm not sure what's going on there, but I think I've got a fix to the underlying issue. Try out the hmac-fix branch and let me know if that fixes things. With this fix in place, I haven't been able to reproduce the error, even with known bad HMAC secrets. @ptrv Could you give it a try, too? |
For certain kind of files it seems to work and for others it still prompts for credentials. Here's the log of the ycmd-server: https://gist.github.com/62653163984561f97211 I have opened 3 different C++ files and 1 worked with completion. |
Hmmm. If you change line 1018 from:
to just:
does the problem persist? And do you have any non-ascii characters in your source files? |
After making this change I don't get prompted for credentials but I get the following messages:
Also the parsing never stops so I don't get completions.
Yes, there are german umlauts in some of the comments. In the file that previously worked there should only be ASCII characters. |
Ah, right, you're on emacs 25. We've seen this before, and it was in fact what motivated us to do the |
On the As you can probably tell, I'm flailing a bit here. With multiple emacs version and some apparent bugs/idiosyncracies in functions, it's hard to keep track of what might work, etc. |
Yes, this helps when the buffer consists only of ASCII characters. I deleted all german umlauts in one of the files and now it's working with |
OK, thanks for checking. I haven't had any problems with umlauts or non-ascii Norwegian characters on 24, so something's definitely fishy in 25. We obviously need to work with non-ascii text, so we need to sort this out. Unfortunately, with EuroPython coming up, I don't have any more time to work on this right now, and probably not for the next week or so. Perhaps somebody can sort it out, and I'll try to come up with more ideas in the meantime. |
Ok, thanks. |
I couldn't put this down as easily as I'd thought. I got my hands on emacs-25 and might have sorted this out. Try out the hmac-fix-emacs25 branch. |
It seems to work now. 🎉 |
OK, that's good news. The issue now is that the change does not appear to work for emacs 24, so we'll need to come up with some way to support both versions. @r4nt If your emacs 25 users are having problems, it should be safe to switch them over to the hmac-fix-emacs25 branch. @ptrv You want to take a try at cooking up a cross-version solution? I may not have time to look at it for more than a week. |
@abingham - will that also be safe for my emacs 24 users? |
@r4nt No, it will break 24. So unless you can support two version easily, you'll need to wait until we have that built into the package. |
@abingham @halbtuerke I could repro the issue by inserting german umlauts into a buffer. With the changes in hmac-fix2 the issue seems to be fixed in Emacs 24 as well as in 25 at least on my machine. |
@ptrv I tested it with the same files as before and it seems to work with Emacs 25. No prompts for credentials and auto completion with company works. 👍 |
@halbtuerke Great to hear! @r4nt Is it possible for you to try out the hmac-fix2 branch on Emacs 24 and let me know if it's working? |
Works for me. |
(that's on emacs 24.3.1) |
@r4nt thanks for testing. but there are some issues with non-ascii characters in filenames and in the code |
This seems to be fixed :) |
I have ycmd configured to work in C++ buffers and everytime I open a buffer I get asked for a username and password.
My ycmd-config file can be found at https://gist.github.com/halbtuerke/66004fbd5730d0dbcb9a
I have ycmd (20150626.109) and company-ycmd (20150514.534) from Melpa installed and I'm using GNU Emacs 25.0.50.1 built 2015-06-19 on OS X 10.10.3.
I installed
ycmd
the following way:ycmd
(796519f7a01ca9b5151d77058ab3985f9f9c2809) to~/bin/ycmd
git submodule update --init --recursive
./build.py --clang-completer
After pressing C-g to cancel the username prompt this can be found in the Messages buffer:
And this is the ouput of the
ycmd-server
buffer:I found ycm-core/ycmd#115 but as described above, I used the latest versions available of everything and unfortunately it does not work.
If you need any additional information please let me know.
The text was updated successfully, but these errors were encountered: