anonaddy / docker

AnonAddy Docker image
MIT License
519 stars 56 forks source link

Unable to Add Username #288

Closed buxm closed 4 months ago

buxm commented 4 months ago

Support guidelines

I've found a bug and checked that ...

Description

When I try to add a new username, I get the error message "An error occurred. Please try again later" in the bottom right corner. So I cannot add a new username.

Expected behaviour

When I click on "Add Username" and then type a new username and again Add Username, a new username is added to the list of usernames. This used to work in the past.

Actual behaviour

The following error appears when trying to add a new Username: image

Looking at the container logs, the following line appears:

172.20.0.2 - - [27/Jun/2024:18:14:53 +0200] "POST /api/v1/usernames HTTP/1.1" 401 41 "https://mydomain.com/usernames" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36"

Steps to reproduce

  1. Login to the web app
  2. Click Usernames on the left bar
  3. Click on Add Username button on the top right
  4. Type a new Username
  5. Click on the Add Username button
  6. The error message appears in a red box on the bottom right

Docker info

Client: Docker Engine - Community
 Version:    27.0.1
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.15.1
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.28.1
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 8
  Running: 6
  Paused: 0
  Stopped: 2
 Images: 6
 Server Version: 27.0.1
 Storage Driver: fuse-overlayfs
 Logging Driver: journald
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: ae71819c4f5e67bb4d5ae76a6b735f29cc25774e
 runc version: v1.1.13-0-g58aa920
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
 Kernel Version: 6.8.0-31-generic
 Operating System: Ubuntu 24.04 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 1
 Total Memory: 1.863GiB
 Name: e4wardtest01
 ID: a9b388d8-6451-4b1f-873e-714d96ed3a4f
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: true

WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled

Docker Compose config

No response

Logs

172.20.0.2 - - [27/Jun/2024:18:14:53 +0200] "POST /api/v1/usernames HTTP/1.1" 401 41 "https://mydomain.com/usernames" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36"

Additional info

Not sure if this is related to this container image or to the anonaddy app itself. Difficult for me to tell from the logs...

willbrowningme commented 4 months ago

401 response means unauthorized.

See https://github.com/anonaddy/docker/issues/163 and update your SANCTUM_STATEFUL_DOMAINS=

buxm commented 4 months ago

Looking at your reply, this reminded me of #191 So I realised there was a typo in the value of my APP_URL= variable. Setting it to the correct webapp URL fixed the issue.

Many thanks for the prompt reply!!!! :-D