Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slim application error HASSIO #617

Closed
pasqui7 opened this issue Mar 16, 2020 · 5 comments
Closed

Slim application error HASSIO #617

pasqui7 opened this issue Mar 16, 2020 · 5 comments
Labels

Comments

@pasqui7
Copy link

pasqui7 commented Mar 16, 2020

Hi guys,
I can’t open grocy.
I tired to install grocy on hassio, but when I try to open on web ui, come out one error message like : slim application error.

I tried to modify ssl to false from true, the same issue. I tried to reset to default config, same issue.

Can you have any idea to fix it?

Attached the log

Slim Application Error

The application could not run because of the following error:
Details
Type: PDOException
Code: HY000
Message: SQLSTATE[HY000]: General error: 1 no such table: habits
File: /var/www/grocy/services/DatabaseService.php
Line: 55
Trace

#0 /var/www/grocy/services/DatabaseService.php(55): PDO->exec('ALTER TABLE hab...')
#1 /var/www/grocy/services/DatabaseMigrationService.php(47): Grocy\Services\DatabaseService->ExecuteDbStatement('ALTER TABLE hab...')
#2 /var/www/grocy/services/DatabaseMigrationService.php(23): Grocy\Services\DatabaseMigrationService->ExecuteSqlMigrationWhenNeeded(35, 'ALTER TABLE hab...')
#3 /var/www/grocy/controllers/SystemController.php(23): Grocy\Services\DatabaseMigrationService->MigrateDatabase()
#4 [internal function]: Grocy\Controllers\SystemController->Root(Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#5 /var/www/grocy/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(40): call_user_func(Array, Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#6 /var/www/grocy/vendor/slim/slim/Slim/Route.php(281): Slim\Handlers\Strategies\RequestResponse->__invoke(Array, Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#7 /var/www/grocy/middleware/SessionAuthMiddleware.php(26): Slim\Route->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
#8 [internal function]: Grocy\Middleware\SessionAuthMiddleware->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
#9 /var/www/grocy/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(Grocy\Middleware\SessionAuthMiddleware), Array)
#10 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
#11 /var/www/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))
#12 /var/www/grocy/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\Route->Slim{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response))
#13 /var/www/grocy/vendor/slim/slim/Slim/Route.php(268): Slim\Route->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
#14 /var/www/grocy/vendor/slim/slim/Slim/App.php(503): Slim\Route->run(Object(Slim\Http\Request), Object(Slim\Http\Response))
#15 /var/www/grocy/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
#16 /var/www/grocy/vendor/slim/slim/Slim/App.php(392): Slim\App->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
#17 /var/www/grocy/vendor/slim/slim/Slim/App.php(297): Slim\App->process(Object(Slim\Http\Request), Object(Slim\Http\Response))
#18 /var/www/grocy/app.php(72): Slim\App->run()
#19 /var/www/grocy/public/index.php(3): require_once('/var/www/grocy/...')
#20 {main}

@berrnd
Copy link
Member

berrnd commented Mar 16, 2020

Maybe something with database migrations went wrong. The error is about a migration which should change the habits table, but it does not exist, however.

So my idea would be to delete the database file (data/grocy.db, don't know where this folder is in Home Assistant).

@pasqui7
Copy link
Author

pasqui7 commented Mar 16, 2020

It’s the same Man!
A tried to remove and reinstall the component but the issue is it the same

@berrnd
Copy link
Member

berrnd commented Mar 16, 2020

Ok, and what happens when you try what I suggested?

=>

So my idea would be to delete the database file (data/grocy.db).

@pasqui7
Copy link
Author

pasqui7 commented Mar 16, 2020

the same error,
this is the log of the component:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] 01-grocy: applying...
[fix-attrs.d] 01-grocy: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing...

Add-on: Grocy
ERP beyond your fridge! A groceries & household management solution for your home

Add-on version: 0.7.1
You are running the latest version of this add-on.
System: HassOS 3.12 (armv7 / raspberrypi3)
Home Assistant Core: 0.106.6
Home Assistant Supervisor: 209

Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.

[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing...
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] grocy.sh: executing...
[cont-init.d] grocy.sh: exited 0.
[cont-init.d] nginx.sh: executing...
[cont-init.d] nginx.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[15:11:39] INFO: Starting PHP-FPM...
[15:11:53] INFO: Starting NGinx....

@berrnd
Copy link
Member

berrnd commented Mar 16, 2020

If you REALLY have deleted the database file, all migrations will run again to populate the database schema. I cannot reproduce this (but I don't use the Home Assistant integration).

If you can reproduce this on a "normal setup", I'm happy to help, maybe ask about the HA specific problem on their forums.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants