netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

Error refreshing Docker images

Open ksilha-mhi opened this issue 1 year ago • 1 comments

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

ksilha-mhi avatar Apr 16 '24 18:04 ksilha-mhi

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

lukaz-sampaio avatar Jun 28 '24 17:06 lukaz-sampaio

Should be fixed by #7533

matthiasblaesing avatar Jul 08 '24 20:07 matthiasblaesing