Ask, reply and learn. Join the community of Akaunting.
Hello Akaunting Forum,
First of all, thank you for making this great piece of software open source and the amazing documentation for the dockerised ecosystem.
Despite all of the resources I encountered a problem on a local setup and I am not sure where I might have missed a setup environment variable. My configurations are
run.env
```
# You should change this to match your reverse proxy DNS name and protocol
APP_URL=http://localhost:8080
APP_ENV=local
LOCALE=en-US
# Don't change this unless you rename your database container or use rootless podman, in case of using rootless podman you should set it to 127.0.0.1 (NOT localhost)
DB_HOST=akaunting-db
# Change these to match env/db.env
DB_DATABASE=akaunting
DB_USERNAME=admin
DB_PASSWORD=akaunting_password
# You should change this to a random string of three numbers or letters followed by an underscore
DB_PREFIX=asd_
# These define the first company to exist on this instance. They are only used during setup.
COMPANY_NAME=My Company
[email protected]
# This will be the first administrative user created on setup.
[email protected]
ADMIN_PASSWORD=password
```
The rest is all default and I am running
1. AKAUNTING_SETUP=true docker-compose up
which executes the setup and allows me to view the login form on localhost:8080. But once I press login I see the localhost:8080/1/wizard with the CSS of the blank page but it's not receiving the SSR?
The inspector in the browser outputs the console errors
OMException: Failed to execute 'replaceState' on 'History': A history state object with URL 'http://172.18.0.4:8080/1/wizard' cannot be created in a document with origin 'http://localhost:8080' and URL 'http://localhost:8080/1/wizard'.
at oe (http://localhost:8080/public/js/wizard/wizard.js?v=2.1.22:1:1797794)
at t.setupListeners (http://localhost:8080/public/js/wizard/wizard.js?v=2.1.22:1:1805129)
at i (http://localhost:8080/public/js/wizard/wizard.js?v=2.1.22:1:1809584)
at http://localhost:8080/public/js/wizard/wizard.js?v=2.1.22:1:1802685
at s (http://localhost:8080/public/js/wizard/wizard.js?v=2.1.22:1:1803000)
at m (http://localhost:8080/public/js/wizard/wizard.js?v=2.1.22:1:1804115)
at i (http://localhost:8080/public/js/wizard/wizard.js?v=2.1.22:1:1799652)
at i (http://localhost:8080/public/js/wizard/wizard.js?v=2.1.22:1:1799681)
at ye (http://localhost:8080/public/js/wizard/wizard.js?v=2.1.22:1:1799689)
at t.Me.confirmTransition (http://localhost:8080/public/js/wizard/wizard.js?v=2.1.22:1:1804122)
We @ wizard.js?v=2.1.22:1
He @ wizard.js?v=2.1.22:1
qe @ wizard.js?v=2.1.22:1
Ve @ wizard.js?v=2.1.22:1
Qt @ wizard.js?v=2.1.22:1
e._init @ wizard.js?v=2.1.22:1
xn @ wizard.js?v=2.1.22:1
(anonymous) @ wizard.js?v=2.1.22:1
n @ wizard.js?v=2.1.22:1
(anonymous) @ wizard.js?v=2.1.22:1
n @ wizard.js?v=2.1.22:1
(anonymous) @ wizard.js?v=2.1.22:1
(anonymous) @ wizard.js?v=2.1.22:1
wizard.js?v=2.1.22:1 TypeError: Cannot read property 'matched' of undefined
at render (wizard.js?v=2.1.22:1)
at wizard.js?v=2.1.22:1
at Lt (wizard.js?v=2.1.22:1)
at wizard.js?v=2.1.22:1
at Rt (wizard.js?v=2.1.22:1)
at e._c (wizard.js?v=2.1.22:1)
at a. (wizard.js?v=2.1.22:1)
at a.e._render (wizard.js?v=2.1.22:1)
at a.i (wizard.js?v=2.1.22:1)
at fn.get (wizard.js?v=2.1.22:1)
We @ wizard.js?v=2.1.22:1
He @ wizard.js?v=2.1.22:1
qe @ wizard.js?v=2.1.22:1
e._render @ wizard.js?v=2.1.22:1
i @ wizard.js?v=2.1.22:1
fn.get @ wizard.js?v=2.1.22:1
fn @ wizard.js?v=2.1.22:1
(anonymous) @ wizard.js?v=2.1.22:1
xn.$mount @ wizard.js?v=2.1.22:1
xn.$mount @ wizard.js?v=2.1.22:1
init @ wizard.js?v=2.1.22:1
(anonymous) @ wizard.js?v=2.1.22:1
d @ wizard.js?v=2.1.22:1
(anonymous) @ wizard.js?v=2.1.22:1
e._update @ wizard.js?v=2.1.22:1
i @ wizard.js?v=2.1.22:1
fn.get @ wizard.js?v=2.1.22:1
fn @ wizard.js?v=2.1.22:1
(anonymous) @ wizard.js?v=2.1.22:1
xn.$mount @ wizard.js?v=2.1.22:1
xn.$mount @ wizard.js?v=2.1.22:1
e._init @ wizard.js?v=2.1.22:1
xn @ wizard.js?v=2.1.22:1
(anonymous) @ wizard.js?v=2.1.22:1
n @ wizard.js?v=2.1.22:1
(anonymous) @ wizard.js?v=2.1.22:1
n @ wizard.js?v=2.1.22:1
(anonymous) @ wizard.js?v=2.1.22:1
(anonymous) @ wizard.js?v=2.1.22:1
wizard:85 Uncaught ReferenceError: Livewire is not defined
at wizard:85
And the docker-compose container output for the akaunting container is
akaunting | Setting locale en-US
akaunting | Creating database tables
akaunting | Connecting to database akaunting@akaunting-db:3306
akaunting | Creating company
akaunting | Creating admin
akaunting | Applying the final touches
akaunting | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.23.0.4. Set the 'ServerName' directive globally to suppress this message
akaunting | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.23.0.4. Set the 'ServerName' directive globally to suppress this message
akaunting | [Tue Aug 10 10:13:43.189044 2021] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.38 (Debian) PHP/7.4.22 configured -- resuming normal operations
akaunting | [Tue Aug 10 10:13:43.189116 2021] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
...
and the subsequent GET requests from the submission
akaunting | 172.23.0.1 - - [10/Aug/2021:10:13:46 +0000] "GET / HTTP/1.1" 302 1600 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36"
akaunting | 172.23.0.1 - - [10/Aug/2021:10:13:46 +0000] "GET /auth/login HTTP/1.1" 200 3704 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36"
akaunting | 172.23.0.1 - - [10/Aug/2021:10:13:46 +0000] "GET /public/css/element.css?v=2.1.22 HTTP/1.1" 200 39657 "http://localhost:8080/auth/login" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36"
akaunting | 172.23.0.1 - - [10/Aug/2021:10:13:46 +0000] "GET /public/css/argon.css?v=2.1.22 HTTP/1.1" 200 57760 "http://localhost:8080/auth/login" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36"
akaunting | 172.23.0.1 - - [10/Aug/2021:10:13:47 +0000] "GET /public/js/auth/login.js?v=2.1.22 HTTP/1.1" 200 97458 "http://localhost:8080/auth/login" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36"
akaunting | 172.23.0.1 - - [10/Aug/2021:10:13:47 +0000] "GET /public/vendor/jquery/dist/jquery.min.js HTTP/1.1" 200 30660 "http://localhost:8080/auth/login" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36"
akaunting | 172.23.0.1 - - [10/Aug/2021:10:13:47 +0000] "GET /public/vendor/bootstrap/dist/js/bootstrap.bundle.min.js HTTP/1.1" 200 21046 "http://localhost:8080/auth/login" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36"
akaunting | 172.23.0.1 - - [10/Aug/2021:10:13:47 +0000] "GET /public/img/login.png HTTP/1.1" 200 85766 "http://localhost:8080/public/css/custom.css?v=2.1.22" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36"
akaunting | 172.23.0.1 - - [10/Aug/2021:10:13:47 +0000] "GET /public/vendor/opensans/fonts/OpenSans-Regular.ttf HTTP/1.1" 200 96715 "http://localhost:8080/public/vendor/opensans/css/opensans.css?v=2.1.22" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36"
akaunting | 172.23.0.1 - - [10/Aug/2021:10:13:47 +0000] "GET /public/vendor/fontawesome/webfonts/fa-solid-900.woff2 HTTP/1.1" 200 76409 "http://localhost:8080/public/vendor/fontawesome/css/all.min.css?v=2.1.22" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36"
akaunting | 172.23.0.1 - - [10/Aug/2021:10:13:47 +0000] "GET /public/vendor/bootstrap/dist/js/bootstrap.bundle.min.js.map HTTP/1.1" 200 77113 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36"
akaunting | 172.23.0.1 - - [10/Aug/2021:10:13:50 +0000] "GET /public/img/favicon.ico HTTP/1.1" 200 99981 "http://localhost:8080/auth/login" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36"
akaunting | 172.23.0.1 - - [10/Aug/2021:10:13:51 +0000] "GET /serviceworker.js HTTP/1.1" 200 863 "http://localhost:8080/serviceworker.js" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36"
akaunting | 172.23.0.1 - - [10/Aug/2021:10:13:53 +0000] "POST /auth/login HTTP/1.1" 200 1281 "http://localhost:8080/auth/login" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36"
akaunting | 172.23.0.1 - - [10/Aug/2021:10:13:54 +0000] "GET /1 HTTP/1.1" 302 1589 "http://localhost:8080/auth/login" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36"
akaunting | 172.23.0.1 - - [10/Aug/2021:10:13:54 +0000] "GET /1/wizard HTTP/1.1" 200 28962 "http://localhost:8080/auth/login" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36"
akaunting | 172.23.0.1 - - [10/Aug/2021:10:13:55 +0000] "GET /public/js/wizard/wizard.js?v=2.1.22 HTTP/1.1" 200 467084 "http://localhost:8080/1/wizard" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36"
akaunting | 172.23.0.1 - - [10/Aug/2021:10:13:56 +0000] "GET /public/vendor/bootstrap/dist/js/bootstrap.bundle.min.js.map HTTP/1.1" 200 77113 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36"
akaunting | 172.23.0.1 - - [10/Aug/2021:10:14:01 +0000] "GET /serviceworker.js HTTP/1.1" 200 863 "http://localhost:8080/serviceworker.js" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36"
akaunting | 172.23.0.1 - - [10/Aug/2021:10:14:45 +0000] "-" 408 0 "-" "-"
It seems there is some problem with CORS or what do you think? I have spent a few days on this now and appreciate any insights into where to look next. Is it the DOMException: Failed to execute 'replaceState' on 'History' that is critical here or the livewire error or is it the apache2 configuration that is not setup for localhost?
Thanks in advance for every help!
Cheers,
Philipp
For anyone encountering a similar problem. It was simply a relict of a non-containerised apache2 on the host computer that was somehow interferring with the localhost resolution. Once the apache2 on the host computer was shut down the containerised service worked as advertised. Great job on this dockerised infrastructure. Really smooth experience, after cleaning up my machine from residual services the setup worked without any bumps!
Showing 1 to 2 of 2 discussions