Skip to content
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

Can't sign in to the ActiveState Platform in Komodo IDE 12 #3817

Closed
jimtut opened this issue Jan 5, 2020 · 36 comments
Closed

Can't sign in to the ActiveState Platform in Komodo IDE 12 #3817

jimtut opened this issue Jan 5, 2020 · 36 comments
Assignees
Milestone

Comments

@jimtut
Copy link

jimtut commented Jan 5, 2020

Short Summary

I installed the new Komodo IDE 12, and created an AS Platform acct. I can sign into the Platform on the web, but when I try to use the same creds in the IDE, I get an error.

Steps to Reproduce

Launch IDE, log into Platform

Expected results

Platform login, IDE opens

Actual results

Error message "Saving private key failed with: You are not authenticated. Please restart Komodo is this problem persists.". Cancelling the login after this closes the IDE, so I can't even use it! Restarting Komodo always gives the same results.

Platform Information

Komodo Edit or IDE? IDE
Komodo Version? 12
Operating System (and version)? macOS 10.13.6

Additional Information

IDE won't stay running long enough for me to access this menu.

@jimtut
Copy link
Author

jimtut commented Jan 6, 2020

Some additional info. I repeated the same install on my Windows 10 laptop, and get the exact same error, using the same Platform login.

I actually have an additional Platform login thru my company, and I tried using that login (both as email and as a username), and I still always get the same error.

I don't think Komodo 12 is working at all...

@th3coop
Copy link
Member

th3coop commented Jan 6, 2020

@jimtut sorry for the frustrating experiencing.
Please grab / check the following:

  • After starting Komodo and producing the login fail:
  • confirm the state tool was installed.
    • On Windows: %AppData%\ActiveState\bin\state.exe
    • On OSX: ~/Library/Applicatation Support/KomodoIDE/12.0/XRE/state/state
  • See if the state tool is available in a terminal:
  • open a terminal and run which state
    • IF it's available, run state --version and send me the info. Also try logging in with it.
    • ELSE try to login to the platform using the relevant install path I listed above.

That should give us some good info to work from.

@jimtut
Copy link
Author

jimtut commented Jan 6, 2020

I've attached all the logs from the previous failure here.
pystderr.log
pystdout.log
log.txt

State tool is installed: C:\Users\tuttlj\AppData\Roaming\ActiveState\bin\state.EXE

Version:
ActiveState CLI version 0.2.2-3479
Revision ba4b6770ac4143cb0e0cfec39e381881291a2ac3
Branch unstable
Built Sat Jan 4 2020 00:01:02 +0000 GMT

I just tried "state auth" and got:

Keypair generated successfully
You have successfully authenticated, hello jtuttle!

After using state.exe to sign in, I was able to launch Komodo 12, sign in again in the UI, and it worked! I can access the full IDE now. I'll repeat on the Mac later, but this might be a good workaround for now...

@th3coop
Copy link
Member

th3coop commented Jan 6, 2020

@jimtut, thanks for reporting back so quick. Could you use the state tool to log out in the terminal the Help > Troubleshooting > Restart in Safe-Mode in Komodo? You should get the login dialog again. Please let me know if you get the same error.

Note to self: The terminal session shouldn't effect the Komodo authentication. Looking at the code it looks like we might be throwing away the error coming from the state tool when we try to grab your auth key after the login dialog succeeds. I've pushed a patch to not over write that error output:
https://github.com/Komodo/KomodoIDE/commit/d323b4093b004de1846a3dd5f19d35966975815c

@jimtut
Copy link
Author

jimtut commented Jan 7, 2020

I launched my original Komodo IDE 12 again, and it did NOT prompt to login, and came right up. I did "state auth logout", and then restarted in Safe Mode. Komodo prompted me to go thru the init screens again (Color Scheme, etc.) and then prompted me to login.

The login failed, but the error was actually different this time!
Saving private key failed with: You need to be authenticated to run this command. Authenticate by running 'state auth'.

@jimtut
Copy link
Author

jimtut commented Jan 7, 2020

Oh, the linked patch above is not available, at least not to me.

@th3coop
Copy link
Member

th3coop commented Jan 7, 2020

Oh, the linked patch above is not available, at least not to me.

The IDE repo is private. That comment was a "note to self". The patch won't help any way. I've reverted it since.

I had a look through the code and I unfortunately asked you to grab the wrong log file for the state tool. On Windows it will be in [your Komodo profile folder]\XRE\state\log.txt.

I'm going to get you to test this slightly differently too:

  • stop Komodo
  • open a cmd terminal
  • run the following commands
    • > set VERBOSE=true
    • > set KOMODO_USERDATADIR=C:\path\to\some\temp\dir
  • Start Komodo from this terminal, should just be able to type komodo and press enter.
  • Reproduce the issue and when the error is in the dialog, grab the log file mentioned above but make sure you look in the %KOMODO_USERDATADIR% you set.

I have to ask one dumb question: When you get that error, have you tried clicking Sign In again?

I've spent a good few hrs trying to reproduce this issue in numerous ways but am having no luck. Thanks fully so far you seem to be special in reproducing this.

@jimtut
Copy link
Author

jimtut commented Jan 8, 2020

To answer the not-so-dumb question, yes, I had tried to repeatedly login using the dialog (without closing it).

But, something has changed (at least on my PC) since using the state tool and restarting in Safe Mode. Whether using regular mode or Safe Mode, I can now login thru the IDE/UI to the state platform. I will try on my Mac tonight to see if that's working. I'm attaching the new/temp state log, in case that's helpful.

But, unless I can repeat this on my Mac tonight (and I haven't done ANY of the state tool or safe-mode actions there), I doubt the log will show you much.
log.txt

@th3coop
Copy link
Member

th3coop commented Jan 8, 2020

@jimtut thanks for the heads up and new logs. Nothing helpful in those logs unfortunately. That's a pain but not your problem. At least we've got you up and running. Thanks for your patience!

If anyone else comes across this, please grab the logs mentioned in this comment:
#3817 (comment)

@jimtut
Copy link
Author

jimtut commented Jan 9, 2020

Some more info from my Mac:

  • I still can't login directly on my Mac

  • The state tool does not exist, at least for me. The directory ~/Library/Application Support/KomodoIDE/12.0/XRE/state/ exists, but it's empty.

  • I renamed the existing 12.0 dir above, relaunched from the Finder icon, and got the same login error (and still nothing in the state/ dir).

  • I was going to try the verbose stuff above, but before that, I decided to try launching komodo from the Mac Terminal. When doing so, several "good" things happened:

  1. I was able to login!
  2. The state/ director finally got populated, with the state tool and a log file (attached)
  3. Closing komodo (the one launched from the Terminal) and then relaunching from the Finder icon allows the IDE to open (no more login prompts).
    log.txt

My (amateur) conclusions:

  1. The Mac problem was solved by launching from komodo from the Terminal, which finally installed the state tool and allowed me to login.
  2. The Windows problem seemed to be solved by running the state cmd, although it's possible that I launched Komodo once from the command-line right before trying "state". So, it's possible that it's the same underlying problem, you need to run komodo from the command-line in order for the state tool to get properly installed.

I only have my Mac right now (back at home), but I can confirm my conclusion #1 above is correct by removing that 12.0 dir in App Support (and thus removing the state dir). When launching Komodo from the Finder, the state tool does NOT exist after going thru the init screens, and I can't login.

But, when launching from the Terminal, the state dir is created during the init process, and then the state executable is copied into that that dir. But, when launching a fresh install from the Finder, only the state dir is created, the state executable is not copied.

I'd bet the same thing happened on Windows too...

@th3coop
Copy link
Member

th3coop commented Jan 9, 2020

I'd bet the same thing happened on Windows too...

I'll try this right now. Thank you very much for the follow up @jimtut.

@th3coop
Copy link
Member

th3coop commented Jan 9, 2020

No dice on Windows. And the repro steps don't work on Mac either :(

@th3coop
Copy link
Member

th3coop commented Jan 9, 2020

I'll have another go at this tomorrow with fresher eyes.

@shawnlaffan
Copy link

I get the same issues on Windows.

If I run Komodo 12 from a Cmd prompt, with the variables set as per #3817 (comment) then it starts.

However, there is no state tool under %AppData%\ActiveState\bin\state.exe (the folder is empty).

Requested ...\XRE\state\log.txt attached.

log.txt

@th3coop
Copy link
Member

th3coop commented Jan 10, 2020

@shawnlaffan what does where state output in CMD?

Nothing helpful in those logs unfortunately. Can you confirm that you were having the exact same issue in that every time you started Komodo using the method other than CMD, the login dialog would error out? Are you able to now start Komodo in the non-CMD flow, with a reset profile, and have the login dialog work?

@shawnlaffan
Copy link

@th3coop -

Yes, I have the exact same error each time I try to log in using the start menu.

I cannot start Komodo 12 from the start menu or by double clicking on C:\Program Files (x86)\ActiveState Komodo IDE 12\komodo.exe.

The state tool exists after I run Komodo 12 from the Cmd prompt, but running Komodo 12 from the start menu deletes it (presumably related to the failed login?). It takes a while to appear, but presumably it's late in the startup processes.

I renamed both %APPDATA%\Local\ActiveState\KomodoIDE\12.0 and %APPDATA%\Local\ActiveState\Komodo IDE\ActiveState Komodo IDE 12 (assuming that will reset the profile) and tried again, and the error persists.

If it's a relevant long shot, I also have Komodo 11 installed on this machine and there are profiles going back to 10.0.

@th3coop
Copy link
Member

th3coop commented Jan 10, 2020

Yes, I have the exact same error each time I try to log in using the start menu.

@shawnlaffan Perfect. Can you share the log.txt file when this happens? The last logs you shared were from a successful login which isn't going to tell us much.

@shawnlaffan
Copy link

@th3coop -

I deleted the profile folder C:\Users\user\AppData\Local\ActiveState\KomodoIDE\12.0\XRE and then tried running komodo from the start menu. There is no state folder under ...\XRE.

@th3coop
Copy link
Member

th3coop commented Jan 10, 2020

Are you prompted to login again and that is successful?

@shawnlaffan
Copy link

Sorry, forgot to say the login fails with the same error.

The state tool is now generated and retained under C:\Users\user\AppData\Roaming\ActiveState\bin. The deletion I reported might be an interaction with the differing profiles used.

@th3coop
Copy link
Member

th3coop commented Jan 11, 2020

Ok, that's interesting. So the follow seems to be the flow

  • Start Komodo
  • state tool get installed, as expected, to C:\Users\user\AppData\Roaming\ActiveState\bin
  • Login proceeds but fails with You are not authenticated. Please restart Komodo is this problem persists (please confirm that, there have been two errors reported so far)
  • no [profile dir]\XRE\state folder is created

If it's a relevant long shot, I also have Komodo 11 installed on this machine and there are profiles going back to 10.0.

Definitely worth noting. I double checked to see if profile upgrading might be causing this but I still can login no problem from the Start menu when I remove the 12.0 folder and get Komodo to upgrade my 11.0 folder to 12. So no dice there. It would be worth you trying to renaming %OCALAPPDATA%\ActiveState and starting from the Start menu (This is essentially setting KOMODO_USERDATADIR in the cmd prompt but that's more of a pain when not in a prompt).

I'm gonna have a look at the code again give the flow mentioned above.

@shawnlaffan
Copy link

My error message is "Saving private key failed: You are not authenticated. Please restart Komodo if this persists". This is the same as reported by @jimtut in #3817 (comment)

Renaming %LOCALAPPDATA%\ActiveState gives me an error due to a file or folder being open in another program. There's nothing Activestate or Komodo related that I can see under the task manager, and I have nothing else open except firefox. I'll try rebooting and report back.

@th3coop
Copy link
Member

th3coop commented Jan 11, 2020

@shawnlaffan could you also grab you pystderr.log file from your profile next time you reproduce this? I think I see something in the logs that @jimtut shared now that I look (desperately) again.

@shawnlaffan
Copy link

@thcoop - after rebooting I can rename %LOCALAPPDATA%\ActiveState. After that, Komodo 12 starts up properly and I can log in. Komodo 11 also starts.

The pystderr log is attached from the renamed %LOCALAPPDATA%\ActiveState\KomodoIDE\12.0.

pystderr.log

@th3coop
Copy link
Member

th3coop commented Jan 11, 2020

CLUES! @shawnlaffan can you zip up your original %LOCALAPPDATA%\ActiveState and send it to careyh@activestate.com?

@shawnlaffan
Copy link

Can do. It's 1.04GB uncompressed, though. Do you need the whole thing, or just the 11.1 and 12.0 components?

@th3coop
Copy link
Member

th3coop commented Jan 11, 2020

Just the 11.1 and 12 folders will be fine, thanks @shawnlaffan.

@shawnlaffan
Copy link

Thanks @th3coop . Zip file has been sent using Cloudstor file sender.

@th3coop
Copy link
Member

th3coop commented Jan 13, 2020

100% reproducible with this profile. I don't think I've ever been so happy in my entire life. Thanks @shawnlaffan. Digging into the code to see what's going on.

@th3coop
Copy link
Member

th3coop commented Jan 14, 2020

@jimtut, do you have your PATH system var overwritten in Edit menu > Preferences > Environment?

@jimtut
Copy link
Author

jimtut commented Jan 14, 2020

No, I'm not overriding anything there, although my Windows PATH (system and user) is heavily customized. Checking it now, I have the bin dir (where state.exe is) on the path, but only Komodo 10 on the path (not this komodo 12 dir). Interesting. Not sure when I ran that komodo cmd in the terminal earlier (the one that jump-started my env) if that was launching 10 or 12, I don't think I checked closely at the time. But, 12 is definitely launching now from the icon, so that workaround is definitely still working.

@th3coop
Copy link
Member

th3coop commented Jan 14, 2020

@jimtut I wonder if you might have had it overwritten at some point as we did a lot of profile juggling. It also turned out that I was right that we were losing logging info that would help diagnose this issue but I think I did the original patch wrong. I've redone it. I've got a few patches around this ticket that I'm confident will resolve this issue for most users. There's a lot of moving parts in that one dialog though so any new instance of problems logging in, I'll treat as separate tickets.

@th3coop
Copy link
Member

th3coop commented Jan 14, 2020

@jimtut and @shawnlaffan , thanks so much for the assistance. I wouldn't have figured this out before release time with out the help.

@th3coop
Copy link
Member

th3coop commented Jan 14, 2020

@th3coop th3coop closed this as completed Jan 14, 2020
@th3coop th3coop self-assigned this Jan 14, 2020
@th3coop th3coop added this to the 12.0 milestone Jan 14, 2020
@jimtut
Copy link
Author

jimtut commented Jan 14, 2020

@jimtut and @shawnlaffan , thanks so much for the assistance. I wouldn't have figured this out before release time with out the help.

Thanks for taking it seriously, and fixing it!

@th3coop
Copy link
Member

th3coop commented Jan 15, 2020

Komodo 12 is out. Thanks again for helping get this in under the wire:
http://downloads.activestate.com/Komodo/releases/12.0.0/

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

No branches or pull requests

3 participants