wix-incubator / corvid

Download your Wix site, code in a local IDE, collaborate, use git, and more!
MIT License
38 stars 10 forks source link

corvid login fails #186

Open shaneboyar opened 4 years ago

shaneboyar commented 4 years ago

Describe the bug After inputting valid creds (confirmed by loggin in on the website, also resetting password and reattempting) via the electron window, electron window closes, and cli outputs:

✖ Authenticated on www.wix.com
Login failed.

To Reproduce Steps to reproduce the behavior:

  1. npx corvid login
  2. Input creds via electron window

Expected behavior A clear and concise description of what you expected to happen. Expected to be authenticated after inputting valid credentials.

Desktop:

shaneboyar commented 4 years ago

For what it's worth this may just be a Wix issue right now...

Screen Shot 2020-03-24 at 11 32 04 AM
shaneboyar commented 4 years ago

Server issues seem to have been fixed, but I am still unable to login through the CLI

tomenden commented 4 years ago

Thanks for reporting! A fix is in the oven https://github.com/wix-incubator/corvid/pull/187

shaneboyar commented 4 years ago

@tomenden thanks for the reply! just pulled that branch and it seems to work!

shaneboyar commented 4 years ago

@tomenden For what it's worth, on using branch CRVD-1963 I am now able to login, but it seems to hang on "Waiting for the editor to connect" when I try to clone

tomenden commented 4 years ago

@shaneboyar We got this report from another user, and I was unable to reproduce on that branch. Can you please run corvid-debug clone and let me know if you see more info in the logs/send a screenshot of the dev-tools of electron?

Thanks!

shaneboyar commented 4 years ago

@tomenden Trying to run the clone command again gives me a "Project already exists" error now.

tomenden commented 4 years ago

yes, you need to clear the directory first, or simple rm -rf src .corvid if you're in the directory and installed the corvid-cli through npm/yarn i corvid-cli

shaneboyar commented 4 years ago

@tomenden got it to work on a second try. seems like my authentication wasn't persisted and i didn't notice another electron window popped up asking for creds, so I guess that's what it was waiting on.

shaneboyar commented 4 years ago

Possibly a different, but not blocking, issue is that each new command (clone, then open-editor) seems to need reauthentication.

tomenden commented 4 years ago

@shaneboyar How do you use it from the branch?

shaneboyar commented 4 years ago

@tomenden in my project, calling it directly: project/wix node ~/projects/corvid/packages/corvid-cli/src/index.debug.js open-editor

tomenden commented 4 years ago

I just released the new version and I am unable to reproduce the issue you reported. Can you please try to install it and let me know if the issue still reproduces?

First, please make sure you don't have any globally installed version of corvid-cli on your machine: npm uninstall -g corvid-cli

Thanks!

tomenden commented 4 years ago

@shaneboyar Are you still getting the subsequent login issue? Please try npx corvid login and right after that npx corvid login again. Are you asked to login again?

shaneboyar commented 4 years ago

@tomenden npx corvid login gives me Error: no username, organisation or repository criteria specified!

I had removed my local clone, so I went to recreate it npx create-corvid-app it authenticates, then when trying to connect to the editor, I see an electron app try to open but the window doesn't seem to render anywhere and then the script just hangs, waiting for it. It also will not let me kill the script without closing the window apparently.

Screen Shot 2020-04-01 at 2 50 49 PM

You can see electron has no active windows here.

However... Once inside that new project folder, my login does seem to persist now!

tomenden commented 4 years ago

You always need to be in the project directory when running the commands. The message you get regarding the "no organization" is actually from a different npm module named corvid.

shaneboyar commented 4 years ago

I had a feeling it didn't work at first due to me not being in a project, but I still wasn't able to connect to the editor even after I got authenticated.