Shopware 6 Installation - Slim Application Error

Hi! During the installation of Shopware 6 the process stops with an error. 
 

Error

Received an error message.
URL: importDatabase
Message: Internal Server Error

Please try to fix this error and restart the update.

Response


Slim Application Error

The application could not run because of the following error:

Details

Type: RuntimeException

Message: Identifier DB not initialized yet

File: /shared/httpd/shopware6/htdocs/public/recovery/install/src/ContainerProvider.php

Line: 100

Trace

#0 /shared/httpd/shopware6/htdocs/public/recovery/common/vendor/pimple/pimple/src/Pimple/Container.php(118): Shopware\Recovery\Install\ContainerProvider::Shopware\Recovery\Install\{closure}(Object(Slim\Container))
#1 /shared/httpd/shopware6/htdocs/public/recovery/install/src/ContainerProvider.php(152): Pimple\Container->offsetGet('db')
#2 /shared/httpd/shopware6/htdocs/public/recovery/common/vendor/pimple/pimple/src/Pimple/Container.php(118): Shopware\Recovery\Install\ContainerProvider::Shopware\Recovery\Install\{closure}(Object(Slim\Container))
#3 /shared/httpd/shopware6/htdocs/public/recovery/install/src/ContainerProvider.php(178): Pimple\Container->offsetGet('dbal')
#4 /shared/httpd/shopware6/htdocs/public/recovery/common/vendor/pimple/pimple/src/Pimple/Container.php(118): Shopware\Recovery\Install\ContainerProvider::Shopware\Recovery\Install\{closure}(Object(Slim\Container))
#5 /shared/httpd/shopware6/htdocs/public/recovery/common/vendor/slim/slim/Slim/Container.php(123): Pimple\Container->offsetGet('migration.manag...')
#6 /shared/httpd/shopware6/htdocs/public/recovery/install/src/app.php(502): Slim\Container->get('migration.manag...')
#7 [internal function]: Closure->{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#8 /shared/httpd/shopware6/htdocs/public/recovery/common/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(41): call_user_func(Object(Closure), Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#9 /shared/httpd/shopware6/htdocs/public/recovery/common/vendor/slim/slim/Slim/Route.php(356): Slim\Handlers\Strategies\RequestResponse->__invoke(Object(Closure), Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#10 /shared/httpd/shopware6/htdocs/public/recovery/common/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\Route->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
#11 /shared/httpd/shopware6/htdocs/public/recovery/common/vendor/slim/slim/Slim/Route.php(334): Slim\Route->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
#12 /shared/httpd/shopware6/htdocs/public/recovery/common/vendor/slim/slim/Slim/App.php(515): Slim\Route->run(Object(Slim\Http\Request), Object(Slim\Http\Response))
#13 /shared/httpd/shopware6/htdocs/public/recovery/install/src/app.php(154): Slim\App->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
#14 [internal function]: Closure->{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\App))
#15 /shared/httpd/shopware6/htdocs/public/recovery/common/vendor/slim/slim/Slim/DeferredCallable.php(43): call_user_func_array(Object(Closure), Array)
#16 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\App))
#17 /shared/httpd/shopware6/htdocs/public/recovery/common/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\App))
#18 /shared/httpd/shopware6/htdocs/public/recovery/common/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->Slim\{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response))
#19 /shared/httpd/shopware6/htdocs/public/recovery/common/vendor/slim/slim/Slim/App.php(405): Slim\App->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
#20 /shared/httpd/shopware6/htdocs/public/recovery/common/vendor/slim/slim/Slim/App.php(313): Slim\App->process(Object(Slim\Http\Request), Object(Slim\Http\Response))
#21 /shared/httpd/shopware6/htdocs/public/recovery/install/index.php(51): Slim\App->run()
#22 {main}

 

Docker? Non-Docker? Windows? OSX? PHP Version? MYSQL Version?

Windows 10 Pro + WSL2 (Ubuntu-18.04)

Docker installed on Ubuntu

DevilBox

Apache 2.4

PHP and MariaDB precise versions I will provide tomorrow, it’s on job computer.

For now, I can say that I have installed the same system and had no problems.

On laptop I have PHP 7.3.7 and MySQL 5.7.25

The difference between 2 computers is that my laptop is much faster, SSD and 32Gb Ram.

On job computer is slow HDD and 8Gb Ram. The installation is very slow. Could the problem be because of computer’s read-write speed?

Yes, that’s possible. Maybe try increase the max_execution_time in your php.ini and memory_limit

Are you installing with the web-interace or via shell? If web, maybe try the installation via shell.

https://docs.shopware.com/en/shopware-platform-dev-en/getting-started/installation-guide#docker-installation-recommended

1 „Gefällt mir“

Sorry for late response. Yesterday I wasn’t at the job.

So, on job computer where arrises the error I have:

PHP 7.3.7

MariaDB 10.3.13

max_execution_time = 36000, memory_limit = 512M  

I have changed to:

max_execution_time = 72000, memory_limit = 2G

I tried again to install and got the same error.

I will try switch to PHP 7.2 and install again.

I was having the same error (https://forum.shopware.com/discussion/61827/installationsfehler-identifier-db-not-initialized-yet).

A PHP-Upgrade to 7.3.8 fixed the problem. (7.3.7 is not supported)

1 „Gefällt mir“

I am installing via web interface. In need and enviromnet where I can install any script donwloading it from website and it will work. I tried Vagrant, Docker on Windows with VirtualBox, with Hyper-V and all of them are slow on windows. Now I found WSL2 on Windows Insider edition where I can install Docker directly on Ubuntu in WSL and it is much faster then Docker on Windows. And I have found DevilBox which runs on Docker and is very nice. I can install here Sopware in two ways. https://devilbox.readthedocs.io/en/latest/examples/setup-shopware.html#

But I prefeer to unzip the downloaded from website version of Shopware, because it has eveything inside.

With PHP 7.2.19 I get the error:

Error
Received an error message.
URL: importDatabase
Message: Service Unavailable

Please try to fix this error and restart the update.
Response




Service Unavailable

The server is temporarily unable to service your
request due to maintenance downtime or capacity
problems. Please try again later.

Seems to be a performance issue.

During the installation in Task Manager Disk activity is 100% and Memory is about 60-80% full. 

After a little time I tried again to install and  succeeded to get the progress bar till the end. After filling the DB coneection data and admin credentials and click “Next” I got a new error:

Fatal error: Uncaught RuntimeException: Unable to write in the logs directory (/shared/httpd/shopware6/htdocs/var/log) in /shared/httpd/shopware6/htdocs/vendor/symfony/http-kernel/Kernel.php:650 Stack trace: #0 /shared/httpd/shopware6/htdocs/vendor/symfony/http-kernel/Kernel.php(549): Symfony\Component\HttpKernel\Kernel->buildContainer() #1 /shared/httpd/shopware6/htdocs/vendor/shopware/core/Kernel.php(125): Symfony\Component\HttpKernel\Kernel->initializeContainer() #2 /shared/httpd/shopware6/htdocs/public/index.php(66): Shopware\Core\Kernel->boot() #3 {main} thrown in /shared/httpd/shopware6/htdocs/vendor/symfony/http-kernel/Kernel.php on line 650