Useful or not, from you.
wekan Cannot login via API

Issue

I am unable to login to Wekan using the login API. In addition, I am not seeing any logs despite having DEBUG=true set.

I'm using the docker-compose.yml file found here. Only change I've done is uncomment the line for DEBUG.

Server Setup Information:

  • Note: Please anonymize info, and do not add to this public issue any of your Wekan board URLs, passwords, API tokens etc, do you understand?:
  • Did you test in newest Wekan?: y
  • For new Wekan install, did you configure root-url correctly so Wekan cards open correctly https://github.com/wekan/wekan/wiki/Settings ?
  • Wekan version:
  • If this is about old version of Wekan, what upgrade problem you have?:
  • Operating System: macOS & Ubuntu 18.04
  • Deployment Method(snap/docker/sandstorm/mongodb bundle/source): docker
  • Http frontend if any (Caddy, Nginx, Apache, see config examples from Wekan GitHub wiki first): n/a
  • Node Version: bundled
  • MongoDB Version: 4.0.12
  • Wekan only works on newest desktop Firefox/Chromium/Chrome/Edge/Chromium Edge and mobile Chrome. What webbrowser version are you using? curl

Problem description:

  • REQUIRED: Add recorded animated gif about how it works currently, and screenshot mockups how it should work. Use peek to record animgif in Linux https://github.com/phw/peek
  • Explain steps how to reproduce
  • In webbrowser, what does show Right Click / Inspect / Console ? Chrome shows more detailed info than Firefox.
  • If using Snap, what does show command sudo snap logs wekan.wekan ? Please anonymize logs.
  • If using Docker, what does show command sudo docker logs wekan-app ? Please anonymize logs.
  • If logs are very long, attach them in .zip file
# Download the example `docker-compose.yml` file
wget https://raw.githubusercontent.com/wekan/wekan/master/docker-compose.yml
# uncomment the DEBUG env variable
sed -i '' 's/#- DEBUG/- DEBUG/' docker-compose.yml
# start wekan
docker-compose up -d
# open wekan and create first user
open http://localhost
# create new user as admin:password and log in, this works despite an error trying to create user due to invalid SMTP
# attempt to authenticate with curl using documented example
curl -X POST -F 'username=admin' -F "password=password" -H 'Content-Type: application/x-www-form-urlencoded' -H 'Accept: */*' http://localhost/users/login

# Output:
# {
#   "error": 400,
#   "reason": "Match failed"
# }

# check logs
docker-compose logs --tail=20 wekan

# Output
# wekan-app  | > Finishing mutate-boardIds-in-customfields migration.
# wekan-app  | > Starting add-missing-created-and-modified migration.
# wekan-app  | > Finishing add-missing-created-and-modified migration.
# wekan-app  | > Starting fix-incorrect-dates migration.
# wekan-app  | > Finishing fix-incorrect-dates migration.
# wekan-app  | Successfully added createdAt and updatedAt to all tables
# wekan-app  | > Starting add-assignee migration.
# wekan-app  | > Finishing add-assignee migration.
# wekan-app  | > Starting add-profile-showDesktopDragHandles migration.
# wekan-app  | > Finishing add-profile-showDesktopDragHandles migration.
# wekan-app  | > Starting add-profile-hiddenMinicardLabelText migration.
# wekan-app  | > Finishing add-profile-hiddenMinicardLabelText migration.
# wekan-app  | Meteor APM: completed instrumenting the app
# wekan-app  | Exception while invoking method 'ATCreateUserServer' { [object Object]
# wekan-app  |   errno: 'ECONNREFUSED',
# wekan-app  |   code: 'ECONNECTION',
# wekan-app  |   syscall: 'connect',
# wekan-app  |   address: '127.0.0.1',
# wekan-app  |   port: 587,
# wekan-app  |   command: 'CONN' }

# These logs only show up to the point that the user was created and no login attempt is shown.
That's a useful answer
Without any help

I do get Bearer token just fine:

docker-compose up -d

curl http://localhost/users/login -d "username=username&password=password"

{"id":"Bjji12345","token":"pcG2pqaAh7ldLlZR12345","tokenExpires":"2020-03-10T23:36:27.210Z"}