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
SFDCConsultant.ax449SFDCConsultant.ax449 

Problem with installing managed package (errors in test methods)

I am trying to install a managed package that I created.  Here is the error from the package instalelr

 

testsuite_uploadsounds.testGetSoundFilesPOST();
testsuite_uploadsounds.testUpload()
Apex Classes(01p50000000D7M7)System.NullPointerException: Attempt to de-reference a null object
(callfire)

External entry point;
System.NullPointerException: Attempt to de-reference a null object
(callfire)

External entry point

 

Here is my test code:

@isTest
private class TestSuite_UploadSounds {

    
    static testMethod void testUpload() {
        PageReference pageRef = Page.UploadSounds;
        Test.setCurrentPageReference(pageRef);

        UploadSounds_ctlr pageCon = new UploadSounds_ctlr();
        
    }
    
     static testMethod void testGetSoundFilesPOST() {
        PageReference pageRef = Page.UploadSounds;
        Test.setCurrentPageReference(pageRef);

        UploadSounds_ctlr pageCon = new UploadSounds_ctlr();
        
        List<CFSoundfileDialer.SoundFileDescriptionType> CFSoundFileList = new List<CFSoundfileDialer.SoundFileDescriptionType>();
        
        
       CFSoundfileDialer.SoundFileDescriptionType soundFile = new CFSoundfileDialer.SoundFileDescriptionType();
       
       
       
        CFSoundFileList.add(soundFile);
        
        
        pageCon.getSoundFilesPOST(CFSoundFileList);
        
        
        pageCon.getSoundFiles();
        
        
    }

}

 

I have other packages that use the same method and they install perfectly.

 

Thank you,

Michael

 

 

 

Imran MohammedImran Mohammed

Check your Apex code if any variable is being used before initializing it.
if possible, post the code so that it will be helpful in identifying where the actual issue is.