AnalyzeFlows - Installation not possible
When trying to install AnalyzeFlows (1.0.2) on my sandbox (Winter '23) via https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5G000004J7J5QAK, the installation fails:
Your request to install package "AnalyzeFlows ver 0.1" was unsuccessful. None of the data or setup information in your salesforce.com organization was affected.
If your install continues to fail, contact Salesforce CRM Support through your normal channels and provide the following information.
Organization: xxx User: xxx Package: AnalyzeFlows (04t5G000004J7J5) Error Number: 1943818169-107204 (-1524668929) Problem:
Method does not exist or incorrect signature: void isRunningTest() from the type Test GetFlowMetadata: Method does not exist or incorrect signature: void isRunningTest() from the type Test
Dependent class is invalid and needs recompilation: Class GetFlowMetadata : Method does not exist or incorrect signature: void isRunningTest() from the type Test GetFlowMetadataTest: Dependent class is invalid and needs recompilation: Class GetFlowMetadata : Method does not exist or incorrect signature: void isRunningTest() from the type Test
(Analyze_Flows) Get_Flow_1 (Action) - We can't find an action with the name and action type that you specified. Analyze_Flows: Get_Flow_1 (Action) - We can't find an action with the name and action type that you specified.
@SoftCreatR that sounds like you have a custom Apex class called Test in your org, and it's causing problems during the installation because GetFlowMetadata tries to use Test.isRunningTest(). I'd try to delete the Test class if you can, and then install the package.
We don't have a class called Test.
PS > sf project retrieve start --metadata ApexClass:Test -o Sandbox
Preparing retrieve request... - Sending request to org
Preparing retrieve request... Succeeded
» Warning: Nothing retrieved
Also searched for class Test, but only found a custom class named TestUtils. There's a test class, but that's the SF default class:
global class /*System.*/Test
{
global Test()
{
}
global static void calculatePermissionSetGroup(List<String> psgIds)
{
}
global static void calculatePermissionSetGroup(String psgId)
{
}
global static void clearApexPageMessages()
{
}
global Object clone()
{
}
global static Object createStub(Type parentType, StubProvider stubProvider)
{
}
global static void enableChangeDataCapture()
{
}
global static List<Id> enqueueBatchJobs(Integer n)
{
}
global static EventBus.TestBroker getEventBus()
{
}
global static List<Id> getFlexQueueOrder()
{
}
global static Id getStandardPricebookId()
{
}
global static Object invokeContinuationMethod(Object controller, Continuation continuation)
{
}
global static Object invokePage(PageReference p)
{
}
global static Boolean isRunningTest()
{
}
global static List<SObject> loadData(SObjectType sobjectType, String staticResourceName)
{
}
global static QuickAction.SendEmailQuickActionDefaults newSendEmailQuickActionDefaults(Id contextId, Id replyToId)
{
}
global static void setContinuationResponse(String label, HttpResponse response)
{
}
global static void setCreatedDate(Id id, Datetime dt)
{
}
global static void setCurrentPage(Object pageReference)
{
}
global static void setCurrentPageReference(Object pageReference)
{
}
global static void setFixedSearchResults(List<String> searchResultsIds)
{
}
global static void setMock(Type interfaceType, Object mock)
{
}
global static void setReadOnlyApplicationMode(Boolean readOnlyApplicationMode)
{
}
global static void startTest()
{
}
global static void stopTest()
{
}
global static void testInstall(InstallHandler script, Version version)
{
}
global static void testInstall(InstallHandler script, Version version, Boolean isPush)
{
}
global static void testSandboxPostCopyScript(SandboxPostCopy script, Id organizationId, Id sandboxId, String sandboxName)
{
}
global static void testSandboxPostCopyScript(SandboxPostCopy script, Id organizationId, Id sandboxId, String sandboxName, Boolean isRunAsAutoProcUser)
{
}
global static void testUninstall(UninstallHandler script)
{
}
}
However, a simple fix would be to use System.Test instead of Test.