Summary: | GitHub is never authorized Kubuntu 16.10 no crash | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | David Oldford <david_oldford> |
Component: | Project provider: Github | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | junior-jobs |
Priority: | NOR | ||
Version: | 5.0.2 | ||
Target Milestone: | --- | ||
Platform: | Appimage | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kdevelop/cc395b8fb25d6b3b7a6e8a3afa05eac51e91ae05 | Version Fixed In: | 5.0.3 |
Sentry Crash Report: |
Description
David Oldford
2016-11-06 15:54:03 UTC
I can't believe it took me this long and this many combinations and permutations to figure this out... I looked in my github settings and found the personal access tokens. There was one for kdevelop. I deleted it and then was able to authorize successfully on my main machine and not in my vm... It would appear that kdevelop always tries to use the same name for an access token and github doesn't like regenerating the same thing over and over again. I would be a corner case user who uses (or wants to use at this point :) ) kdevelop on multiple machines. It should be pretty easy to fix by adding the hostname and a nonce to the end of the token name when it is generated with github (I assume...). Thanks for the analysis, David! Marking this as a junior job, sounds like something a newbie to KDevelop development could work on. Patches welcome! https://www.kdevelop.org/contribute-kdevelop No problem. BTW in my research I did find this https://bugs.kde.org/show_bug.cgi?id=360589 which I didn't think was a duplicate because it was on windows and it involved a crash but now that I figured out what has been happening on linux I figure at least part of that bug is based on the same thing and related memory handling could be causing the crash potentially. If it's still unresolved after I finish a few papers and labs I might try my hand at it (though I am unfamiliar with the code base and have allowed an irresponsible number of papers and labs to build up :) ). The only real difficulty (aside from familiarity with kde and qt,) is balancing creating way too many tokens with not failing when someone has multiple installations of kdevelop or if they authorize and uninstall then reinstall (assuming the config is deleted). I think I'd just append the hostname and username to the token and ask the user how to proceed if there is already a token with the same name allowing them to customize the name if they want (I'd actually be a bit of a corner case here too as I dual boot and use the same host and usernames in each OS on the same physical machine). I just submitted a proposed patch for this https://phabricator.kde.org/D3395 Git commit cc395b8fb25d6b3b7a6e8a3afa05eac51e91ae05 by Kevin Funk. Committed on 17/11/2016 at 23:48. Pushed by kfunk into branch '5.0'. GitHub: Improve authentication handling Make sure we create a unique token name per KDevelop session. Initial patch by David Oldford, thanks! Split up the patch; bug fix goes to 5.0, changes to user-visible strings go to master. Related: bug 360589 FIXED-IN: 5.0.3 M +3 -1 providers/ghprovider/ghdialog.cpp M +1 -1 providers/ghprovider/ghdialog.h M +16 -4 providers/ghprovider/ghresource.cpp M +5 -2 providers/ghprovider/ghresource.h http://commits.kde.org/kdevelop/cc395b8fb25d6b3b7a6e8a3afa05eac51e91ae05 |