V0.5 can't connect to user socket: "Failed to setup new user: Failed to create network: The network already exists"

I’m on arch linux, incus package version 0.5-1

The current user is in the incus group before logging in, and subuid/subgid set with sudo usermod -v 1000000-1000999999 -w 1000000-1000999999 root

Setting up with the following

sudo systemctl start incus
sudo systemctl start incus.socket
sudo systemctl start incus-user.socket
sudo incus admin init

Trying any incus command as the user results in Error: Get "http://unix.socket/1.0?project=user-1000": read unix @->/var/lib/incus/unix.socket.user: read: connection reset by peer

The journal shows

systemd[1]: Started Incus - User daemon.
incus-user[1628514]: time="2024-02-05T13:23:58-08:00" level=info msg="Starting up the server"
incus-user[1628514]: time="2024-02-05T13:23:58-08:00" level=info msg="Setting up for uid 1000"
incus-user[1628514]: time="2024-02-05T13:23:58-08:00" level=error msg="Failed to setup new user: Failed to create network: The network already exists"

This was working a few weeks ago in the previous release.

Can you show find /var/lib/incus/users/ as well as incus network list?

And incus project list too?

incus project list by the user gives the socket error, otherwise I thought it would create the user-1000 project at that time.

with sudo:

sudo find /var/lib/incus/users
/var/lib/incus/users

sudo incus project list
+-------------------+--------+----------+-----------------+-----------------+----------+---------------+-----------------------+---------+
|       NAME        | IMAGES | PROFILES | STORAGE VOLUMES | STORAGE BUCKETS | NETWORKS | NETWORK ZONES |      DESCRIPTION      | USED BY |
+-------------------+--------+----------+-----------------+-----------------+----------+---------------+-----------------------+---------+
| default (current) | YES    | YES      | YES             | YES             | YES      | YES           | Default Incus project | 4       |
+-------------------+--------+----------+-----------------+-----------------+----------+---------------+-----------------------+---------+

Once a member of the group issues an Incus command, Incus creates a confined project for this user and switches to this project. If Incus has not been initialized at this point, it is automatically initialized (with the default settings).

Okay, can you show incus network list?

it contains two incus related rows

| incusbr0     | bridge   | YES     | 10.50.225.1/24  | fd42:e448:c031:5d45::1/64 |                                                    | 1       | CREATED |
+--------------+----------+---------+-----------------+---------------------------+----------------------------------------------------+---------+---------+
| incusbr-1000 | bridge   | YES     | 10.222.142.1/24 | fd42:63:10d4:d51::1/64    | Network for user restricted project user-user-1000 | 0       | CREATED |

I guess the -1000 network existing explains the journal error, but something is odd with the project creation sequence?

sudo incus network delete incusbr-1000
incus project list
+---------------------+--------+----------+-----------------+-----------------+----------+---------------+-------------------------------------------+---------+
|        NAME         | IMAGES | PROFILES | STORAGE VOLUMES | STORAGE BUCKETS | NETWORKS | NETWORK ZONES |                DESCRIPTION                | USED BY |
+---------------------+--------+----------+-----------------+-----------------+----------+---------------+-------------------------------------------+---------+
| user-1000 (current) | YES    | YES      | YES             | YES             | NO       | YES           | User restricted project for "zero" (1000) | 1       |
+---------------------+--------+----------+-----------------+-----------------+----------+---------------+-------------------------------------------+---------+

now this works after deleting the network