• Kevin Rice
  • NEWBIE
  • 45 Points
  • Member since 2015
  • President
  • Alpha Bytes Consulting


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Has anyone encountered this error when working with the lightning:empApi aura component: 
{"clientId":"1iopxarej4jk01v4cvol79hsrwd","channel":"/meta/subscribe","id":"362","subscription":"/event/My_Platform_Event__e","error":"400::The replayId for channel {/event/My_Platform_Event__e} wasn't found using the provided replay ID map {{}}. Ensure that the channel name you provided in the replay map is valid and matches the channel name used for subscribing.","successful":false}

I have been battling this one for a few days. Following the prescribed instructions in the developer guide, I get a successful response from the returned Promise. However, when an event is received the error above is surfaced. 

I can add source code to the question, if necessary, but just wondering if anyone else has encountered the same recently and found a simple solution. 
I'm trying to write a test class and load bunch of test lead's data but for some reason when I call the static resource (that has my CSV) is not recognizing the custom fields. Example, Lead_insurance_Id__c

My CSV file - static resource:
// Example of how my CSV looks like

Id, Firstname, Lastname, Leads_Insurance_ID__c,..etc

000012, Fares, Alsyoufi, 12184111, ..etc
000011, Fare,syoufi, 12184211, ..etc
000013, Fares, syouf, 12184311, ..etc

My test class:
 
@isTest 
global class DataUtil {
    static testmethod void testLoadData() {
        // Load the test accounts from the static resource
        List<sObject> ls = Test.loadData(Account.sObjectType, 'TestData');
        
       }
}

Error message: 

User-added image

Seems like the standard Salesforce fields didn't cause any execptions but custom fields did (I tried other one beside Lead_Insurance_Id__c) and I still got the same error message. 

P.S:
I've tried to change my CSV header to all of these formats but non helped:

LEADS_INSURANCE_ID__c
Leads_insurance_Id__c
Lead.DLeads_insurance_Id__c
Insurance ID (Field's label)