You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
johnbelosf
changed the title
UnexpectedException: SObjectType is not available in DescribeSObjectResult
[BUG] UnexpectedException: SObjectType is not available in DescribeSObjectResult
Feb 20, 2024
Ran the graph engine scan on our application source as shown below and report shows the InternalExecutionError rules.
sfdx scanner:run:dfa --format=csv --outfile=CodeAnalyzerDFA9.csv --target="./" --projectdir="./" --category="Security" --sfgejvmargs "-Xmx30g" --pathexplimit -1 --rule-thread-count 2 --rule-thread-timeout 21600000
Description column shows the following:
Graph Engine identified your source and sink, but you must manually verify that you have a sanitizer in this path. Then, add an engine directive to skip the path. Next, create a Github issue for the Code Analyzer team that includes the error and stack trace. After we fix this issue, check the Code Analyzer release notes for more info. Error and stacktrace: UnexpectedException: SObjectType is not available in DescribeSObjectResult: ApexStandardValue{apexType='Schema.DescribeSObjectResult'} ApexValue(DescribeSObjectResult) {status=INITIALIZED, declarationVertex=null, valueVertex=null, resolvedValues={}, returnedFrom=ApexStandardValue{apexType='Schema.SObjectField'} ApexValue(SObjectField) {status=INITIALIZED, declarationVertex=null, valueVertex=null, resolvedValues={}, returnedFrom=ApexValue(ApexFieldDescribeMapValue) {status=INITIALIZED, declarationVertex=null, valueVertex=null, resolvedValues={}, returnedFrom=ApexStandardValue{apexType='Schema.DescribeSObjectResult'} ApexValue(DescribeSObjectResult) {status=INITIALIZED, declarationVertex=null, valueVertex=null, resolvedValues={}, returnedFrom=SObjectType{associatedObjectType='null'} ApexStandardValue{apexType='Schema.SObjectType'} ApexValue(SObjectType) {status=INDETERMINANT, declarationVertex=SObjectType{associatedObjectType='null'} ApexStandardValue{apexType='Schema.SObjectType'} ApexValue(SObjectType) {status=INDETERMINANT, declarationVertex=VariableDeclaration{properties={FirstChild=false, BeginLine=753, Type=SObjectType, DefiningType_CaseSafe=ecmcustomsync, LastChild=true, DefiningType=EcmCustomSync, EndLine=753, Name_CaseSafe=sotype, childIdx=1, BeginColumn=21, Name=soType}}, valueVertex=MethodCallExpressionVertex{fullMethodName=so.getSObjectType, referenceVertex=LazyVertex{result=ReferenceExpression{properties={FirstChild=true, Names=[so], BeginLine=753, DefiningType_CaseSafe=ecmcustomsync, LastChild=true, DefiningType=EcmCustomSync, EndLine=753, Name_CaseSafe=so, childIdx=0, BeginColumn=30, ReferenceType=METHOD, Name=so}}}, chainedNames=[so], properties={FirstChild=true, FullMethodName=so.getSObjectType, BeginLine=753, FullMethodName_CaseSafe=so.getsobjecttype, DefiningType_CaseSafe=ecmcustomsync, LastChild=false, DefiningType=EcmCustomSync, EndLine=753, MethodName_CaseSafe=getsobjecttype, childIdx=0, BeginColumn=33, MethodName=getSObjectType}}, resolvedValues={MethodCallExpressionVertex{fullMethodName=so.getSObjectType, referenceVertex=LazyVertex{result=ReferenceExpression{properties={FirstChild=true, Names=[so], BeginLine=753, DefiningType_CaseSafe=ecmcustomsync, LastChild=true, DefiningType=EcmCustomSync, EndLine=753, Name_CaseSafe=so, childIdx=0, BeginColumn=30, ReferenceType=METHOD, Name=so}}}, chainedNames=[so], properties={FirstChild=true, FullMethodName=so.getSObjectType, BeginLine=753, FullMethodName_CaseSafe=so.getsobjecttype, DefiningType_CaseSafe=ecmcustomsync, LastChild=false, DefiningType=EcmCustomSync, EndLine=753, MethodName_CaseSafe=getsobjecttype, childIdx=0, BeginColumn=33, MethodName=getSObjectType}}=NewKeyValueObjectExpression{properties={FirstChild=true, BeginLine=55, Type=Ecm_Object_Store__c, DefiningType_CaseSafe=ecmmetadatamodel, LastChild=false, DefiningType=EcmMetadataModel, EndLine=55, childIdx=0, BeginColumn=34}}}, returnedFrom=null, invocableExpression=null, method=null}, valueVertex=MethodCallExpressionVertex{fullMethodName=so.getSObjectType, referenceVertex=LazyVertex{result=ReferenceExpression{properties={FirstChild=true, Names=[so], BeginLine=753, DefiningType_CaseSafe=ecmcustomsync, LastChild=true, DefiningType=EcmCustomSync, EndLine=753, Name_CaseSafe=so, childIdx=0, BeginColumn=30, ReferenceType=METHOD, Name=so}}}, chainedNames=[so], properties={FirstChild=true, FullMethodName=so.getSObjectType, BeginLine=753, FullMethodName_CaseSafe=so.getsobjecttype, DefiningType_CaseSafe=ecmcustomsync, LastChild=false, DefiningType=EcmCustomSync, EndLine=753, MethodName_CaseSafe=getsobjecttype, childIdx=0, BeginColumn=33, MethodName=getSObjectType}}, resolvedValues={MethodCallExpressionVertex{fullMethodName=so.getSObjectType, referenceVertex=LazyVertex{result=ReferenceExpression{properties={FirstChild=true, Names=[so], BeginLine=753, DefiningType_CaseSafe=ecmcustomsync, LastChild=true, DefiningType=EcmCustomSync, EndLine=753, Name_CaseSafe=so, childIdx=0, BeginColumn=30, ReferenceType=METHOD, Name=so}}}, chainedNames=[so], properties={FirstChild=true, FullMethodName=so.getSObjectType, BeginLine=753, FullMethodName_CaseSafe=so.getsobjecttype, DefiningType_CaseSafe=ecmcustomsync, LastChild=false, DefiningType=EcmCustomSync, EndLine=753, MethodName_CaseSafe=getsobjecttype, childIdx=0, BeginColumn=33, MethodName=getSObjectType}}=NewKeyValueObjectExpression{properties={FirstChild=true, BeginLine=55, Type=Ecm_Object_Store__c, DefiningType_CaseSafe=ecmmetadatamodel, LastChild=false, DefiningType=EcmMetadataModel, EndLine=55, childIdx=0, BeginColumn=34}}}, returnedFrom=null, invocableExpression=null, method=null}, invocableExpression=MethodCallExpressionVertex{fullMethodName=soType.getDescribe, referenceVertex=LazyVertex{result=ReferenceExpression{properties={FirstChild=true, Names=[soType], BeginLine=754, DefiningType_CaseSafe=ecmcustomsync, LastChild=true, DefiningType=EcmCustomSync, EndLine=754, Name_CaseSafe=sotype, childIdx=0, BeginColumn=53, ReferenceType=METHOD, Name=soType}}}, chainedNames=[soType], properties={FirstChild=true, FullMethodName=soType.getDescribe, BeginLine=754, FullMethodName_CaseSafe=sotype.getdescribe, DefiningType_CaseSafe=ecmcustomsync, LastChild=true, DefiningType=EcmCustomSync, EndLine=754, MethodName_CaseSafe=getdescribe, childIdx=0, BeginColumn=60, MethodName=getDescribe}}, method=Method{properties={FirstChild=false, BeginLine=2, IsStandard=true, DefiningType_CaseSafe=schema.sobjecttype, LastChild=false, DefiningType=Schema.SObjectType, Constructor=false, EndLine=2, Name_CaseSafe=getdescribe, childIdx=1, ReturnType=Schema.DescribeSObjectResult, Name=getDescribe, Arity=0, ReturnType_CaseSafe=schema.describesobjectresult, BeginColumn=38}}}, invocableExpression=MethodCallExpressionVertex{fullMethodName=fields.getMap, referenceVertex=LazyVertex{result=ReferenceExpression{properties={FirstChild=true, Names=[fields], BeginLine=754, DefiningType_CaseSafe=ecmcustomsync, LastChild=true, DefiningType=EcmCustomSync, EndLine=754, Name_CaseSafe=fields, childIdx=0, BeginColumn=74, ReferenceType=METHOD, Name=fields}}}, chainedNames=[fields], properties={FirstChild=true, FullMethodName=fields.getMap, BeginLine=754, FullMethodName_CaseSafe=fields.getmap, DefiningType_CaseSafe=ecmcustomsync, LastChild=false, DefiningType=EcmCustomSync, EndLine=754, MethodName_CaseSafe=getmap, childIdx=0, BeginColumn=81, MethodName=getMap}}, method=null}, invocableExpression=MethodCallExpressionVertex{fullMethodName=fieldMap.get, referenceVertex=LazyVertex{result=ReferenceExpression{properties={FirstChild=true, Names=[fieldMap], BeginLine=760, DefiningType_CaseSafe=ecmcustomsync, LastChild=false, DefiningType=EcmCustomSync, EndLine=760, Name_CaseSafe=fieldmap, childIdx=0, BeginColumn=39, ReferenceType=METHOD, Name=fieldMap}}}, chainedNames=[fieldMap], properties={FirstChild=true, FullMethodName=fieldMap.get, BeginLine=760, FullMethodName_CaseSafe=fieldmap.get, DefiningType_CaseSafe=ecmcustomsync, LastChild=false, DefiningType=EcmCustomSync, EndLine=760, MethodName_CaseSafe=get, childIdx=0, BeginColumn=48, MethodName=get}}, method=null}, invocableExpression=MethodCallExpressionVertex{fullMethodName=sof.getDescribe, referenceVertex=LazyVertex{result=ReferenceExpression{properties={FirstChild=true, Names=[sof], BeginLine=766, DefiningType_CaseSafe=ecmcustomsync, LastChild=true, DefiningType=EcmCustomSync, EndLine=766, Name_CaseSafe=sof, childIdx=0, BeginColumn=21, ReferenceType=METHOD, Name=sof}}}, chainedNames=[sof], properties={FirstChild=true, FullMethodName=sof.getDescribe, BeginLine=766, FullMethodName_CaseSafe=sof.getdescribe, DefiningType_CaseSafe=ecmcustomsync, LastChild=true, DefiningType=EcmCustomSync, EndLine=766, MethodName_CaseSafe=getdescribe, childIdx=0, BeginColumn=25, MethodName=getDescribe}}, method=Method{properties={FirstChild=false, BeginLine=2, IsStandard=true, DefiningType_CaseSafe=schema.sobjectfield, LastChild=false, DefiningType=Schema.SObjectField, Constructor=false, EndLine=2, Name_CaseSafe=getdescribe, childIdx=1, ReturnType=Schema.DescribeFieldResult, Name=getDescribe, Arity=0, ReturnType_CaseSafe=schema.describefieldresult, BeginColumn=36}}}: com.salesforce.rules.fls.apex.operations.FlsValidationRepresentation.setObject(FlsValidationRepresentation.java:86);com.salesforce.rules.fls.apex.operations.SchemaBasedValidationAnalyzer.convert(SchemaBasedValidationAnalyzer.java:183);com.salesforce.rules.fls.apex.operations.SchemaBasedValidationAnalyzer.checkForValidation(SchemaBasedValidationAnalyzer.java:77);com.salesforce.rules.fls.apex.operations.FlsValidationCentral.checkSchemaBasedFlsValidation(FlsValidationCentral.java:71);com.salesforce.rules.fls.apex.AbstractFlsVisitor.afterVisit(AbstractFlsVisitor.java:67);com.salesforce.graph.vertex.StandardConditionVertex$Negative.afterVisit(StandardConditionVertex.java:82)
The text was updated successfully, but these errors were encountered: