-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] InternalExecutionError on Standard Salesforce methods #1409
Comments
Url.getOrgDomainUrl().toExternalForm() is causing InternalExecution Error String url = Url.getOrgDomainUrl().toExternalForm() + '/lightning/n/Specright_Network?c__tab=Search&c__object=' + objectApiName + '&c__uuid=' + recordId; "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: UnimplementedMethodException: ApexStringValue:getOrgDomainUrl, vertex=MethodCallExpressionVertex{fullMethodName=Url.getOrgDomainUrl, referenceVertex=LazyVertex{result=ReferenceExpression{properties={FirstChild=true, Names=[Url], BeginLine=51, DefiningType_CaseSafe=sn_commentcallback, LastChild=true, DefiningType=SN_CommentCallback, EndLine=51, Name_CaseSafe=url, childIdx=0, BeginColumn=17, ReferenceType=METHOD, Name=Url}}}, chainedNames=[Url], properties={FirstChild=true, FullMethodName=Url.getOrgDomainUrl, BeginLine=51, FullMethodName_CaseSafe=url.getorgdomainurl, DefiningType_CaseSafe=sn_commentcallback, LastChild=true, DefiningType=SN_CommentCallback, EndLine=51, MethodName_CaseSafe=getorgdomainurl, childIdx=0, BeginColumn=21, MethodName=getOrgDomainUrl}}: com.salesforce.graph.symbols.apex.ApexStringValue.apply(ApexStringValue.java:708);com.salesforce.graph.symbols.PathScopeVisitor.handleApexValueMethod(PathScopeVisitor.java:1487);com.salesforce.graph.symbols.PathScopeVisitor.afterVisit(PathScopeVisitor.java:1242);com.salesforce.graph.symbols.DefaultSymbolProviderVertexVisitor.afterVisit(DefaultSymbolProviderVertexVisitor.java:800);com.salesforce.graph.vertex.MethodCallExpressionVertex.afterVisit(MethodCallExpressionVertex.java:79);com.salesforce.graph.ops.expander.ApexPathExpander.performAfterVisit(ApexPathExpander.java:577)","https://forcedotcom.github.io/sfdx-scanner/en/v3.x/salesforce-graph-engine/rules/#ApexFlsViolationRule","InternalExecutionError","sfge" |
Schema.SObjectType: newSObjectType method is causing Internal Execution Error Schema.SObjectType sObjectType = ((SObject) (Type.forName('Schema.' + sObjectAPIName).newInstance())).getSObjectType(); "1","3","/Users/jae/code/specright-network/specright-network/main/default/classes/SN_NetworkController.cls","903","19","SN_NetworkController","saveNetworkRecord","","","","InternalExecutionError","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: MethodCallExpressionVertex{fullMethodName=sObjectType.newSObject, referenceVertex=LazyVertex{result=ReferenceExpression{properties={FirstChild=true, Names=[sObjectType], BeginLine=962, DefiningType_CaseSafe=sn_networkcontroller, LastChild=false, DefiningType=SN_NetworkController, EndLine=962, Name_CaseSafe=sobjecttype, childIdx=0, BeginColumn=14, ReferenceType=METHOD, Name=sObjectType}}}, chainedNames=[sObjectType], properties={FirstChild=false, FullMethodName=sObjectType.newSObject, BeginLine=962, FullMethodName_CaseSafe=sobjecttype.newsobject, DefiningType_CaseSafe=sn_networkcontroller, LastChild=true, DefiningType=SN_NetworkController, EndLine=962, MethodName_CaseSafe=newsobject, childIdx=1, BeginColumn=26, MethodName=newSObject}}: com.salesforce.graph.symbols.apex.ApexValue.validateParameterSize(ApexValue.java:610);com.salesforce.graph.symbols.apex.schema.SObjectType._applyMethod(SObjectType.java:131);com.salesforce.graph.symbols.apex.schema.SObjectType.executeMethod(SObjectType.java:121);com.salesforce.graph.symbols.PathScopeVisitor.afterMethodCall(PathScopeVisitor.java:659);com.salesforce.graph.symbols.DefaultSymbolProviderVertexVisitor.afterMethodCall(DefaultSymbolProviderVertexVisitor.java:318);com.salesforce.graph.ops.expander.ApexPathExpander.handleMethodCall(ApexPathExpander.java:681)","https://forcedotcom.github.io/sfdx-scanner/en/v3.x/salesforce-graph-engine/rules/#ApexFlsViolationRule","InternalExecutionError","sfge" |
This is a duplicate of #1044. As a workaround, try not to use the variable names same as the class name for e.g url and Url. |
@sagar-j-sfdc The original raised exception is not the same as the one you suggest this is a duplicate of. Additionally your work around doesn't work. public with sharing class AllThingsDFAHates {
@AuraEnabled
public static void noSetScale(){
Decimal dec = 1.00;
dec.setScale(2);
}
}
|
Decimal.setScale method is causing InternalExecution Error
Double value = Decimal.valueOf(Double.valueOf(fieldValue)).setScale(scale);
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: MethodCallExpressionVertex{fullMethodName=setScale, referenceVertex=LazyVertex{result=ReferenceExpression{properties={FirstChild=true, BeginLine=1453, DefiningType_CaseSafe=sn_networkcontroller, LastChild=false, DefiningType=SN_NetworkController, EndLine=1453, Name_CaseSafe=, childIdx=0, BeginColumn=65, ReferenceType=METHOD, Name=}}}, chainedNames=[], properties={FirstChild=true, FullMethodName=setScale, BeginLine=1453, FullMethodName_CaseSafe=setscale, DefiningType_CaseSafe=sn_networkcontroller, LastChild=false, DefiningType=SN_NetworkController, EndLine=1453, MethodName_CaseSafe=setscale, childIdx=0, BeginColumn=65, MethodName=setScale}}: com.salesforce.graph.symbols.apex.ApexSimpleValue.apply(ApexSimpleValue.java:55);com.salesforce.graph.symbols.apex.ApexNumberValue.apply(ApexNumberValue.java:42);com.salesforce.graph.symbols.apex.ApexDecimalValue.apply(ApexDecimalValue.java:49);com.salesforce.graph.symbols.PathScopeVisitor.handleApexValueMethod(PathScopeVisitor.java:1487);com.salesforce.graph.symbols.PathScopeVisitor.afterVisit(PathScopeVisitor.java:1242);com.salesforce.graph.symbols.DefaultSymbolProviderVertexVisitor.afterVisit(DefaultSymbolProviderVertexVisitor.java:800)","https://forcedotcom.github.io/sfdx-scanner/en/v3.x/salesforce-graph-engine/rules/#ApexFlsViolationRule","InternalExecutionError","sfge"
The text was updated successfully, but these errors were encountered: