Recently, I can no longer run sfdx:force:source:pull without getting the below error. This occurs 100% of the time for me.
versions: sfdx-cli/7.68.6-d37008df83 darwin-x64 node-v12.18.3
Note, the org does have translations in it. I am not sure if this is the same "translations" that the error is referring to.
(node:48805) UnhandledPromiseRejectionWarning: RetrieveFailed: Cannot retrieve translation for object:Global
at MdapiPullApi._processResults (/Users/streco/.local/share/sfdx/node_modules/salesforce-alm/dist/lib/source/sourcePullApi.js:178:36)
at MdapiPullApi._postRetrieve (/Users/streco/.local/share/sfdx/node_modules/salesforce-alm/dist/lib/source/sourcePullApi.js:147:21)
at /Users/streco/.local/share/sfdx/node_modules/salesforce-alm/dist/lib/source/sourcePullApi.js:94:29
(node:48805) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:48805) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:48805) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1)
ERROR running force:source:pull: Cannot retrieve translation for object:Global
I had the same issue with my scratch org, we had to downgrade salesforcedx for the moment in order to make it work :
$ sfdx plugins --core
@oclif/plugin-autocomplete 0.1.5 (core)
@oclif/plugin-commands 1.3.0 (core)
@oclif/plugin-help 3.0.1 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.7.10 (core)
@oclif/plugin-update 1.3.10 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/sfdx-trust 3.0.7 (core)
analytics 1.12.0 (core)
generator 1.1.3 (core)
isvte-sfdx-plugin 1.1.6
salesforcedx 47.18.0 (47.18.0)
Γö£ΓöÇ salesforce-alm 47.16.0
ΓööΓöÇ salesforcedx-templates 47.19.0
sfdx-cli 7.66.2 (core)
sfdx-essentials 2.4.1
hope this helps :)
You can add in your .forceignore file
global-fr.objectTranslation
Global-fr.objectTranslation
Hope this helps !
@yrafiqui , thank you. Downgrading worked for me.
@quentin-dalmazir , Thank you, I am sure that would work. Will try upgrading and adding to the .forceignore
You can add in your .forceignore file
global-fr.objectTranslation
Global-fr.objectTranslationHope this helps !
For me adding:
Global-nl_NL.objectTranslation
Global-en_US.objectTranslation
to the .forceignore 'solved' the issue on pull.
Thanks!
Yep,Thanks @fjgalesloot , this works for me, but leaving the issue open as this is a workaround.
Does anyone have a repo where we can replicate this issue?
Unfortunately, I cannot share the repo where we are experiencing the issue, but I believe it is reproducible for me as long as we have translation files included in the repo (objectTranslations folder is not empty).
This is why adding this to .forceignore resolves it:
Global-es
CustomPageItem-es
[package_namespace__]-es
[package_namespace__-de
I'll also mention that some of my teammates hit this issue, and others don't (although all are using same repo). I've hit this issue consistently with the below versions:
sfdx-cli/7.75.1-5585088c75 darwin-x64 node-v12.18.3
@streco I've tried reproducing this issue and I haven't been able to. Could you provide me any more context around your translation? (What type is it translating? Is it a field?, any other info) I'm able to push and pull the translation of a custom field on a standard object without problems on v7.75.1.
Hi Willie, thanks for looking into this. Our package has translations for all sorts of custom metadata, such as custom fields. It doesn't surprise me that you can't reproduce it, as it seems others on my team cannot reproduce it, while others do.
@streco can you provide a simple Salesforce project repository with a script to setup a scratch org that reproduces your problem?
This issue has been automatically closed because there has been no response to our request for more information from the original author. Currently, there is not enough information provided for us to take action. Please reply and reopen this issue if you need additional assistance.
Hey no-response bot! Too soon.
This is certainly still an issue. Can someone please investigate?
A cause seems to be renaming a platform event in a scratch org. Once a platform event is renamed, the error occurs on sfdx force:source:pull: "Cannot retrieve translation for object:My_Platform_Event".
I replicated by creating a platform event in a scratch org. Adding a field (not sure if required). Rename the platform event. Attempt to pull source.
Deleting the event does not resolve the issue.
Cheers!