-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error "Unexpected child metadata" with "force:source:retrieve" command when I try to retrieve any component #1241
Comments
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support. |
This seems like a duplicate of #1241 Regarding other errors when you delete the Activity object, did you start to see these recently after an update or are you still reorganizing your project structure? |
It is not a duplicate, actually it is #1241 I don´t want to delete the Activity object. I have all my SF org in the repository and all was working fine (in fact I could execute the retrieve for all the components without any problem), but suddenly I received that error message when I tried to retrieve again some components that were been updated in the SF UI. I just can use the source:force:retrieve command with the --sourcepath but I need to have the component already in my project to use it and I can´t retrieve more than one component at a time. If I try to use with --manifest to use a package.xml or with -m to retrieve just one component, I receive the Unexpected child metadata error message. |
I´m still investigating this issue and I can see that in my force-app\main\default\objectTranslations folder I have objectTranslation-meta.xml files and fieldTranslation-meta.xml files.
It is normal? Because the error message is saying that it has found an unexpected child metadata fieldTranslation XML for parent type CustomObjectTranslation, and maybe it is because the objectTranslations folder just can have objectTranslation XML files. |
I think I´ve found the reason for this problem. The main cause is because in some objectTranslation folders there isn´t an objectTranslation XML file. I use the Salesforce Package.xml Generator plugin in VSC and I know that I have to include in the package.xml the objects that I want to retrieve the translation from, and I included all the objects, and fields in the same package.xml which contains the objectranslations so I don´t know why some objects have the objectTranslation file but other objects do not. |
Sorry, I pasted the wrong link, dup: #1233. This started to happen after this PR: forcedotcom/source-deploy-retrieve#461
Yes, as other user has commented in the issue above, that's the current workaround 👍🏼 |
Does nobody know how to avoid this problem? |
Have the same issue, after updating to version 7.120 and 7.123 |
Hi @IVerkhosh @JavierCarvajalLBS thanks for the patience. This issue has been addressed here and will be released the |
This is still not fixed, 11/10/2021. Still happening when retrieving or pushing metadata using a package.xml file. |
@MorganMarchese - what is the output of |
I have the same issue. I have a folder in my project called sfdx-cli/7.126.0 win32-x64 node-v16.13.0 |
Same here for sfdx-cli/7.124.0 win32-x64 node-v14.18.1 |
Hello!! same error with the version sfdx-cli/7.127.0 win32-x86 node-v16.13.0 , any solution? In my case this was the error "Unexpected child metadata [\force-app\main\default\objectTranslations\Activity-pt_PT\Accepted_Information__c.fieldTranslation-meta.xml] found for parent type [CustomObjectTranslation]" |
WORKAROUND: As stated above, just create a OBJECT_NAME.objectTranslation-meta.xml in the folder that is causing problem. Example: The current folder structure: A desired folder structure: After creating the main obj Translation file, SFDX behaves as expected. Hope somebody will benefit from this. |
This worked for me too. Weird issue, hope this gets fixed in latest cli. |
Seems there are multiple issues being reported here.
|
@shetzel I´m still having the same issue today: Metadata API request failed: Component conversion failed: Unexpected child metadata [\force-app\main\default\objectTranslations\efl__EFL_Child_Objects_List__c-en_US\efl__Object_Name__c.fieldTranslation-meta.xml] found for parent type [CustomObjectTranslation] I´m using a package.xml with all the CustomObject included and using the wildcard * in the CustomObjectTranslation component (I need to retrieve all the components in the org). After investigation, this issue is just with one managed-package component (component efl__EFL_Child_Objects_List__c from the managed package Enhanced Files List). If I remove the component of the list of CustomObject elements in the package.xml, no issue is raised. If the object is in the list, a CustomObjectTranslation file is created during the retrieve and the error raises. The main problem is that I can´t remove the object name because we have to retrieve all the custom objects in the org using the wildcard (*) and, in that case, the error always raises And it is my system configuration: |
More investigation on the issue:
|
Does anyone have information about when this issue will be fixed? I'm having some problems with my Project Sprint to the end of the year. |
Hi @estrng this is in our current sprint, however, due to the holidays we won't be releasing until the 6th. At the earliest, it would be in the |
Thank you. |
@shetzel We're getting the #1, "Unexpected child metadata ... found for parent type [CustomObject]", but it's on this pattern: It appears that if we delete these legitimate files, the errors go away... |
Today I´ve received the same error message again using a package.xml file: Metadata API request failed: Component conversion failed: Unexpected child metadata [\force-app\main\default\objectTranslations\efl__EFL_Child_Objects_List__c-en_US\efl__Object_Name__c.fieldTranslation-meta.xml] found for parent type [CustomObjectTranslation] If I remove the CustomObjectTranslation type (that previously had the * member inside) from the package.xml file the retrieve operation is successful. |
I had the same error. If you have installed extension Salesforce CLI Integration latest version wich is 53.12.0 (or a recent one) you may have this issue. I solved the problem installing an older version : 53.0.0. |
The fix is in the latest CLI release published today. sfdx version 7.133.0 |
I had the same issue, the problem for me was Uppercase sensitivity as I wrote FieldTranslation-meta.xml instead of fieldTranslation-meta.xml. After this change, error disappear when I run sfdx retrieve command. |
I have the same issue trying to update OpportunityLineItem from my org. SFDX, VSCode, and extensions were all updated to latest version today but this made no difference. Error occurs when trying to download metadata for OpportunityLineItem. I think this defect needs to be reopened.
|
@cleverlemming this issue was about https://github.com/forcedotcom/cli/issues/new/choose |
I had got the same error.
The problem was that someone misspell the name of the objects folder (Objetcs). After renamed it, all works fine. |
Recently, when I try to execute a force:source:retrieve command in VS Code to get any component from the SFDC connected org, I receive the error message:
Unexpected child metadata [\Activity-bg\Activity_Group__c.fieldTranslation-meta.xml] found for parent type [CustomObjectTranslation]
It is received using a package.xml, or specifying the specific component to be retrieved, and even when neither object Activity, nor Activity Group field nor any object translation is involved in the retrieve command.
If I delete that CustomObjectTranslation from local, the same error message is received but from a different field from the Activity object. If I delete the Activity object from local, I receive the same error message, but from a different object.
I guess it is some kind of error related to the project structure local, but I can´t find the reason because the error message is not helping.
The text was updated successfully, but these errors were encountered: