Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Plastic SCM Merge - Unityyaml error

Discussion in 'Unity Version Control' started by delexaet, Feb 28, 2023.

  1. delexaet

    delexaet

    Joined:
    Apr 14, 2016
    Posts:
    39
    I've already setup the smart merge in Plastic SCM with the merge tool for .prefab and .unity files. And they point to a valid UnityYAMLMerge.exe. However when I have a conflict with a .unity file, and I try click on "resolve conflict" button, I'm getting :

    Error parsing file message with a value leading to a .unity file inside some filepath to AppData\Local\Temp that ends with "did not find expected key".

    I'm on unity 2022.1.24. Has anyone else seen this issue?
     
  2. ollieblanks

    ollieblanks

    Unity Technologies

    Joined:
    Aug 21, 2017
    Posts:
    459
    For context, please can you share a screenshot of the error?
     
  3. delexaet

    delexaet

    Joined:
    Apr 14, 2016
    Posts:
    39
    yea this is the error i see when I try to auto resolve a .unity file conflict in plastic.
     

    Attached Files:

  4. CHorrigan_FS

    CHorrigan_FS

    Joined:
    Aug 9, 2022
    Posts:
    2
    Running into this on 2021.3.1f1. Came out of nowhere, have been doing many successful scene merges before this.

    I am able to diff the scene files, but I do not have the option to manually resolve conflicts nor automatically resolve. My only option is to choose source or destination.
     
    Last edited: Mar 13, 2023
  5. delexaet

    delexaet

    Joined:
    Apr 14, 2016
    Posts:
    39
  6. carlosalba1985

    carlosalba1985

    Unity Technologies

    Joined:
    Jul 19, 2021
    Posts:
    1,038
    Unfortunately, this appears to be an issue with the Unity Smart Merge tool rather than the Plastic client but I will try to help as best I can. Merging scene files has been an age old problem for Unity developers due to the file format used (YAML). Your specific problem seems to be when parsing the file content.

    Plastic SCM does not fallback to binary default mergetool choice when this external merge tool fails and you will need to do this manually. To do this, I would suggest reordering the list of merge tools you have configured so that the "binmergetool" is listed above the Smart Merge tool temporarily so you can complete the merge (Plastic SCM GUI --> Preferences --> Merge tool). This will mean that the default binary merge tool is used and you will be able to select "Theirs" or "Mine" to resolve the merge.

    By the way, aren't you using file locks to avoid merge conflicts with the binary files?

    I hope this information proves helpful to you.
     
  7. delexaet

    delexaet

    Joined:
    Apr 14, 2016
    Posts:
    39
    Hey,

    Yea we know of locks but up until now we've rarely had a situation where SmartMerge failed like this. This seems to be fairly a new issue (1-2 months) where even the most minor changes in the scene across two different branches causes unresolvable conflicts and throw this error.

    But if there's no way to get to the bottom of the issue, then we'll figure something out.
     
  8. carlosalba1985

    carlosalba1985

    Unity Technologies

    Joined:
    Jul 19, 2021
    Posts:
    1,038
    Hi,

    If you can share the 3 contributors of the merge with us (in private), we can report the issue to the dev team so check if we can improve the Unity YAML merge tool.

    Regards,
    Carlos.
     
  9. delexaet

    delexaet

    Joined:
    Apr 14, 2016
    Posts:
    39
    Not sure if we want to do that but if we were to, how would we do that? Just send you the 2 versions of the UnityScene file that cause the issue on merge?
     
  10. carlosalba1985

    carlosalba1985

    Unity Technologies

    Joined:
    Jul 19, 2021
    Posts:
    1,038
    A merge always involves 3 contributors (source, base/common ancestor, and destination). We would need to get the three merge contributors to run the same merge.
     
  11. CHorrigan_FS

    CHorrigan_FS

    Joined:
    Aug 9, 2022
    Posts:
    2
    Have there been any developments on this? I am still trying to track down the reason for the UnityYAMLMerge Error. It abruptly started happening to everyone on my team in March and has persisted since. We've been able to work around it somewhat by making Plastic move on to the Plastic mergetool after the YAML tool fails and throws this error, but we'd like to get to the root of the issue.

    This is what we set in our client.conf file to make it use the other mergetool. My understanding is these are two separate tools, right? Is there anything wrong with the way the YAMLMerge command is set up here?

    <string>"C:\Program Files\Unity\Hub\Editor\2021.3.1f1\Editor\Data\Tools\UnityYAMLMerge.exe" merge -p "@basefile" "@sourcefile" "@destinationfile" "@output"</string>

    <string>mergetool -b="@basefile" -bn="@basesymbolic" -bh="@basehash" -s="@sourcefile" -sn="@sourcesymbolic" -sh="@sourcehash" -d="@destinationfile" -dh="@destinationhash" -a -r="@output" -t="@filetype" -i="@comparationmethod" -e="@fileencoding" -m="@mergetype" -re="@resultencoding" --progress="@PROGRESS" --extrainfofile="@extrainfofile"</string>
     
  12. carlosalba1985

    carlosalba1985

    Unity Technologies

    Joined:
    Jul 19, 2021
    Posts:
    1,038
    Hi @CHorrigan_FS,

    What is your specific error? Is this a parsing error?

    Why you are not using file locks to avoid merge conflicts with the binary files?

    This explanation still applies:
    Unfortunately, this appears to be an issue with the Unity Smart Merge tool rather than the Plastic client but I will try to help as best I can. Merging scene files has been an age old problem for Unity developers due to the file format used (YAML). Your specific problem seems to be when parsing the file content.

    Plastic SCM does not fallback to binary default mergetool choice when this external merge tool fails and you will need to do this manually. To do this, I would suggest reordering the list of merge tools you have configured so that the "binmergetool" is listed above the Smart Merge tool temporarily so you can complete the merge (Plastic SCM GUI --> Preferences --> Merge tool). This will mean that the default binary merge tool is used and you will be able to select "Theirs" or "Mine" to resolve the merge.

    Regards,
    Carlos.
     
  13. Astro75

    Astro75

    Joined:
    Dec 18, 2014
    Posts:
    48
    I have the same error. Shared my files in a bug report. https://unity3d.atlassian.net/servicedesk/customer/portal/2/IN-67295
     
  14. Rafafor_unity

    Rafafor_unity

    Unity Technologies

    Joined:
    Aug 12, 2021
    Posts:
    47