corvid
corvid copied to clipboard
Editor will stop working when new pages are created on separate git branches
Describe the bug
When working with the local editor on a team structure and under a development workflow based on feature branches, it is not possible to create new pages on these feature branches and then merge the changes to the master branch. The conflict has been identified to be related with the files in src/assets/menus/*
which are changed whenever a new page is created on the local editor. Thereafter, the local editor stops working, i.e. suddenly closes after loading.
Detailed description
In more detail, our team would like to adopt a regular development workflow using git
and corvid-cli
, where there's the master
branch containing the original site and any new functionality is being worked on a feature branch
off of master, and whenever finished this branch is merged to the master
via pull/merge requests.
Therefore, a usual scenario is that where you need to create a new page for the functionality while you are on the feature branch
. Then is when this bug arises: when you add a new page on the local editor, lots of files –listed below– get changed automatically:
- Most of .wix files in
src/pages/*
. - Files in
src/assets/styles/*
. - Files in
src/assets/menus/*
.
Then, these files go in a conflict with the master
version of them when trying to merge the changes. Thereafter, it has been narrowed down that all files except the src/assets/menus/*
ones can be kept as in the master branch. Specifically the conflict in, for example in this case, src/assets/menus/CUSTOM_MAIN_MENU.wix
is causing the local editor to stop working, i.e. the local editor suddenly closes after loading.
After debugging of the issue, it has been found that are the files in src/assets/menus/*
which are causing the conflict between the branches. The files in this folder seem to be related to the menu shown in the local editor to navigate through the pages, and therefore I suppose they contain a relation of all pages contained in the site. Thus, whenever you add a new page in two different feature branches
it is not possible to resolve the conflict of the menu.wix
files in a way that contains all new created pages, partly due to the fact that the .wix files are obfuscated to the user.
To Reproduce Steps to reproduce the behavior:
- Pull online version of the site to
master
branch. - Create two new feature branches off of master, e.g.
feature-A
andfeature-B
. - Add a new page using the local editor on each of the two branches, e.g.
New Page A
infeature-A
branch, andNew Page B
infeature-B
. - Check all changed files in
git status
, there might appear a lot of files insrc/pages/*
,src/assets/styles/*
andsrc/assets/menus/*
. - All changes in those files can be discarded, except for the actual page you are creating and the files in
src/assets/menus/*
.- A good point is to see that if you discard the files in
src/assets/menus/*
, the editor will stop working at that very moment.
- A good point is to see that if you discard the files in
- Merge changes from both branches into
master
.- Conflicts on the
src/assets/menus/*
will arise, and there is no other option to choose one of the files you want to keep since they are obfuscated.
- Conflicts on the
- When the feature branches are merged –and only one version of the
src/assets/menus/*
files survive–, the local editor stops working.
Expected behavior There are two options I can think of that would solve my problem:
- Just be able to create a page and merge –or not– the files and the local editor to automatically detect if there are new pages and do the necessary housekeeping to make it work.
- Have access to the obfuscated files in
src/assets/menus/*
so that the conflicts in those files can be easily compared and merged without breaking the editor.
Screenshots and logs I provide here three documents that might be useful to speed up debugging:
- The
session.log
file after the editor stops working, i.e. it loads and suddenly stops.
{"message":"Server starting at /Users/gasbi/Documents/eparel/dev/bt-lab","level":"info","timestamp":"2019-07-24T10:27:56.237Z"}
{"message":"Watching for file changes at [src]","level":"verbose","timestamp":"2019-07-24T10:27:56.245Z"}
{"message":"Server listening at editor port [5000], admin port [3000]","level":"info","timestamp":"2019-07-24T10:27:56.306Z"}
{"message":"Admin connected","level":"verbose","timestamp":"2019-07-24T10:27:56.327Z"}
{"message":"Socket event GET_STATUS received","level":"info","timestamp":"2019-07-24T10:27:56.351Z"}
{"message":"opening editor for [https://www.wix.com/editor/db0360b3-8987-41b8-aaba-0729b0875742?petri_ovr=specs.ExcludeSiteFromSsr=true&corvidSessionId=aba14c8a-1b48-45d6-a759-164db156d209&localServerPort=5000&x-wix-bi-context=eyJidWlsZGVyRW52IjoibG9jYWwiLCJpc0hlYWRsZXNzIjpmYWxzZX0=]","level":"info","timestamp":"2019-07-24T10:27:56.354Z"}
{"message":"Accepted origin [https://editor.wix.com]","level":"verbose","timestamp":"2019-07-24T10:28:01.256Z"}
{"message":"Editor connected","level":"verbose","timestamp":"2019-07-24T10:28:01.256Z"}
{"message":"Socket event IS_CLONE_MODE received","level":"info","timestamp":"2019-07-24T10:28:01.269Z"}
{"message":"Socket event GET_DOCUMENT received","level":"info","timestamp":"2019-07-24T10:28:01.307Z"}
{"message":"Site document requested","level":"verbose","timestamp":"2019-07-24T10:28:01.307Z"}
{"message":"Socket event IS_CLONE_MODE received","level":"info","timestamp":"2019-07-24T10:28:02.607Z"}
{"message":"Socket event GET_CODE received","level":"info","timestamp":"2019-07-24T10:28:02.654Z"}
{"message":"code files requested","level":"verbose","timestamp":"2019-07-24T10:28:02.655Z"}
{"message":" {\"message\":\"path type is not an array - null\",\"stack\":\"Error: path type is not an array - null\\n at u.setByPath (https://static.parastorage.com/services/santa/1.7753.0/dist/packages-bin/documentServices-santa/documentServices-santa.min.js:1:8812)\\n at u.set (https://static.parastorage.com/services/santa/1.7753.0/dist/packages-bin/documentServices-santa/documentServices-santa.min.js:1:9663)\\n at a.set (https://static.parastorage.com/services/santa/1.7753.0/dist/packages-bin/documentServices-santa/documentServices-santa.min.js:1:25180)\\n at f (https://static.parastorage.com/unpkg/[email protected]/dist/document-services-implementation.js:1:490112)\\n at https://static.parastorage.com/unpkg/[email protected]/dist/document-services-implementation.js:1:490859\"}","level":"error","userMessage":"There was an error initializing your site. Please try again.","stack":"EditorError: {\"message\":\"path type is not an array - null\",\"stack\":\"Error: path type is not an array - null\\n at u.setByPath (https://static.parastorage.com/services/santa/1.7753.0/dist/packages-bin/documentServices-santa/documentServices-santa.min.js:1:8812)\\n at u.set (https://static.parastorage.com/services/santa/1.7753.0/dist/packages-bin/documentServices-santa/documentServices-santa.min.js:1:9663)\\n at a.set (https://static.parastorage.com/services/santa/1.7753.0/dist/packages-bin/documentServices-santa/documentServices-santa.min.js:1:25180)\\n at f (https://static.parastorage.com/unpkg/[email protected]/dist/document-services-implementation.js:1:490112)\\n at https://static.parastorage.com/unpkg/[email protected]/dist/document-services-implementation.js:1:490859\"}\n at [CORVID] (/Users/gasbi/Documents/eparel/dev/bt-lab/node_modules/corvid-cli/src/apps/open-editor.js:65:15)\n at WebContents.<anonymous> (/Users/gasbi/Documents/eparel/dev/bt-lab/node_modules/corvid-cli/src/utils/clientMessageActions.js:9:9)\n at WebContents.emit (events.js:194:13)\n at WebContents.EventEmitter.emit (domain.js:469:20)\n at WebContents.topLevelDomainCallback (domain.js:124:23)","timestamp":"2019-07-24T10:28:04.101Z"}
-
A screenshot of the editor just right before closing with the console showing the error. I could only take a photo because there is no time before the editor shuts down to copy the text in there.
-
A plain git diff about the conflict in
src/assets/menus/CUSTOM_MAIN_MENU.wix
when merging the feature branch with the master.
diff --git a/src/assets/menus/CUSTOM_MAIN_MENU.wix b/src/assets/menus/CUSTOM_MAIN_MENU.wix
index 295c579feebd7e231ebca2d1669e4c8868fcc163..0b5276b6a53938a53adbc000e986d2f8d1c9ad72 100644
--- a/src/assets/menus/CUSTOM_MAIN_MENU.wix
+++ b/src/assets/menus/CUSTOM_MAIN_MENU.wix
@@ -1,4 +1,4 @@
{
- "content": "eyJkYXRhIjp7ImRhdGFJdGVtLWp4YThiMnYzIjp7InR5cGUiOiJCYXNpY01lbnVJdGVtIiwiaWQiOiJkYXRhSXRlbS1qeGE4YjJ2MyIsIm1ldGFEYXRhIjp7ImlzUHJlc2V0IjpmYWxzZSwic2NoZW1hVmVyc2lvbiI6IjEuMCIsImlzSGlkZGVuIjpmYWxzZX0sImxhYmVsIjoiUG9saWNpZXMiLCJpc1Zpc2libGUiOnRydWUsImlzVmlzaWJsZU1vYmlsZSI6dHJ1ZSwiaWNvblJlZiI6bnVsbH0sIkNVU1RPTV9NQUlOX01FTlUiOnsidHlwZSI6IkN1c3RvbU1lbnUiLCJpZCI6IkNVU1RPTV9NQUlOX01FTlUiLCJtZXRhRGF0YSI6eyJpc1ByZXNldCI6ZmFsc2UsInNjaGVtYVZlcnNpb24iOiIxLjAiLCJpc0hpZGRlbiI6ZmFsc2V9LCJuYW1lIjoiQ3VzdG9tIE1haW4gTWVudSJ9fSwic3RydWN0dXJlIjp7ImJtaTIzbnIiOnsiaWQiOiJibWkyM25yIiwiaXRlbXMiOltdfSwiZGF0YUl0ZW0tanloMHBjczEiOnsiaWQiOiJkYXRhSXRlbS1qeWgwcGNzMSIsIml0ZW1zIjpbXX0sImRhdGFJdGVtLWp4ZWQyZXMyIjp7ImlkIjoiZGF0YUl0ZW0tanhlZDJlczIiLCJpdGVtcy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ImlkIjoiZGF0YUl0ZW0tanhhNmg1YXIiLCJpdGVtcyI6W119LCJkYXRhSXRlbS1qeGE2aDVjYyI6eyJpZCI6ImRhdGFJdGVtLWp4YTZoNWNjIiwiaXRlbXMiOltdfSwiZGF0YUl0ZW0tanhhNmg1ejEiOnsiaWQiOiJkYXRhSXRlbS1qeGE2aDV6MSIsIml0ZW1zIjpbXX0sImRhdGFJdGVtLWp5N2o4MTZiIjp7ImlkIjoiZGF0YUl0ZW0tank3ajgxNmIiLCJpdGVtcyI6W119LCJkYXRhSXRlbS1qeWgyOW1oNiI6eyJpZCI6ImRhdGFJdGVtLWp5aDI5bWg2IiwiaXRlbXMiOltdfSwiQ1VTVE9NX01BSU5fTUVOVSI6eyJpZCI6IkNVU1RPTV9NQUlOX01FTlUiLCJpdGVtcyI6WyIjYm1pMjNuciIsIiNkYXRhSXRlbS1qeGVkMmVzMiIsIiNkYXRhSXRlbS1qeGVjOHZiaiIsIiNkYXRhSXRlbS1qeGE2YXNwaSIsIiNkYXRhSXRlbS1qeGE2YXV1cCIsIiNkYXRhSXRlbS1qeGE2YXZodiIsIiNkYXRhSXRlbS1qeGE2aDU1NiIsIiNkYXRhSXRlbS1qeGE4YjJ2MyIsIiNkYXRhSXRlbS1qeGE2aDU3ZCIsIiNkYXRhSXRlbS1qeGE2aDU4eSIsIiNkYXRhSXRlbS1qeGE2aDVhciIsIiNkYXRhSXRlbS1qeGE2aDVjYyIsIiNkYXRhSXRlbS1qeGE2aDV6MSIsIiNkYXRhSXRlbS1qeTdqODE2YiIsIiNkYXRhSXRlbS1qeWgyOW1oNiJdfX19",
"documentSchemaVersion": "1.0"
}
Desktop (please complete the following information):
- OS: macOS Mojave 10.14.5 (18F132)
- Version: Corvid CLI v0.1.78
- Site URL: https://eparelllc.wixsite.com/mysite
Additional context We are aware Corvid CLI is in Alpha, and would appreciate any help the Corvid team can provide.
Thanks very much! Gaspar