Forum

Ask, reply and learn. Join the community of Akaunting.

New Discussion

500 error when trying to log in after initial install

Greg Clarke   ( User )

Commented 1 year ago

I am running a self hosted Docker instance of Akaunting and followed the instructions from https://developer.akaunting.com/documentation/install-via-docker/

I ran `AKAUNTING_SETUP=true docker-compose up -d` and successfully setup the server. Then I docker-composed down and up without the `AKAUNTING_SETUP` flag

```
docker-compose down
docker-compose up -d
```

However now I am unable to login. It fails silently from a user perspective (the green login button turns pale and nothing happens). In the console I see the following 500 error

```
POST https://accounting.mydomain.com/auth/login 500
common.min.js?v=3.0.11:1

TypeError: Cannot read properties of undefined (reading 'email')
at t.value (common.min.js?v=3.0.11:7:102527)
at Qn.eval (eval at Ds (common.min.js?v=3.0.11:7:99547), :4:39)
at t._render (common.min.js?v=3.0.11:7:39660)
at Qn.r (common.min.js?v=3.0.11:7:73618)
at t.get (common.min.js?v=3.0.11:7:22173)
at t.run (common.min.js?v=3.0.11:7:22906)
at Ve (common.min.js?v=3.0.11:7:17556)
at Array. (common.min.js?v=3.0.11:7:20553)
at ln (common.min.js?v=3.0.11:7:19952)
common.min.js?v=3.0.11:7
```
and the docker container reports

`Access denied for user 'admin'@'%' to database 'forge'`

Any ideas what's going on here? I haven't changed any passwords or touched the db.

Ebelmxi   ( User )

Commented 1 year ago

I had the same issue today after installing a new instance and created a issue on GitHub https://github.com/akaunting/akaunting/issues/3054

A possible workaround could be to re-enable the AKAUNTING_SETUP and restart. In my case that allow me to login again and all seems to work properly.

Ebelmxi   ( User )

Commented 1 year ago

The error is caused by missing environment variable DB_DATABASE. Set this variable to same value as DB_NAME and everything works fine.

Please login or register to leave a response.

Showing 1 to 3 of 3 discussions