Skip to content
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: Blob.toString #1627

Closed
jaelee125 opened this issue Sep 18, 2024 · 3 comments
Closed

[BUG] InternalExecutionError: Blob.toString #1627

jaelee125 opened this issue Sep 18, 2024 · 3 comments
Labels
BUG P3 Rarely Malfunction

Comments

@jaelee125
Copy link

Have you tried to resolve this issue yourself first?

Yes

Bug Description

Scanner run dfa is throwing an error when trying to use Blob.toString method

Output / Logs

"2","3","/Users/jae/code/specright/force-app/main/default/classes/ConfigureMassUpdateController.cls","344","30","ConfigureMassUpdateController","getUpdatedRecords","","","","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: TodoException: MethodCallExpressionVertex{fullMethodName=csvBlob.toString, referenceVertex=LazyVertex{result=ReferenceExpression{properties={FirstChild=true, Names=[csvBlob], BeginLine=365, DefiningType_CaseSafe=configuremassupdatecontroller, LastChild=true, DefiningType=ConfigureMassUpdateController, EndLine=365, Name_CaseSafe=csvblob, childIdx=0, BeginColumn=21, ReferenceType=METHOD, Name=csvBlob}}}, chainedNames=[csvBlob], properties={FirstChild=true, FullMethodName=csvBlob.toString, BeginLine=365, FullMethodName_CaseSafe=csvblob.tostring, DefiningType_CaseSafe=configuremassupdatecontroller, LastChild=false, DefiningType=ConfigureMassUpdateController, EndLine=365, MethodName_CaseSafe=tostring, childIdx=0, BeginColumn=29, MethodName=toString}}: com.salesforce.graph.symbols.apex.schema.SObjectField._applyMethod(SObjectField.java:155);com.salesforce.graph.symbols.apex.schema.SObjectField.apply(SObjectField.java:124);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)","https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/apexflsviolation-rule.html","InternalExecutionError","sfge"

Steps To Reproduce

List contentDocumentLinks = [SELECT ContentDocumentId FROM ContentDocumentLink WHERE LinkedEntityId = :changeRequestId AND ContentDocument.Title = :documentTitle WITH USER_MODE];
ContentVersion contentVersion = [SELECT Id, VersionData FROM ContentVersion WHERE ContentDocumentId = :contentDocumentLinks[0].ContentDocumentId AND IsLatest = true WITH USER_MODE];
Blob csvBlob = contentVersion.VersionData;

Expected Behavior

Error should not be happening on Blob.toString

Operating System

MacOS Sonoma 14.6.1

Salesforce CLI Version

@salesforce/cli/2.58.7 darwin-arm64 node-v20.17.0

Code Analyzer Plugin (@salesforce/sfdx-scanner) Version

@salesforce/sfdx-scanner 4.5.0

Java Version

openjdk 19.0.1 2022-10-18

Additional Context (Screenshots, Files, etc)

No response

Workaround

No response

Urgency

Low

@jfeingold35
Copy link
Collaborator

Thanks for bringing this to our attention. We'll add it to our backlog.

@jfeingold35 jfeingold35 added the BUG P3 Rarely Malfunction label Sep 19, 2024
Copy link

git2gus bot commented Sep 19, 2024

This issue has been linked to a new work item: W-16789293

@stephen-carter-at-sf
Copy link
Collaborator

Duplicate of 1497

@stephen-carter-at-sf stephen-carter-at-sf closed this as not planned Won't fix, can't repro, duplicate, stale Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG P3 Rarely Malfunction
Projects
None yet
Development

No branches or pull requests

3 participants