Upgrading container from 2.1.35 to 3.0.0 returns 500 Error
Good day,
Hope all is well. Here's a couple of config files I've got to get a base line. Docker-compose:
version: '2'
services:
akaunting:
image: docker.io/akaunting/akaunting:2.1.33
#image: 13c16f1c3ff2
build:
context: .
ports:
- 8090:80
volumes:
- /srv/Docker-Volumes/Akaunting/akaunting-data/:/var/www/html/storage
- /srv/Docker-Volumes/Akaunting/akaunting-modules/:/var/www/html/modules
restart: unless-stopped
env_file:
- ./env/run.env
#environment:
#- AKAUNTING_SETUP
depends_on:
- akaunting-db
akaunting-db:
image: linuxserver/mariadb:latest
volumes:
- /srv/Docker-Volumes/Akaunting/akaunting-db/:/config
restart: unless-stopped
env_file:
- ./env/db.env
networks:
default:
external:
name: nginxproxymanager_default
Starting on container akaunting:2.1.33 When upgrading akaunting within the GUI it upgrades to 2.1.36. Im assuming it passes to 2.1.36 as it shows up in the bottom corner but then gives an error stating You can not upgrade to Akaunting 3.0 version because your PHP version is lower than 8.0.2. Please, ask your hosting company to upgrade your PHP.
Understandable, so then I proceed in searching for the newest image with php8 installed. So that comes up to akaunting:3.0.0.
Upgrade to 3.0.0 container, I then get server 500 errors within the container logs. "GET /1 HTTP/1.1" 500 211 "https://DOMAIN.ca/serviceworker.js"
I look further within the network console and found nothing useful.
I decide to look up within the issues. Found #7 Looked over it and followed some instructions thinking it would be a permission issue and did not come to a solution.
Im am stuck at this point and would really like to move to keep all the inv/companies data If I have to export then import data onto a fresh install this is something I do not mind doing!
Any help would be appreciated :)
So I believe I found a possible solution but I am still getting one error, Might not be of concern but would like to see what the dev's say.
Within the Dockerfile I changed Line 49 to match 2.1.33 instead of latest.&& curl -Lo /tmp/akaunting.zip 'https://akaunting.com/download.php?version=2.1.33&utm_source=docker&utm_campaign=developers' \
I proceeded to build 2.1.33 witch gave me PHP8. It then proceeded to update to 2.1.36. Once updated got a warning to backup db before updating to 3.0.11. Cool were getting somewhere.
I proceed to update 3.0.11 and get the following error within the logs and the ui. (PHP artisan errors)
Note the new ui does load up and seems to work just fine with the exception of the missing widgets in the dashboard.
Exit Code: 1(General error)
Working directory: /var/www/html
Output:
Downloading core update...
Unzipping core update...
Copying update core files...
Finishing core update...
The command php artisan update:finish core 5 3.0.11 2.1.36 failed.
Exit Code: 1(General error)
Working directory: /var/www/html
Output:
================
Finishing update...
INFO Application cache cleared successfully.
In Connection.php line 760:
SQLSTATE[42S01]: Base table or view already exists: 1050 Table asd_user_in
vitations already exists (SQL: create table asd_user_invitations (id b
igint unsigned not null auto_increment primary key, user_id int unsigned
not null, company_id int unsigned not null, token varchar(191) not null
, created_at timestamp null, updated_at timestamp null, deleted_at ti
mestamp null) default character set utf8mb4 collate utf8mb4_unicode_ci en
gine = InnoDB ROW_FORMAT=DYNAMIC)
In Connection.php line 545:
SQLSTATE[42S01]: Base table or view already exists: 1050 Table asd_user_in
vitations already exists
Error Output:
================
Error Output:
[2023-02-20 17:44:46] production.INFO: Downloading core update... [2023-02-20 17:44:51] production.INFO: Unzipping core update... [2023-02-20 17:44:52] production.INFO: Copying update core files... [2023-02-20 17:44:54] production.INFO: Finishing core update... [2023-02-20 17:44:54] production.DEBUG: Console command:: 'php' 'artisan' update:finish core 5 3.0.11 2.1.36 [2023-02-20 17:44:55] production.DEBUG: Console output:: The command "'php' 'artisan' update:finish core 5 3.0.11 2.1.36" failed.
Exit Code: 1(General error)
Working directory: /var/www/html
Output:
Finishing update... INFO Application cache cleared successfully.
In Connection.php line 760:
SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'asd_user_in
vitations' already exists (SQL: create table asd_user_invitations (id b
igint unsigned not null auto_increment primary key, user_id int unsigned
not null, company_id int unsigned not null, token varchar(191) not null
, created_at timestamp null, updated_at timestamp null, deleted_at ti
mestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci' en
gine = InnoDB ROW_FORMAT=DYNAMIC)
In Connection.php line 545:
SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'asd_user_in vitations' already exists
Error Output:
[2023-02-20 17:44:55] production.INFO: The command php artisan update core 5 3.0.11 failed.
Exit Code: 1(General error)
Working directory: /var/www/html
Output:
================
Downloading core update...
Unzipping core update...
Copying update core files...
Finishing core update...
The command php artisan update:finish core 5 3.0.11 2.1.36 failed.
Exit Code: 1(General error)
Working directory: /var/www/html
Output:
================
Finishing update...
INFO Application cache cleared successfully.
In Connection.php line 760:
SQLSTATE[42S01]: Base table or view already exists: 1050 Table asd_user_in
vitations already exists (SQL: create table asd_user_invitations (id b
igint unsigned not null auto_increment primary key, user_id int unsigned
not null, company_id int unsigned not null, token varchar(191) not null
, created_at timestamp null, updated_at timestamp null, deleted_at ti
mestamp null) default character set utf8mb4 collate utf8mb4_unicode_ci en
gine = InnoDB ROW_FORMAT=DYNAMIC)
In Connection.php line 545:
SQLSTATE[42S01]: Base table or view already exists: 1050 Table asd_user_in
vitations already exists
Error Output:
================
Error Output:
================
[2023-02-20 17:44:46] production.INFO: Downloading core update...
[2023-02-20 17:44:51] production.INFO: Unzipping core update...
[2023-02-20 17:44:52] production.INFO: Copying update core files...
[2023-02-20 17:44:54] production.INFO: Finishing core update...
[2023-02-20 17:44:54] production.DEBUG: Console command:: php artisan update:finish core 5 3.0.11 2.1.36
[2023-02-20 17:44:55] production.DEBUG: Console output:: The command php artisan update:finish core 5 3.0.11 2.1.36 failed.
Exit Code: 1(General error)
Working directory: /var/www/html
Output:
================
Finishing update...
INFO Application cache cleared successfully.
In Connection.php line 760:
SQLSTATE[42S01]: Base table or view already exists: 1050 Table asd_user_in
vitations already exists (SQL: create table asd_user_invitations (id b
igint unsigned not null auto_increment primary key, user_id int unsigned
not null, company_id int unsigned not null, token varchar(191) not null
, created_at timestamp null, updated_at timestamp null, deleted_at ti
mestamp null) default character set utf8mb4 collate utf8mb4_unicode_ci en
gine = InnoDB ROW_FORMAT=DYNAMIC)
In Connection.php line 545:
SQLSTATE[42S01]: Base table or view already exists: 1050 Table asd_user_in
vitations already exists
Error Output:
================
[2023-02-20 17:44:55] production.INFO: Not able to update core from UI
Refers mostly to tables that already exists.
I then proceed to Changing line 49 back to latest and build the container once again. (Version 3.0.11)
All seems to work and there are no errors within the logs as of now.
Are any of those errors of concern? They dont seem like they are to me but am wondering to be safe.
Also the new reports are they broken or made like that now? I used to be able to see monthly expenses by vendor with each months spending and a total. and now its only total that year...