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] TodoException: NewObjectExpression #1004

Closed
efwalter opened this issue Mar 6, 2023 · 5 comments
Closed

[BUG] TodoException: NewObjectExpression #1004

efwalter opened this issue Mar 6, 2023 · 5 comments
Labels
duplicate This issue or pull request already exists SFGE Issues related to the Salesforce Graph Engine

Comments

@efwalter
Copy link

efwalter commented Mar 6, 2023

Describe the bug
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: NewObjectExpression{properties={FirstChild=false, BeginLine=245, Type=KWLEG_Bills_Search.ElasticSearch, DefiningType_CaseSafe=kwleg_lwcmethods, LastChild=true, DefiningType=KWLEG_LWCMethods, EndLine=245, childIdx=1, BeginColumn=65}}: com.salesforce.graph.symbols.PathScopeVisitor.updateInvocableWithParametersVertex(PathScopeVisitor.java:1365);com.salesforce.graph.symbols.PathScopeVisitor.afterVisit(PathScopeVisitor.java:1326);com.salesforce.graph.symbols.InnerScope.afterVisit(InnerScope.java:62);com.salesforce.graph.symbols.DefaultSymbolProviderVertexVisitor.afterVisit(DefaultSymbolProviderVertexVisitor.java:784);com.salesforce.graph.vertex.NewObjectExpressionVertex.afterVisit(NewObjectExpressionVertex.java:52);com.salesforce.graph.ops.expander.ApexPathExpander.visit(ApexPathExpander.java:705)

Screenshots
Screenshot 2023-03-06 at 16 48 40

Desktop (please complete the following information):

  • Mac OS Ventura 13.1
  • @salesforce/sfdx-scanner 3.10.0

Additional context
The line which is throwing the error is just a wrapper object

"Workaround":

"Urgency":

@rmohan20
Copy link
Contributor

@efwalter Thanks for logging the bug and notifying us.
Can you please help us with more information:

  1. Is the right-hand-side (kwbill.kwi.KnowWho.RequestOptions.Elastic) a type, or is it a static variable declared in another place?
  2. Is the left-hand-side an inner class? What object is it a wrapper for?
  3. Do these declarations live within the projectdir or are these references to dependencies in another namespace that's not available here?

If you could provide us with a mockup of how these classes/objects are set up and which ones are sObjects, our investigation can be sped up some more. Thank you!

@efwalter
Copy link
Author

  1. Is the right-hand-side (kwbill.kwi.KnowWho.RequestOptions.Elastic) a type, or is it a static variable declared in another place?
    Everything there is a DTO.

  2. Is the left-hand-side an inner class? What object is it a wrapper for?
    dto

  3. Do these declarations live within the projectdir or are these references to dependencies in another namespace that's not available here?
    yes, these do live within the same projecdir, same namespace.

@efwalter
Copy link
Author

efwalter commented Aug 3, 2023

Any news? I'm facing a really similar problem in another project:

Describe the bug:

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: NewObjectExpression{properties={FirstChild=false, BeginLine=97, Type=KWD_ZDM_Output.Customer, DefiningType_CaseSafe=kwd_authorizeapp, LastChild=true, DefiningType=KWD_AuthorizeApp, EndLine=97, childIdx=1, BeginColumn=29}}: com.salesforce.graph.symbols.PathScopeVisitor.updateInvocableWithParametersVertex(PathScopeVisitor.java:1365);com.salesforce.graph.symbols.PathScopeVisitor.afterVisit(PathScopeVisitor.java:1326);com.salesforce.graph.symbols.InnerScope.afterVisit(InnerScope.java:62);com.salesforce.graph.symbols.DefaultSymbolProviderVertexVisitor.afterVisit(DefaultSymbolProviderVertexVisitor.java:784);com.salesforce.graph.vertex.NewObjectExpressionVertex.afterVisit(NewObjectExpressionVertex.java:52);com.salesforce.graph.ops.expander.ApexPathExpander.performAfterVisit(ApexPathExpander.java:577)

The line 97 in the KWD_AuthorizeApp:

    kwJson.KnowWho.Customer = new KWD_ZDM_Output.Customer();

Both classes are DTOs

@jfeingold35
Copy link
Collaborator

@efwalter , sorry, no updates at this time. I understand your frustration, but unfortunately the team's bandwidth is currently extremely limited, and we're having to make some difficult choices about where to invest our time. We'll do our best to provide you an update in a timely manner, but we just can't make any promises right now.

@stephen-carter-at-sf stephen-carter-at-sf added the SFGE Issues related to the Salesforce Graph Engine label May 23, 2024
@stephen-carter-at-sf stephen-carter-at-sf added duplicate This issue or pull request already exists and removed Bug - Need more info labels Jun 3, 2024
@stephen-carter-at-sf
Copy link
Collaborator

Marking this as a duplicate of #1497

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists SFGE Issues related to the Salesforce Graph Engine
Projects
None yet
Development

No branches or pull requests

4 participants