'Failed to set version to docker-desktop: exit code: -1

Error in runing docker in windows

InvalidOperationException: Failed to set version to docker-desktop: exit code: -1 stdout: The attempted operation is not supported for the type of object referenced.



Solution 1:[1]

I solved my issue by resetting Winsock (Windows Socket) Settings. Go to powershell or cmd and run below command as administrator:

netsh winsock reset

and don't restart system as command prompt. Then you can run docker-desktop.

next time restart system run this command again to start docker-desktop.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 lizhipeng