Skip to content

NullPointerException on scan in IntelliJ #491

@NVBPF

Description

@NVBPF

Describe the bug
When trying to run a local scan on a repository in IntelliJ, the window is stuck showing "Scanning...", with an error happening without being shown in the IDE.

To Reproduce
Setup JFrog plugin to an Artifactory instance with default settings, open JFrog window, and select "Trigger Scan".

Expected behavior
A scan to be performed, and results of the scan to be shown in the JFrog window.

Screenshots

Image

Versions

  • JFrog IDEA plugin version: 2.7.1
  • Operating system: Ubuntu 24.04.01
  • Xray version: 3.107.21

Additional context
Debug log:

2025-01-14 13:49:35,820 [15945731]   FINE - #com.jfrog.ide.idea.log.Logger - CI integration disabled - build name pattern is not set. Configure it under the JFrog CI Integration page in the configuration.
2025-01-14 13:49:37,219 [15947130]   FINE - #com.jfrog.ide.idea.log.Logger - GET https://INTERNAL_URL/xray/api/v1/system/version
2025-01-14 13:49:37,225 [15947136]   FINE - #com.jfrog.ide.idea.log.Logger - Scanning projects in the following paths: [/path/to/repository]
2025-01-14 13:49:37,226 [15947137]   FINE - #com.jfrog.ide.idea.log.Logger - GET https://INTERNAL_URL/xray/api/v1/system/version
2025-01-14 13:49:37,518 [15947429]   FINE - #com.jfrog.ide.idea.log.Logger - Received status 200 for GET https://INTERNAL_URL/xray/api/v1/system/version
2025-01-14 13:49:37,520 [15947431]   FINE - #com.jfrog.ide.idea.log.Logger - Scanning projects in the following paths: [/path/to/repository]
2025-01-14 13:49:37,533 [15947444]   INFO - #com.jfrog.ide.idea.log.Logger - The following directories are excluded from Xray scanning due to the defined Excluded Paths pattern:
/path/to/repository/.git
/path/to/repository/.idea
/path/to/repository/testing
2025-01-14 13:49:37,534 [15947445]   WARN - #com.jfrog.ide.idea.log.Logger - NullPointerException: Cannot invoke "com.intellij.notification.NotificationGroup.createNotification(String, String, com.intellij.notification.NotificationType)" because "com.jfrog.ide.idea.log.Logger.EVENT_LOG_NOTIFIER" is null: NullPointerException: Cannot invoke "com.intellij.notification.NotificationGroup.createNotification(String, String, com.intellij.notification.NotificationType)" because "com.jfrog.ide.idea.log.Logger.EVENT_LOG_NOTIFIER" is null
java.lang.NullPointerException: Cannot invoke "com.intellij.notification.NotificationGroup.createNotification(String, String, com.intellij.notification.NotificationType)" because "com.jfrog.ide.idea.log.Logger.EVENT_LOG_NOTIFIER" is null
        at com.jfrog.ide.idea.log.Logger.log(Logger.java:100)
        at com.jfrog.ide.idea.log.Logger.info(Logger.java:54)
        at com.jfrog.ide.common.utils.PackageFileFinder.<init>(PackageFileFinder.java:46)
        at com.jfrog.ide.idea.scan.ScannerFactory.refreshGenericScanners(ScannerFactory.java:68)
        at com.jfrog.ide.idea.scan.ScannerFactory.refreshScanners(ScannerFactory.java:51)
        at com.jfrog.ide.idea.scan.ScanManager.refreshScanners(ScanManager.java:144)
        at com.jfrog.ide.idea.scan.ScanManager.lambda$startScan$0(ScanManager.java:92)
        at java.base/java.lang.Thread.run(Thread.java:1583)
2025-01-14 13:49:37,534 [15947445]   INFO - STDERR - Exception in thread "Thread-636" java.lang.NullPointerException: Cannot invoke "com.intellij.notification.NotificationGroup.createNotification(String, String, com.intellij.notification.NotificationType)" because "com.jfrog.ide.idea.log.Logger.BALLOON_NOTIFIER" is null
2025-01-14 13:49:37,534 [15947445]   WARN - #com.jfrog.ide.idea.log.Logger - InterruptedException: : InterruptedException: 
2025-01-14 13:49:37,534 [15947445]   INFO - STDERR -    at com.jfrog.ide.idea.log.Logger.popupBalloon(Logger.java:110)
2025-01-14 13:49:37,534 [15947445]   INFO - STDERR -    at com.jfrog.ide.idea.log.Logger.error(Logger.java:91)
2025-01-14 13:49:37,534 [15947445]   INFO - STDERR -    at com.jfrog.ide.common.log.Utils.logError(Utils.java:18)
2025-01-14 13:49:37,534 [15947445]   INFO - STDERR -    at com.jfrog.ide.idea.scan.ScanManager.lambda$startScan$0(ScanManager.java:115)
2025-01-14 13:49:37,534 [15947445]   INFO - STDERR -    at java.base/java.lang.Thread.run(Thread.java:1583)
2025-01-14 13:49:37,548 [15947459]   FINE - #com.jfrog.ide.idea.log.Logger - Received status 200 for GET https://INTERNAL_URL/xray/api/v1/system/version
2025-01-14 13:49:37,548 [15947459]   FINE - #com.jfrog.ide.idea.log.Logger - GET https://INTERNAL_URL/xray/api/v1/entitlements/feature/secrets_detection
2025-01-14 13:49:37,636 [15947547]   FINE - #com.jfrog.ide.idea.log.Logger - Received status 200 for GET https://INTERNAL_URL/xray/api/v1/entitlements/feature/secrets_detection
2025-01-14 13:49:37,637 [15947548]   FINE - #com.jfrog.ide.idea.log.Logger - GET https://INTERNAL_URL/xray/api/v1/system/version
2025-01-14 13:49:37,788 [15947699]   FINE - #com.jfrog.ide.idea.log.Logger - Received status 200 for GET https://INTERNAL_URL/xray/api/v1/system/version
2025-01-14 13:49:37,788 [15947699]   FINE - #com.jfrog.ide.idea.log.Logger - GET https://INTERNAL_URL/xray/api/v1/entitlements/feature/iac_scanners
2025-01-14 13:49:37,991 [15947902]   FINE - #com.jfrog.ide.idea.log.Logger - Received status 200 for GET https://INTERNAL_URL/xray/api/v1/entitlements/feature/iac_scanners
2025-01-14 13:49:37,993 [15947904]   FINE - #com.jfrog.ide.idea.log.Logger - GET https://INTERNAL_URL/xray/api/v1/system/version
2025-01-14 13:49:38,119 [15948030]   FINE - #com.jfrog.ide.idea.log.Logger - Received status 200 for GET https://INTERNAL_URL/xray/api/v1/system/version
2025-01-14 13:49:38,120 [15948031]   FINE - #com.jfrog.ide.idea.log.Logger - GET https://INTERNAL_URL/xray/api/v1/entitlements/feature/contextual_analysis
2025-01-14 13:49:38,335 [15948246]   FINE - #com.jfrog.ide.idea.log.Logger - Received status 200 for GET https://INTERNAL_URL/xray/api/v1/entitlements/feature/contextual_analysis

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions