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

Cannot clone -> Admin server authentication error -> using editorX in local #218

Open xileftenurb opened 3 years ago

xileftenurb commented 3 years ago

Describe the bug

I followed the step on Velo website to clone using corvid-cli, but stuck at the same place as #185 "Waiting for the Editor to connect"

Since I REALLY wanted it to work, I started probing the code around.

I used corvid-debug to get more error info and found out 2 warnings. The first is "error reading editor versions: Invalid URL:", but it was irrelevant (see: #217 ) The second was "Admin server authentication error"

After more probing around, the source is in package corvid-local-server, file src/server/originsMiddleWare.js

the hostname is not in the allowedDomains.

my hostname is create.editorx.com and the allowed domain is editor.wix.com

After checking, this is because the local development do not work with editors. (create.editorx.com is the hostname of editors and editor.wix.com is the hostname of the old editor)

when I add create.editorx.com In the allowedDomains array, I can download the project, but the editor do not work (the website is visible but not modifiable).

To Reproduce Steps to reproduce the behavior:

  1. try to clone project a project on editoxX (ex: npx corvid-cli clone . https://www.mywebsite.com)
  2. it hang at "Waiting for the Editor to connect"

Expected behavior The best would be to be able to edit the project with editor X in local,

The minimum would be that #120 was resolved, because with my fix, it is possible to at least pull and push the code to wix.

Desktop (please complete the following information):