[GH-ISSUE #2785] Bug: It is impossible to add new users after attempting to retrieve an existing configuration #1269

Open
opened 2026-10-13 20:39:13 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @MrCatEsq on GitHub (Jun 29, 2026).
Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/2785

Describe the bug
It is impossible to add new users after attempting to retrieve an existing configuration. Error codes 101, 301, 302.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new user (share access) with the name "testuser" and retrieve their configuration (Xray protocol, original Xray format).
  2. Attempt to create a user with the same name, protocol, and format again. Encounter error 301 or 302.
  3. Revoke access for that user. Encounter error 301 or 302.
  4. Create a user with any name—encounter error 101.

Expected behavior
Ability to retrieve the configuration and configuration string for a user. Ability to create new users without errors.

Smartphone (please complete the following information):

  • Device: Xiaomi Mi 9 Lite

Server (please complete the following information):

  • OS: Ubuntu 24.04.2 LTS (GNU/Linux 6.8.0-54-generic x86_64)

Additional context
AmneziaVPN Android app, version 4.8.19.0. I am using my own VPS for the server, set up via the AmneziaVPN Android app.

Initially, I tried creating a new user to share a profile in the original Xray format (using the Xray protocol), and it worked well: I was able to copy the configuration string or the text for config.json.

After that, I tried creating a new user with a username that already existed in order to retrieve that user's configuration again (restore it) without deleting or re-adding the user. I encountered error codes 301 and 302 and was unable to download the configuration string (the button did not appear in the AmneziaVPN interface at all); I only received the configuration file in Xray format. I then tried to delete that user (revoke access) and also encountered an error (301 or 302), though the deletion did succeed.

Then everything broke completely: when attempting to add a new user (regardless of whether the name is unique), I see error code 101, receive only the empty configuration file (not the configuration string, the button did not appear in the AmneziaVPN interface at all. Clicking the "Copy" button to copy configuration file does not copy the config to the clipboard), and do NOT see the user in the list of those granted access.

I’m not very experienced with server administration, but I notice that new IDs are being created (when I try to create new one in app) in the server files /var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/85/fs/opt/amnezia/xray/server.json and /var/lib/docker/rootfs/overlayfs/1d0567756c2b841d6564c8937053e6522b2b1d207615c8bb3d119cf33deed27f/opt/amnezia/xray/server.json and, accordingly, in the file /opt/amnezia/xray/server.json inside the container, even though they don't appear in the application. There are no duplicate IDs there.

Rebooting the server did not resolve the issue.

The Amnezia VPN application itself seems to be working correctly: on another server of mine, where I didn't try to re-fetch the user config, users are created and deleted correctly.

Originally created by @MrCatEsq on GitHub (Jun 29, 2026). Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/2785 **Describe the bug** It is impossible to add new users after attempting to retrieve an existing configuration. Error codes 101, 301, 302. **To Reproduce** Steps to reproduce the behavior: 1. Create a new user (share access) with the name "testuser" and retrieve their configuration (Xray protocol, original Xray format). 2. Attempt to create a user with the same name, protocol, and format again. Encounter error 301 or 302. 3. Revoke access for that user. Encounter error 301 or 302. 4. Create a user with any name—encounter error 101. **Expected behavior** Ability to retrieve the configuration and configuration string for a user. Ability to create new users without errors. **Smartphone (please complete the following information):** - Device: Xiaomi Mi 9 Lite **Server (please complete the following information):** - OS: Ubuntu 24.04.2 LTS (GNU/Linux 6.8.0-54-generic x86_64) **Additional context** AmneziaVPN Android app, version 4.8.19.0. I am using my own VPS for the server, set up via the AmneziaVPN Android app. Initially, I tried creating a new user to share a profile in the original Xray format (using the Xray protocol), and it worked well: I was able to copy the configuration string or the text for `config.json`. After that, I tried creating a new user with a username that already existed in order to retrieve that user's configuration again (restore it) without deleting or re-adding the user. I encountered error codes 301 and 302 and was unable to download the configuration string (the button did not appear in the AmneziaVPN interface at all); I only received the configuration file in Xray format. I then tried to delete that user (revoke access) and also encountered an error (301 or 302), though the deletion did succeed. Then everything broke completely: when attempting to add a new user (regardless of whether the name is unique), I see error code 101, receive only the empty configuration file (not the configuration string, the button did not appear in the AmneziaVPN interface at all. Clicking the "Copy" button to copy configuration file does not copy the config to the clipboard), and do NOT see the user in the list of those granted access. I’m not very experienced with server administration, but I notice that new IDs are being created (when I try to create new one in app) in the server files `/var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/85/fs/opt/amnezia/xray/server.json` and `/var/lib/docker/rootfs/overlayfs/1d0567756c2b841d6564c8937053e6522b2b1d207615c8bb3d119cf33deed27f/opt/amnezia/xray/server.json` and, accordingly, in the file `/opt/amnezia/xray/server.json` inside the container, even though they don't appear in the application. There are no duplicate IDs there. Rebooting the server did not resolve the issue. The Amnezia VPN application itself seems to be working correctly: on another server of mine, where I didn't try to re-fetch the user config, users are created and deleted correctly.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amnezia-client#1269
No description provided.