function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
John AthitakisJohn Athitakis 

Possible very easy question (Attempt to Dereference null object)

I'm working on a quick bit of code to leverage a managed packed with Hip Chat and I'm getting an error in production that is not showing up in my sandbox.

The code is incredible basic, which is what is ultimately confusing me. The managed package is expecting a String Sobject name. The trigger also seems to work, but rather, it's the test class which is causing the issue.

Trigger

 

trigger ScopingRequestInsertedHipChatWebhook on Scoping_Requests__c (after insert) {
        HCFS.HipChat.notify();
}

Test Class (Which is causing the following error: 
System.NullPointerException: Attempt to de-reference a null object ) on the line following my static void
 
@isTest
public class ScopingRequestHipChatWebhookTriggerTest {
    
    @isTest
    static void testTriggerAfterInsert() {
        HCFS.HipChatTriggerTestHelper.testAfterInsert('Scoping_Requests__c');
    }
}


The API Name for the object is Scoping_Requests__c, and in Sandbox it's causing me no errors (tests execute correctly.If I change the value from 'Scoping_Requests__c' to something else for a test, I correctly receive a 'null object' error). In production however I'm failing deploys with the very same error even though everything matches. 

Thoughts? 

Numaan A.MNumaan A.M
Hi Jhon,

Do you have 'Scoping_Requests__c' object in production? If not create one and check out.

Regards,
Numaan
John AthitakisJohn Athitakis
Yes it exists in production, its been used for months and the sandbox version of it was actually via a sandbox refresh. That is what is so confusing. 
John AthitakisJohn Athitakis
Any help here would be really appreciated!