I have a beta managed package installed in a sandbox org. I am able to create triggers in my sandbox org that subscribe to a platform event from that managed package when creating the trigger through the ui, and the triggers function properly. Whenever I try to create or update a trigger through a metadata api deployment, even when I'm deploying a trigger that I just retrieved, the deployment fails with a gack:
An unexpected error occurred. Please include this ErrorId if you contact support: 1818144128-20982 (-359002871)
Has anyone encountered this error before, and is it specific to sandbox orgs or beta managed packages? My biggest concern here is getting the trigger deployed up to production when the time comes. I haven't tried using change sets yet, but I would be open to any work around if it works.
Here's some more details of a simple retrieve/deploy I ran where the deployment failed:
[martin@localhost ret3]$ ls
package.xml
[martin@localhost ret3]$ cat package.xml
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>YouzanOrderDetailsUpdated</members>
<name>ApexTrigger</name>
</types>
<version>36.0</version>
</Package>
[martin@localhost ret3]$ retrieve staging
submitted retrieve request: 09Sp0000001H0cIEAS
request : Succeeded
[martin@localhost ret3]$ ls -R
.:
package.xml retrieve_staging_1.zip triggers
./triggers:
YouzanOrderDetailsUpdated.trigger YouzanOrderDetailsUpdated.trigger-meta.xml
[martin@localhost ret3]$ cat triggers/*
trigger YouzanOrderDetailsUpdated on Youzan__OrderDetailsUpdated__e (after insert) {
new Trg_YouzanOrderDetailsUpdatedCreateOrder( Trigger.new );
}<?xml version="1.0" encoding="UTF-8"?>
<ApexTrigger xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>41.0</apiVersion>
<packageVersions>
<majorNumber>1</majorNumber>
<minorNumber>0</minorNumber>
<namespace>Youzan</namespace>
</packageVersions>
<status>Active</status>
</ApexTrigger>
[martin@localhost ret3]$ deploy staging
submitted deploy request: 0Afp000000ERZZpCAP
Queued
InProgress completed 0 / 0 tests 0 errors
Failed completed 0 / 0 tests 0 errors
Total Time: 0.0 ms