[SOLVED] Docker Desktop encountered an unexpected error and needs to close

Dear everyone,

Hope you are doing well. Recently I encountered a problem with docker networks and I removed docker desktop. After re-installing it, it keeps displaying a dialogue window:

An unexpected error occurred

Docker Desktop encountered an unexpected error and needs to close.

Search our troubleshooting documentation⁠ to find a solution or workaround. Alternatively, you can gather a diagnostics report and submit a support request or GitHub issue.

initializing backend: doing migrations: fatal: removing /Users/***/Library/Group Containers/group.com.docker/http_proxy.json: remove /Users/***/Library/Group Containers/group.com.docker/http_proxy.json: permission denied getting startup settings: saving launch path: loading settings: creating settings: stat /Users/***/Library/Group Containers/group.com.docker/settings.json: permission denied

also when I try to Gather diagnostics, it responds with this error:

Error: Unable to gather diagnostics: "{\"message\":\"\\\"/20240724165945\\\" does not match \\u003cUUID\\u003e/YYYYMMDDhhmmss format\"}\n{\"message\":\"\\\"/20240724165945\\\" does not match \\u003cUUID\\u003e/YYYYMMDDhhmmss format\"}\n"

There is a button called Reset to factory defaults which pressing it does not change anything.

I am using a MacBook Pro M3 Max operating by Sonoma 14.5

Solution I tried:

  • Completely remove docker with the provided binary in Docker.app contents
  • Install using brew install --cask
  • Install using dmg downloaded from docker website

there was no chance to get it running again.

Ok Guys, Problem solved.
during my effort to “Completely removing docker” I removed ~/Library/Group\ Containers\group.com.docker directory. After re-creating it and applying proper permissions, the app ran normally.