etoa / etoa-gui

EtoA Game GUI
https://etoa.ch
GNU Affero General Public License v3.0
10 stars 7 forks source link

Symfony Exception on newly provisioned vagrant box, 1st launch of admin panel #448

Closed river-etoa closed 2 years ago

river-etoa commented 2 years ago

RuntimeError

An exception has been thrown during the rendering of a template ("Could not find the entrypoints file from Webpack: the file "/var/www/etoa/htdocs/web/build/entrypoints.json" does not exist.").

in templates/admin/layout/base.html.twig (line 13)

river-etoa commented 2 years ago

Box goes up, open in browser: http://192.168.33.11/admin/login, auto-redirect to http://192.168.33.11/admin/login/setup where the error occurs.

glaubinix commented 2 years ago

sorry, didn't think someone would be running this over Christmas and thought I had some more time to push this. Fixed with https://github.com/etoa/etoa-gui/commit/6fbce14d6c59f2ecd2f2609a2be98c70993adb65 rerun vagrant provision will solve this for existing setups

river-etoa commented 2 years ago

problem persists. take your time with the new setup and getting things stable, I'll work off 3.6 branch instead.

glaubinix commented 2 years ago

I wasn't really able to reproduce the issue. I changed one more thing with https://github.com/etoa/etoa-gui/commit/f1268a284ac20b1440c982c12a587c66aa00cc2b. Could you pull, run provision and paste the full output in case this still fails?

river-etoa commented 2 years ago

Firefox_Screenshot_2021-12-24T17-28-49 174Z

glaubinix commented 2 years ago

Apologies, was hoping for the full vagrant provision output. Something in there must have gone wrong

river-etoa commented 2 years ago

Oh. I didn't even notice since it was somewhere in the middle and I didn't watch it scroll through. This is the relevant part, I assume:

    default: ## Installing the NodeSource Node.js 16.x repo...
    default:
    default:
    default: ## Populating apt-get cache...
    default:
    default: + apt-get update
    default: Hit:1 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease
    default: Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
    default: Hit:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
    default: Hit:4 http://security.ubuntu.com/ubuntu bionic-security InRelease
    default: Hit:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
    default: Reading package lists...
    default:
    default: ## Confirming "bionic" is supported...
    default:
    default: + curl -sLf -o /dev/null 'https://deb.nodesource.com/node_16.x/dists/bionic/Release'
    default:
    default: ## Adding the NodeSource signing key to your keyring...
    default:
    default: + curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | tee /usr/share/keyrings/nodesource.gpg >/dev/null
    default:
    default: ## Creating apt sources list file for the NodeSource Node.js 16.x repo...
    default:
    default: + echo 'deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x bionic main' > /etc/apt/sources.list.d/nodesource.list
    default: + echo 'deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x bionic main' >> /etc/apt/sources.list.d/nodesource.list
    default:
    default: ## Running `apt-get update` for you...
    default:
    default: + apt-get update
    default: Hit:1 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease
    default: Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
    default: Hit:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
    default: Hit:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
    default: Hit:5 http://security.ubuntu.com/ubuntu bionic-security InRelease
    default: Get:6 https://deb.nodesource.com/node_16.x bionic InRelease [4584 B]
    default: Get:7 https://deb.nodesource.com/node_16.x bionic/main amd64 Packages [770 B]
    default: Fetched 5354 B in 1s (3858 B/s)
    default: Reading package lists...
    default:
    default: ## Run `sudo apt-get install -y nodejs` to install Node.js 16.x and npm
    default: ## You may also need development tools to build native addons:
    default:      sudo apt-get install gcc g++ make
    default: ## To install the Yarn package manager, run:
    default:      curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
    default:      echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
    default:      sudo apt-get update && sudo apt-get install yarn
    default:
    default:
    default: Reading package lists...
    default: Building dependency tree...
    default: Reading state information...
    default: The following additional packages will be installed:
    default:   libpython-stdlib libpython2.7-minimal libpython2.7-stdlib python
    default:   python-minimal python2.7 python2.7-minimal
    default: Suggested packages:
    default:   python-doc python-tk python2.7-doc binutils binfmt-support
    default: The following NEW packages will be installed:
    default:   libpython-stdlib libpython2.7-minimal libpython2.7-stdlib nodejs python
    default:   python-minimal python2.7 python2.7-minimal
    default: 0 upgraded, 8 newly installed, 0 to remove and 6 not upgraded.
    default: Need to get 29.9 MB of archives.
    default: After this operation, 137 MB of additional disk space will be used.
    default: Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython2.7-minimal amd64 2.7.17-1~18.04ubuntu1.6 [335 kB]
    default: Get:2 https://deb.nodesource.com/node_16.x bionic/main amd64 nodejs amd64 16.13.1-1nodesource1 [25.9 MB]
    default: Get:3 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python2.7-minimal amd64 2.7.17-1~18.04ubuntu1.6 [1291 kB]
    default: Get:4 http://archive.ubuntu.com/ubuntu bionic/main amd64 python-minimal amd64 2.7.15~rc1-1 [28.1 kB]
    default: Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython2.7-stdlib amd64 2.7.17-1~18.04ubuntu1.6 [1917 kB]
    default: Get:6 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python2.7 amd64 2.7.17-1~18.04ubuntu1.6 [248 kB]
    default: Get:7 http://archive.ubuntu.com/ubuntu bionic/main amd64 libpython-stdlib amd64 2.7.15~rc1-1 [7620 B]
    default: Get:8 http://archive.ubuntu.com/ubuntu bionic/main amd64 python amd64 2.7.15~rc1-1 [140 kB]
    default: Fetched 29.9 MB in 7s (4144 kB/s)
    default: Selecting previously unselected package libpython2.7-minimal:amd64.
(Reading database ... 61250 files and directories currently installed.)
    default: Preparing to unpack .../0-libpython2.7-minimal_2.7.17-1~18.04ubuntu1.6_amd64.deb ...
    default: Unpacking libpython2.7-minimal:amd64 (2.7.17-1~18.04ubuntu1.6) ...
    default: Selecting previously unselected package python2.7-minimal.
    default: Preparing to unpack .../1-python2.7-minimal_2.7.17-1~18.04ubuntu1.6_amd64.deb ...
    default: Unpacking python2.7-minimal (2.7.17-1~18.04ubuntu1.6) ...
    default: Selecting previously unselected package python-minimal.
    default: Preparing to unpack .../2-python-minimal_2.7.15~rc1-1_amd64.deb ...
    default: Unpacking python-minimal (2.7.15~rc1-1) ...
    default: Selecting previously unselected package libpython2.7-stdlib:amd64.
    default: Preparing to unpack .../3-libpython2.7-stdlib_2.7.17-1~18.04ubuntu1.6_amd64.deb ...
    default: Unpacking libpython2.7-stdlib:amd64 (2.7.17-1~18.04ubuntu1.6) ...
    default: Selecting previously unselected package python2.7.
    default: Preparing to unpack .../4-python2.7_2.7.17-1~18.04ubuntu1.6_amd64.deb ...
    default: Unpacking python2.7 (2.7.17-1~18.04ubuntu1.6) ...
    default: Selecting previously unselected package libpython-stdlib:amd64.
    default: Preparing to unpack .../5-libpython-stdlib_2.7.15~rc1-1_amd64.deb ...
    default: Unpacking libpython-stdlib:amd64 (2.7.15~rc1-1) ...
    default: Setting up libpython2.7-minimal:amd64 (2.7.17-1~18.04ubuntu1.6) ...
    default: Setting up python2.7-minimal (2.7.17-1~18.04ubuntu1.6) ...
    default: Linking and byte-compiling packages for runtime python2.7...
    default: Setting up python-minimal (2.7.15~rc1-1) ...
    default: Selecting previously unselected package python.
(Reading database ... 61998 files and directories currently installed.)
    default: Preparing to unpack .../python_2.7.15~rc1-1_amd64.deb ...
    default: Unpacking python (2.7.15~rc1-1) ...
    default: Selecting previously unselected package nodejs.
    default: Preparing to unpack .../nodejs_16.13.1-1nodesource1_amd64.deb ...
    default: Unpacking nodejs (16.13.1-1nodesource1) ...
    default: Setting up nodejs (16.13.1-1nodesource1) ...
    default: Setting up libpython2.7-stdlib:amd64 (2.7.17-1~18.04ubuntu1.6) ...
    default: Setting up python2.7 (2.7.17-1~18.04ubuntu1.6) ...
    default: Setting up libpython-stdlib:amd64 (2.7.15~rc1-1) ...
    default: Setting up python (2.7.15~rc1-1) ...
    default: Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
    default: Processing triggers for mime-support (3.60ubuntu1) ...
    default:
    default: removed 8 packages, changed 24 packages, and audited 215 packages in 4s
    default:
    default: 10 packages are looking for funding
    default:   run `npm fund` for details
    default:
    default: 3 moderate severity vulnerabilities
    default:
    default: To address all issues, run:
    default:   npm audit fix
    default:
    default: Run `npm audit` for details.
    default: npm notice
    default: npm notice New minor version of npm available! 8.1.2 -> 8.3.0
    default: npm notice Changelog: <https://github.com/npm/cli/releases/tag/v8.3.0>
    default: npm notice Run `npm install -g npm@8.3.0` to update!
    default: npm notice
    default: npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
    default: npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
    default: npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
    default: npm ERR! code EIO
    default: npm ERR! syscall symlink
    default: npm ERR! path ../../vendor/symfony/ux-live-component/assets
    default: npm ERR! dest /var/www/etoa/node_modules/@symfony/ux-live-component
    default: npm ERR! errno -5
    default: npm ERR! EIO: i/o error, symlink '../../vendor/symfony/ux-live-component/assets' -> '/var/www/etoa/node_modules/@symfony/ux-live-component'
    default:
    default: npm ERR! A complete log of this run can be found in:
    default: npm ERR!     /root/.npm/_logs/2021-12-24T17_09_41_374Z-debug-0.log
    default:
    default: > build
    default: > encore production --progress
    default:
    default: sh: 1: encore: not found
    default: Do not run Composer as root/super user! See https://getcomposer.org/root for details
    default: Installing dependencies from lock file (including require-dev)
    default: Verifying lock file contents can be installed on current platform.
    default: Nothing to install, update or remove
    default: Generating autoload files
    default: composer/package-versions-deprecated: Generating version class...
    default: composer/package-versions-deprecated: ...done generating version class
    default: 127 packages you are using are looking for funding.
    default: Use the `composer fund` command to find out more!
    default:
    default: Run composer recipes at any time to see the status of your Symfony recipes.
    default:
glaubinix commented 2 years ago

I made the vagrant provision task a bit more robuste and you should be able to access /admin again after vagrant provision because we now create dummy files. However, the issue with the symlink still persists. I am not sure yet how to get this working with windows + vagrant. I'll have to boot windows and set up vagrant at some point but this will have to wait a bit. This currently only impacts limited functionality in the admin tool like for instance the log search.

glaubinix commented 2 years ago

Switched from using npm to yarn to avoid symlinks. Hopefully this will work now as expected.