corvid open-editor error

When trying to run corvid open-editor in an initialized Corvid Wix site that I have pulled locally, I hit the following error(s) (I am more interested in the “Could not instantiate: ProductRegistryImpl.Registry” than the JSON issue but I suppose either could be preventing the editor from loading):

➜  ~ tail -f ~/code/website-2/.corvid/session.log
{"message":"[4783:0425/094944.372556:ERROR:CONSOLE(5566)] \"SyntaxError: Unexpected token ⫆ in JSON at position 12289\", source: chrome-devtools://devtools/bundled/shell.js (5566)\n","level":"error","sessionId":"a108cae9-8feb-463b-8af0-b247fe063119","timestamp":"2019-04-25T13:49:44.380Z"}
{"message":"[4783:0425/094946.134101:ERROR:CONSOLE(5566)] \"SyntaxError: Unexpected token ⫆ in JSON at position 12289\", source: chrome-devtools://devtools/bundled/shell.js (5566)\n","level":"error","sessionId":"a108cae9-8feb-463b-8af0-b247fe063119","timestamp":"2019-04-25T13:49:46.134Z"}
"2019-04-25T13:42:55.358Z"}
{"message":"editor connected","level":"verbose","sessionId":"a108cae9-8feb-463b-8af0-b247fe063119","timestamp":"2019-04-25T13:43:00.867Z"}
{"message":"site document requested","level":"verbose","sessionId":"a108cae9-8feb-463b-8af0-b247fe063119","timestamp":"2019-04-25T13:43:01.981Z"}
,"sessionId":"a108cae9-8feb-463b-8af0-b247fe063119","timestamp":"2019-04-25T13:50:27.357Z"}
{"message":"[4783:0425/095027.363741:ERROR:CONSOLE(108)] \"Uncaught (in promise) Error: Could not instantiate: ProductRegistryImpl.Registry\", source: chrome-devtools://devtools/bundled/shell.js (108)\n","level":"error","sessionId":"a108cae9-8feb-463b-8af0-b247fe063119","timestamp":"2019-04-25T13:50:27.363Z"}

@Alexander Jdanov
I have found the error and it is a bug in the way the menu code operates in the local Editor.


So where we thought the problem was base64 encoding of the .wix files it turns out that when the pages are loaded and being rendered that the code assumes that ALL pages have a header and therefore a menu. The cannot read CUSTOM_MAIN_MENU occurs on any page without a Header. I have tested this and Sites that fail typically have one or more LightBoxes which do not have headers and so page.content.menu is undefined. Likewise for Dashboard Pages which are not part of the main site and do not have headers.

@yisrael-wix @shlomi-shemesh @yoav-wix
Good to finally get my hands dirty with the Local Editor set up! :wink:

Hi Matt and Steven,
Thank you for writing us and for trying out corvid-cli!
Steven - awesome job debugging :slight_smile:
We’re aware of this issue and a fix is underway. Please note that corvid-cli is still in development, and there are definitely going to be further (breaking) changes as well as bug fixes before the official release. With that said, we’re happy that you’re trying it out, and happy to hear your feedback and bug reports. Stay tuned for updates on the official release, we will open it as an Alpha as soon as we feel confident that it is stable enough.

Thanks!

Hi Tom: Yes I downloaded the 0.1.47 release yesterday which seemed to work but is now behaving as it was earlier. I suspect you are having to deal with changes to santa and other backend functions. Would be good to get an email update on releases and known issues. Happy to help debug with a little more architecture info. :wink:

@Tom Enden @yoav-wix Hi Tom looks like there has been a fix released. I have checked the offending code and it has been fixed. One thing that would be great is that we get information in the corvid-cli app about version compatibility.

I just checked the working Editor version info loaded in electron for the working code and it shows
santaBase = static.parastorage.com/services/santa/1.7099.2
editorBase = static.parastorage.com/services/santa-editor/1.6245.3
together with corvid-cli v.0.1.47 - this works

So some way to check compatibility would be useful especially if santa changes or corvid-cli is upgraded. This will help with debugging later also :wink:

Cheers

@yoav-wix @Tom are you guys planning on open-sourcing any of these libraries, CLI or API?

Are these forums the best way to notify you of bugs? You can invite us into your alpha/testing Slack chat or otherwise (if it exists) to collaborate and iterate more quickly if it’s helpful too :slight_smile:

Hi Matt,
Regarding open-source - absolutely, probably within the next few weeks.
Regarding the best place to report these issues - I think it would be best if we could do it via email at this stage. Do you mind sharing your email address so I can send you an email and then you’ll have mine to contact me directly?

Thanks!

@tom-enden sure but probably not best to post it in a public forum if possible. Is there a secure way to send you my email address? Can’t you just sudo into the Wix DB and look it up? :wink:

@mecampbell25 I’ll loop you in. I know Tom’s email :wink:

@tom-enden Hey Tom, for the local editor, is it in the alpha timeline to allow for connecting event listeners directly to editors from the UI, like onClick, onViewportEnter etc?