6

I've encountered an error when trying to pull from a scratch org I've been using for a week with no issue. The error is cites a Platform Event that has previously been pulled, but to which I made some edits.

ERROR running force:source:pull: Cannot retrieve translation for object:PersonalizedBlastReply

My .forceignore has **objectTranslations because I don't use them, though I've tried removing that and I still get the same problem.

I've tried doing a sfdx force:source:retrieve -m objectTranslations with the result:

=== Retrieved Source: No results found

Any recommendations on troubleshooting this? I don't know where to look.

2
  • Translation are still not supported by scratch orgs and I see the issue is still open. As a workaround what I used to do is import the translation files UI and export them in higher org or packaging org.
    – Raul
    Aug 1, 2019 at 17:20
  • @Raul, thanks for your comment. I am not using Translations at all. Aug 1, 2019 at 18:12

2 Answers 2

12

You can push and pull platform events as long as you don't change the API name.

After running some extensive tests I found changing the platform event's API name causes this issue.

If you have changed the platform event API name through the UI you will need to delete your scratch org and start with a new one.

You can change the name by changing the metadata on your computer and pushing it back to the scratch org. This works with no issues. The only issue is changing the platform API name using the UI.

Until Salesforce fixes the workaround is to change the API name in the metadata. Doing this you can change the label with no problems.

1

@Fred B was correct in citing that this problem is because the Platform Event was renamed. I've found the following workaround without destroying the scratch org and starting over again.

For my example: Original=Foo. Final Name=Bar

  1. In DevConcole, using the Tooling API query SourceMember to find the "phantom" SourceMember record for the original PE name. - select id, MemberName, MemberType from SourceMember
  2. Delete BOTH the original Platform Event Foo AND the translation for the current name Bar.
  3. Clear the tracking info locally. sfdx force:source:tracking:clear
  4. sfdx force:source:pull now works as expected.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .