linuxserver / docker-grocy

A container for grocy - the ERP application for your kitchen https://grocy.info
GNU General Public License v3.0
333 stars 44 forks source link

Fresh pull blank webui #7

Closed CHBMB closed 5 years ago

CHBMB commented 5 years ago

linuxserver.io

Unraid

docker run -d --name='grocy' \
--net='bridge' \
-e TZ="Europe/London" \
-e 'PUID'='99' \
-e 'PGID'='100' \
-p '9283:80/tcp' \
-v '/mnt/disks/virtualisation/appdata/grocy':'/config':'rw' \
'linuxserver/grocy'
-------------------------------------
GID/UID
-------------------------------------

User uid: 99
User gid: 100
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-config: executing...
[cont-init.d] 20-config: exited 0.
[cont-init.d] 30-keygen: executing...
generating self-signed keys in /config/keys, you can replace these with your own keys if required
Generating a RSA private key
..............................+++++
.....+++++
writing new private key to '/config/keys/cert.key'
-----
[cont-init.d] 30-keygen: exited 0.
[cont-init.d] 50-config: executing...
[cont-init.d] 50-config: exited 0.
[cont-init.d] 99-custom-scripts: executing...
[custom-init] no custom scripts found exiting...
[cont-init.d] 99-custom-scripts: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.

Seems a few people are having this issue, and I was able to reproduce it locally on latest & linuxserver/grocy:v2.4.0-ls17

Rolled back to linuxserver/grocy:v2.3.0-ls16 and a fresh pull of that was working.

To further complicate things, using the /config folder from v2.4.0-ls17 with the image from v2.3.0-ls16 also doesn't work with a blank webui.

Using the /config folder from v2.3.0-ls16 with the image from v2.4.0-ls17 results in the webui coming up with Slim Application Error and the following being displayed on the browser page.

Slim Application Error

The application could not run because of the following error:
Details
Type: ErrorException
Message: Function name must be a string (View: /app/grocy/views/login.blade.php)
File: /config/data/viewcache/280834de7e8f30ba6d5b5ffd2e411299adf3057f.php
Line: 1
Trace

#0 /app/grocy/vendor/illuminate/view/Engines/PhpEngine.php(47): Illuminate\View\Engines\CompilerEngine->handleViewException(Object(Symfony\Component\Debug\Exception\FatalThrowableError), 2)
#1 /app/grocy/vendor/illuminate/view/Engines/CompilerEngine.php(59): Illuminate\View\Engines\PhpEngine->evaluatePath('/app/grocy/data...', Array)
#2 /app/grocy/vendor/illuminate/view/View.php(142): Illuminate\View\Engines\CompilerEngine->get('/app/grocy/view...', Array)
#3 /app/grocy/vendor/illuminate/view/View.php(125): Illuminate\View\View->getContents()
#4 /app/grocy/vendor/illuminate/view/View.php(90): Illuminate\View\View->renderContents()
#5 /app/grocy/vendor/rubellum/slim-blade-view/src/Blade.php(173): Illuminate\View\View->render()
#6 /app/grocy/vendor/rubellum/slim-blade-view/src/Blade.php(65): Slim\Views\Blade->fetch('login', Array)
#7 /app/grocy/controllers/LoginController.php(57): Slim\Views\Blade->render(Object(Slim\Http\Response), 'login')
#8 [internal function]: Grocy\Controllers\LoginController->LoginPage(Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#9 /app/grocy/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(41): call_user_func(Array, Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#10 /app/grocy/vendor/slim/slim/Slim/Route.php(356): Slim\Handlers\Strategies\RequestResponse->__invoke(Array, Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#11 /app/grocy/middleware/SessionAuthMiddleware.php(57): Slim\Route->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
#12 [internal function]: Grocy\Middleware\SessionAuthMiddleware->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
#13 /app/grocy/vendor/slim/slim/Slim/DeferredCallable.php(43): call_user_func_array(Object(Grocy\Middleware\SessionAuthMiddleware), Array)
#14 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
#15 /app/grocy/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
#16 /app/grocy/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\Route->Slim\{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response))
#17 /app/grocy/vendor/slim/slim/Slim/Route.php(334): Slim\Route->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
#18 /app/grocy/vendor/slim/slim/Slim/App.php(515): Slim\Route->run(Object(Slim\Http\Request), Object(Slim\Http\Response))
#19 /app/grocy/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
#20 /app/grocy/vendor/slim/slim/Slim/App.php(405): Slim\App->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
#21 /app/grocy/vendor/slim/slim/Slim/App.php(313): Slim\App->process(Object(Slim\Http\Request), Object(Slim\Http\Response))
#22 /app/grocy/app.php(71): Slim\App->run()
#23 /app/grocy/public/index.php(3): require_once('/app/grocy/app....')
#24 {main}

Previous exception
Type: Symfony\Component\Debug\Exception\FatalThrowableError
Message: Function name must be a string
File: /config/data/viewcache/280834de7e8f30ba6d5b5ffd2e411299adf3057f.php
Line: 1
Trace

#0 /app/grocy/vendor/illuminate/view/Engines/PhpEngine.php(43): include()
#1 /app/grocy/vendor/illuminate/view/Engines/CompilerEngine.php(59): Illuminate\View\Engines\PhpEngine->evaluatePath('/app/grocy/data...', Array)
#2 /app/grocy/vendor/illuminate/view/View.php(142): Illuminate\View\Engines\CompilerEngine->get('/app/grocy/view...', Array)
#3 /app/grocy/vendor/illuminate/view/View.php(125): Illuminate\View\View->getContents()
#4 /app/grocy/vendor/illuminate/view/View.php(90): Illuminate\View\View->renderContents()
#5 /app/grocy/vendor/rubellum/slim-blade-view/src/Blade.php(173): Illuminate\View\View->render()
#6 /app/grocy/vendor/rubellum/slim-blade-view/src/Blade.php(65): Slim\Views\Blade->fetch('login', Array)
#7 /app/grocy/controllers/LoginController.php(57): Slim\Views\Blade->render(Object(Slim\Http\Response), 'login')
#8 [internal function]: Grocy\Controllers\LoginController->LoginPage(Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#9 /app/grocy/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(41): call_user_func(Array, Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#10 /app/grocy/vendor/slim/slim/Slim/Route.php(356): Slim\Handlers\Strategies\RequestResponse->__invoke(Array, Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#11 /app/grocy/middleware/SessionAuthMiddleware.php(57): Slim\Route->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
#12 [internal function]: Grocy\Middleware\SessionAuthMiddleware->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
#13 /app/grocy/vendor/slim/slim/Slim/DeferredCallable.php(43): call_user_func_array(Object(Grocy\Middleware\SessionAuthMiddleware), Array)
#14 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
#15 /app/grocy/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
#16 /app/grocy/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\Route->Slim\{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response))
#17 /app/grocy/vendor/slim/slim/Slim/Route.php(334): Slim\Route->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
#18 /app/grocy/vendor/slim/slim/Slim/App.php(515): Slim\Route->run(Object(Slim\Http\Request), Object(Slim\Http\Response))
#19 /app/grocy/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
#20 /app/grocy/vendor/slim/slim/Slim/App.php(405): Slim\App->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
#21 /app/grocy/vendor/slim/slim/Slim/App.php(313): Slim\App->process(Object(Slim\Http\Request), Object(Slim\Http\Response))
#22 /app/grocy/app.php(71): Slim\App->run()
#23 /app/grocy/public/index.php(3): require_once('/app/grocy/app....')
#24 {main}
CHBMB commented 5 years ago

In short, looks like something broke between v2.3.0 and v2.4.0. Looking at the grocy issues page, nothing seems to have been reported. v2.4.0 was only released a couple of days ago though. Scanning the changelog the only thing that caught my eye as potentially an issue is this:

Internal improvement: Localizations are now handled via gettext, both on server and client side

    Mainly to properly handle languages with more than 2 plural forms
    This involved some string changes which results in a needed (re)translation of about 20 strings (excluding demo data)
    Also applies to quantity units, n-plural forms can be entered on the quantity unit edit page
    It's not required to install the PHP gettext extension, on both, server and client, managed implementations of gettext are used (oscarotero/Gettext & oscarotero/gettext-translator)

apk add php7-gettext fwiw didn't resolve the issue.

Nor did

apk add composer
composer require gettext/gettext
CHBMB commented 5 years ago

Closed with https://github.com/linuxserver/docker-grocy/pull/8