Shubh04sep (Community Member) asked a question.

Getting two error in veracode for android projects:
1. While installing green light plugin in IntelliJ getting below exception
2. While installing green light plugin in android studio getting : "java: package R does not exist"
  1. Plugin 'com.veracode.greenlight.intellij.plugin.id' failed to initialize and will be disabled. Please restart IntelliJ IDEA.

 

java.lang.ClassNotFoundException: com.veracode.greenlight.intellij.plugin.ui.widgets.common.ContainerPanel

       PluginClassLoader(plugin=PluginDescriptor(name=Veracode Greenlight, id=com.veracode.greenlight.intellij.plugin.id, descriptorPath=plugin.xml, path=~/Library/Application Support/JetBrains/IntelliJIdea2021.2/plugins/com.veracode.greenlight.intellij-idea-ide, version=1.5.6.202102160526-RELEASE, package=null), packagePrefix=null, instanceId=247, state=active)

  at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:235)

  at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)

  at com.intellij.serviceContainer.ComponentManagerImpl.registerComponent(ComponentManagerImpl.kt:441)

  at com.intellij.serviceContainer.ComponentManagerImpl.registerComponents(ComponentManagerImpl.kt:380)

  at com.intellij.serviceContainer.ComponentManagerImpl.access$registerComponents(ComponentManagerImpl.kt:58)

  at com.intellij.serviceContainer.ComponentManagerImpl.registerComponents(ComponentManagerImpl.kt:255)

  at com.intellij.openapi.client.ClientAwareComponentManager.registerComponents(ClientAwareComponentManager.kt:63)

  at com.intellij.openapi.project.impl.ProjectLoadHelper.registerComponents(projectLoader.kt:25)

  at com.intellij.openapi.project.impl.ProjectManagerImpl.initProject(ProjectManagerImpl.java:176)

  at com.intellij.openapi.project.impl.ProjectManagerExImpl.prepareProject(ProjectManagerExImpl.kt:270)

  at com.intellij.openapi.project.impl.ProjectManagerExImpl.access$prepareProject(ProjectManagerExImpl.kt:57)

  at com.intellij.openapi.project.impl.ProjectManagerExImpl$doOpenAsync$1.invoke(ProjectManagerExImpl.kt:119)

  at com.intellij.openapi.project.impl.ProjectManagerExImpl$doOpenAsync$1.invoke(ProjectManagerExImpl.kt:57)

  at com.intellij.openapi.project.impl.ProjectUiFrameAllocator$run$progressRunner$1.apply(ProjectFrameAllocator.kt:94)

  at com.intellij.openapi.project.impl.ProjectUiFrameAllocator$run$progressRunner$1.apply(ProjectFrameAllocator.kt:71)

  at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:243)

  at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:183)

  at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:705)

  at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:647)

  at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:63)

  at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:170)

  at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:243)

  at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)

  at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1692)

  at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)

  at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)

  at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)

  at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)

  at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)

-------------------------------------------------------------------------------

2.java: package R does not exist

 


  • Hello @Shubh04sep (Community Member)​ ,

     

    Thank you for reaching out to the Community.

     

    After reviewing this information, it appears you are using an unsupported version of IntelliJ. Unfortunately IntelliJ 2021.2 is currently not a supported version.

     

    Please refer to the link for the supported matrix guide. https://community.veracode.com/s/article/Support-Matrix.

     

    If the information we’ve provided you has helped resolve your challenge (or answered your question), we would appreciate it if you could mark the response that was helpful with “Select as Best”. This will help other Community members who come across your question as a similar challenge they might be facing and your best answer will help them find the right solution as well.

     

    Best regards,

    Steven

    Veracode Support Engineer

    Expand Post
  • Shubh04sep (Community Member)

    Hi @Steven D., Veracode Support (Veracode)​ 

    Thank you for your support, now plugin is installed in IntelliJ too, but problem is different.

    I am using android studio and IntelliJ and same issue I am getting in both for my android project we are getting : "java: package R does not exist"

    Attaching a screenshot have a look.

    and this is bit critical to us and we are stuck. please help us out

     

    Screenshot 2021-10-01 at 7.03.00 PMThanks,

    Shubham

    Expand Post
  • Hi @Shubh04sep (Community Member)​ ,

     

    Thank you for the information. Can I ask that you please provide some additional information?

     

    IDE: Android Studio Version

    Plugin Version

    Environment

     

    Thank you

    Steven

    Veracode Support Engineer

    Expand Post
    • Shubh04sep (Community Member)

      Hi @Steven D., Veracode Support (Veracode)​ 

      Thank you for your reply

      Android Studio Version : Arctic Fox | 2020.3.1 Patch 2

      Intelli J IDE version : 20.3.4 (Ultimate Edition)

      Veracode GreenLite Plugin Version : 1.5.6.20211021600626 -Release Veracode

      Java version : Tried on all 8, 11, 14

      OS : Mac(Big sur 11.5.2 ), Windows(10) (Tried on both)

      Compile sdk version : 29

      Target Sdk version : 29

       

      I tried on both Intelli j IDE and Android studio but getting same error.

      Attaching a screen shot for IDE version and green light plugin version.

       

      GreenLight PluginScreenshot 2021-10-02 at 8.47.00 AMScreenshot 2021-10-02 at 8.48.11 AM 

       

       

      Expand Post
    • Shubh04sep (Community Member)

      Hello @Steven D., Veracode Support (Veracode)​ 

       

      Thank you for your help I raised the ticket and assigned it to you.

      Please have a look.

      But I am unable to add the shnuing veracode community getting error attaching the screen shot but when I added only you it's send successfully.So please take care of that .

      This is bit critical to us.

      Let me know if any thing else is required from my end.

      Screenshot 2021-10-04 at 7.09.02 PM 

      Thank you.

      Shubham Dubey

      Expand Post
      • Hello @Shubh04sep (Community Member)​ ,

         

        Hi Shubh04sep,

         

        I see that the ticket has been assign to someone in our integrations team, and offered you a solution. Please continue to work with this team member. I have also attached his recommendations in the link below.

         

        https://stackoverflow.com/questions/28522144/where-is-the-r-java-file-in-android-studio

         

        Scroll down near the bottom and you will see an AS 4.1 write-up where to find the R.jar file. Right click on it and hit "Add as Library". Once I added R.jar as a libriary, Greenlight was able to scan. See screenshot. Can you try adding the R.jar file as a library with one of your test projects and see if it resolves the issue for you? It has for many other customers so I believe it will fix this issue for you. Let me know.

         

        Best regards,

        Steven

        Expand Post
      • Shubh04sep (Community Member)

        Hi @Steven D., Veracode Support (Veracode)​ 

        Thanks a lot for you support,

        it's working for java code only but when I trying on Kotlin + java code it showing me unsupported plugin error attaching a screen shot for your reference.

        Screenshot 2021-10-05 at 7.40.27 PMThanks,

        Shubham Dubey

        Expand Post
  • Hello @Shubh04sep (Community Member)​ ,

     

    Here is the response to ticket 00424279 to put closer on this post here in the Community.

     

    There may not be any flaws in the code. Or if the file and/or package being scanned by Greenlight is just defining the query to be executed but never actually does the execution, then it's possible that the execution occurs elsewhere in the application. Greenlight will not detect the issue. I don't know this is the case for you. As a test, you could add a flaw, for example, hard coded password. 

     

    String password = "123456";

     

    and see if Greenlight finds the flaw. If not, the execution path could be outside this file. Try scanning another file that you believe should have a flaw.

     

    If the information we’ve provided you has helped resolve your challenge (or answered your question), we would appreciate it if you could mark the response that was helpful with “Select as Best”. This will help other Community members who come across your question as a similar challenge they might be facing and your best answer will help them find the right solution as well.

     

    Steven

    Veracode Support Engineer

    Expand Post

Topics (6)

No articles found
Loading

Ask the Community

Get answers, share a use case, discuss your favorite features, or get input from the community.