apache / netbeans

Apache NetBeans
https://netbeans.apache.org/
Apache License 2.0
2.64k stars 846 forks source link

Error refreshing Docker images #7275

Closed ksilha-mhi closed 2 months ago

ksilha-mhi commented 5 months ago

Apache NetBeans version

Apache NetBeans 21

What happened

Under Services, I added a Docker Instance installed on a server which is connected to my local network. 'Test Connection' passed. I am able to pull images and build containers, however when I try to refresh images I receive the following error notification and the image listing hangs on the hourglass icon saying "Please Wait..."

java.lang.NullPointerException: Cannot invoke "java.lang.Long.longValue()" because the return value of "org.json.simple.JSONObject.get(Object)" is null
    at org.netbeans.modules.docker.api.DockerAction.getImages(DockerAction.java:153)
    at org.netbeans.modules.docker.ui.node.DockerImagesChildFactory.createKeys(DockerImagesChildFactory.java:89)
    at org.openide.nodes.AsynchChildren.run(AsynchChildren.java:202)
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1420)
    at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
    at org.openide.util.lookup.Lookups.executeWith(Lookups.java:287)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2035)

Language / Project Type / NetBeans Component

Docker service management tool

How to reproduce

Refresh Images

Did this work correctly in an earlier version?

Apache NetBeans 17

Operating System

Windows

JDK

22

Apache NetBeans packaging

Apache NetBeans provided installer

Anything else

No response

Are you willing to submit a pull request?

No

lukaz-sampaio commented 3 months ago

NullPointerException is caused by JSON attribute "VirtualSize" loaded in DockerAction.getImages()#153.

The attribute "VirtualSize" was removed in API v1.44 for endpoints GET /images/json and GET /images/{id}/json that is used in DockerAction.getImages()#144.

Docker Engine 25.0 release notes

Screenshot 2024-06-30 at 12-24-33 Docker Engine 25 0 release notes Docker Docs

matthiasblaesing commented 2 months ago

Should be fixed by #7533