monicahq / monica

Personal CRM. Remember everything about your friends, family and business relationships.
https://beta.monicahq.com
GNU Affero General Public License v3.0
21.78k stars 2.18k forks source link

Call to undefined function Illuminate\View\Compilers\token_get_all() #6469

Closed IngwiePhoenix closed 1 year ago

IngwiePhoenix commented 1 year ago

Describe the bug After building the public assets and alike, the application can't render the initial view. Instead, I get a rather surprising bit of output in my FPM log.

Screenshots Which version are you using:

The log:

==> php8-fpm.log <==
[11-Dec-2022 17:26:13] WARNING: [pool www] child 7807 said into stderr: "NOTICE: PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function Illuminate\View\Compilers\token_get_all() in /sdcard/srv/monica/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php:250"
[11-Dec-2022 17:26:13] WARNING: [pool www] child 7807 said into stderr: "Stack trace:"
[11-Dec-2022 17:26:13] WARNING: [pool www] child 7807 said into stderr: "#0 /sdcard/srv/monica/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php(159): Illuminate\View\Compilers\BladeCompiler->compileString('@extends('error...')"
[11-Dec-2022 17:26:13] WARNING: [pool www] child 7807 said into stderr: "#1 /sdcard/srv/monica/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(55): Illuminate\View\Compilers\BladeCompiler->compile('/sdcard/srv/mon...')"
[11-Dec-2022 17:26:13] WARNING: [pool www] child 7807 said into stderr: "#2 /sdcard/srv/monica/vendor/facade/ignition/src/Views/Engines/CompilerEngine.php(37): Illuminate\View\Engines\CompilerEngine->get('/sdcard/srv/mon...', Array)"
[11-Dec-2022 17:26:13] WARNING: [pool www] child 7807 said into stderr: "#3 /sdcard/srv/monica/vendor/laravel/framework/src/Illuminate/View/View.php(139): Facade\Ignition\Views\Engines\CompilerEngine->get('/sdcard/srv/mon...', Array)"
[11-Dec-2022 17:26:13] WARNING: [pool www] child 7807 said into stderr: "#4 /sdcard/srv/monica/vendor/laravel/framework/src/Illuminate/View/View.php(122): Illuminate\View\View->getContents..."
[11-Dec-2022 17:26:13] WARNING: [pool www] child 7807 said into stderr: "NOTICE: PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function Illuminate\View\Compilers\token_get_all() in /sdcard/srv/monica/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php:250"
[11-Dec-2022 17:26:13] WARNING: [pool www] child 7807 said into stderr: "Stack trace:"
[11-Dec-2022 17:26:13] WARNING: [pool www] child 7807 said into stderr: "#0 /sdcard/srv/monica/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php(159): Illuminate\View\Compilers\BladeCompiler->compileString('@extends('error...')"
[11-Dec-2022 17:26:13] WARNING: [pool www] child 7807 said into stderr: "#1 /sdcard/srv/monica/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(55): Illuminate\View\Compilers\BladeCompiler->compile('/sdcard/srv/mon...')"
[11-Dec-2022 17:26:13] WARNING: [pool www] child 7807 said into stderr: "#2 /sdcard/srv/monica/vendor/facade/ignition/src/Views/Engines/CompilerEngine.php(37): Illuminate\View\Engines\CompilerEngine->get('/sdcard/srv/mon...', Array)"
[11-Dec-2022 17:26:13] WARNING: [pool www] child 7807 said into stderr: "#3 /sdcard/srv/monica/vendor/laravel/framework/src/Illuminate/View/View.php(139): Facade\Ignition\Views\Engines\CompilerEngine->get('/sdcard/srv/mon...', Array)"
[11-Dec-2022 17:26:13] WARNING: [pool www] child 7807 said into stderr: "#4 /sdcard/srv/monica/vendor/laravel/framework/src/Illuminate/View/View.php(122): Illuminate\View\View->getContents..."

Version details:

root@FriendlyWrt:/sdcard/srv/monica# php8-fpm --version
PHP 8.1.13 (fpm-fcgi) (built: Dec  8 2022 23:19:44)
Copyright (c) The PHP Group
Zend Engine v4.1.13, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.13, Copyright (c), by Zend Technologies
root@FriendlyWrt:/sdcard/srv/monica# caddy version
v2.6.2 h1:wKoFIxpmOJLGl3QXoo6PNbYvGW4xLEgo32GPBEjWL8o=
root@FriendlyWrt:/sdcard/srv/monica# mysql --version
mysql  Ver 15.1 Distrib 10.6.10-MariaDB, for Linux (aarch64) using  EditLine wrapper
root@FriendlyWrt:/sdcard/srv/monica# cat /etc/openwrt_release
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='22.03.2'
DISTRIB_REVISION='r19803-9a599fee93'
DISTRIB_TARGET='rockchip/armv8'
DISTRIB_ARCH='aarch64_generic'
DISTRIB_DESCRIPTION='OpenWrt 22.03.2 r19803-9a599fee93'
DISTRIB_TAINTS='busybox'
root@FriendlyWrt:/sdcard/srv/monica# git describe --tags
v3.7.0

Additional context Yes, I am on an OpenWRT router; its a FriendlyElec NanoPi R6s - super beefy ARM SBC.

Also: I ended up running composer update once, but re-ran yarn run production too. I am also trying to re-run the processes as the web server user (www) - although that shouldn't really cause the issue shown above...

Thank you and kind regards, Ingwie!

SimonVanacco commented 1 year ago

Hi,

Monica needs the php tokenizer extension. This was previously undocumented, but installing this extensions should resolve the issue you were facing !

asbiin commented 1 year ago

Fixed by #6577

github-actions[bot] commented 3 weeks ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.