Something wen wrong in Mendix, Unable to read metadata from proejct file

3
Hi,  I have been trying to merge my branches with the main branch but have been getting the same error when merging.  I have tried to search online for the exact solution but to no changes.  This is the error I am getting    I have tried to delete the file locally and redownload the main branch but the same error appears.  Would appreciate any help or tips.  Thanks. 
asked
2 answers
14

Hi Omar,

I’ve faced the same issue on one of my projects when I tried to merge a feature branch into the main branch.

Below are two ways to resolve it. You’ll need TortoiseGit or the Git command line client (I’ve used TortoiseGit).

 

Option 1:

According to Mendix Support this issue can occur if the last commit in one of the branches is a merge commit. If this the case, commit some change in that branch (e.g. just rename something or do a cosmetical change).

Unfortunately option 1 didn’t work for me.

 

Option 2: (worked for me)

  1. Revert all local changes and close Studio Pro
  2. Do a clean up on the project folder of main branch (TortoiseGit “Clean Up” or Git command line “clean” option). The default options of the command are ok.
  3. Now initiate the merge from TortoiseGit/Git
    1. Start merge from main line
    2. Select branch that you want to merge into main
    3. Check the “No Commit” option
    4. Confirm
  4. You’ll see an error about a conflict of the mpr file. This is expected, you can ignore and close it it.
  5. Open the project (main line) in Studio Pro
  6. Studio Pro will detect the pending merge and asks if you want to to continue. Confirm this.
  7. You should now see your changes merged.
  8. Maybe you’ll also see a lot of errors now, but don’t worry. In my case there were some references in microflows that couldn’t be found, although everything was correct. I just went to the first action in the microflow did some change there (e.g. renamed the output variable) and save this. Then the error was gone.
  9. Commit

 

answered
-7
  1. Make sure you have committed all changes in your local branch before attempting to merge with the main branch.

  2. Check if there are any conflicts between the changes in your local branch and the changes in the main branch. If there are conflicts, you will need to resolve them manually.

answered