Closed ElectricMaxxx closed 6 years ago
Now we see the problem:
Errors on Execution:
+++ Drop and init dbal: +++
Command: php /app/web/../bin/console --env=prod doctrine:phpcr:init:dbal --drop --force -n
+++ DONE +++
Jackalope Doctrine DBAL tables have been initialized successfully.
+++ Init repositories: +++
Command: php /app/web/../bin/console --env=prod doctrine:phpcr:repository:init -n
+++ Errors +++
Successfully registered system node types.
Executing initializer: CmfRoutingBundle
[PHPCR\PathNotFoundException]
Item "/" not found in workspace "default"
[PHPCR\ItemNotFoundException]
Item "/" not found in workspace "default"
doctrine:phpcr:repository:init [--session [SESSION]] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--]
and those i get locally random too. But i do not have any idea what the issue is here, @dbu you?
that sounds odd. the root should automatically exist when a workspace is created. can you get a stack trace?
Locally i get:
() at /home/maximilian/OpenSource/Cmf/cmf-sandbox/vendor/jackalope/jackalope-doctrine-dbal/src/Jackalope/Transport/DoctrineDBAL/CachedClient.php:245
Jackalope\Transport\DoctrineDBAL\CachedClient->getNode() at /home/maximilian/OpenSource/Cmf/cmf-sandbox/vendor/jackalope/jackalope/src/Jackalope/Transport/AbstractReadLoggingWrapper.php:90
Jackalope\Transport\AbstractReadLoggingWrapper->getNode() at /home/maximilian/OpenSource/Cmf/cmf-sandbox/vendor/jackalope/jackalope/src/Jackalope/ObjectManager.php:201
Jackalope\ObjectManager->getNodeByPath() at /home/maximilian/OpenSource/Cmf/cmf-sandbox/vendor/jackalope/jackalope/src/Jackalope/Session.php:273
Jackalope\Session->getNode() at /home/maximilian/OpenSource/Cmf/cmf-sandbox/vendor/jackalope/jackalope/src/Jackalope/Session.php:204
Jackalope\Session->getRootNode() at /home/maximilian/OpenSource/Cmf/cmf-sandbox/vendor/phpcr/phpcr-utils/src/PHPCR/Util/NodeHelper.php:55
PHPCR\Util\NodeHelper::createPath() at /home/maximilian/OpenSource/Cmf/cmf-sandbox/vendor/doctrine/phpcr-bundle/Initializer/GenericInitializer.php:112
Doctrine\Bundle\PHPCRBundle\Initializer\GenericInitializer->createBasePaths() at /home/maximilian/OpenSource/Cmf/cmf-sandbox/vendor/doctrine/phpcr-bundle/Initializer/GenericInitializer.php:90
Doctrine\Bundle\PHPCRBundle\Initializer\GenericInitializer->init() at /home/maximilian/OpenSource/Cmf/cmf-sandbox/vendor/doctrine/phpcr-bundle/Initializer/InitializerManager.php:99
Doctrine\Bundle\PHPCRBundle\Initializer\InitializerManager->initialize() at /home/maximilian/OpenSource/Cmf/cmf-sandbox/vendor/doctrine/phpcr-bundle/Command/RepositoryInitCommand.php:81
Doctrine\Bundle\PHPCRBundle\Command\RepositoryInitCommand->execute() at /home/maximilian/OpenSource/Cmf/cmf-sandbox/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:264
Symfony\Component\Console\Command\Command->run() at /home/maximilian/OpenSource/Cmf/cmf-sandbox/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:892
Symfony\Component\Console\Application->doRunCommand() at /home/maximilian/OpenSource/Cmf/cmf-sandbox/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:228
Symfony\Component\Console\Application->doRun() at /home/maximilian/OpenSource/Cmf/cmf-sandbox/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:81
Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /home/maximilian/OpenSource/Cmf/cmf-sandbox/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:130
Symfony\Component\Console\Application->run() at /home/maximilian/OpenSource/Cmf/cmf-sandbox/bin/console:29
I increased the verbosity here too, so you could see same on the branch instance on platform.sh
your local stack trace misses the place where the exception is thrown. the cached client forwards to the actual client on line 245: https://github.com/jackalope/jackalope-doctrine-dbal/blob/1.3.1/src/Jackalope/Transport/DoctrineDBAL/CachedClient.php#L245
can you check your database contents to see if / is existing? maybe the problem is earlier, when the workspace is created
@dbu for the current build: http://pr-400-zfrfrdi-hrwsaa77j2pyk.eu.platform.sh/reload-fixtures.php do we have no verbose information on our creation and init command?
the symfony application exception handling is quite annoying there. i think it assumes that the actual exception is printed already - it only shows the rest of the trace, right after the line that would be really interesting.
maybe you can find locally whats up with the doctrine-dbal? afaik the default workspace should automatically exist and / automatically be created.
@dbu can it be that the cached FileSystem version is divergent to the the original. maybe du to write access issue or equal?
yess, looks like the file which holds it isn't there.
ahh, sorry after that it looks into the database.
I got it the answer was somewhere in between. When the cache dir isn't completely removed the cached client tries to fetch from an invalid cache, which resolves into an ItemNotFound
I reproduced it by commenting out the removing command for the cache folder. I currently have to figure out to have the correct folder on plattform.sh then the reloadFixtures and the cron should start working correctly.
yea and it works now. @dbu time for a little review?
parts of the code had been changed in a PR before.
I would merge now, to get the sandbox working again in the demo.
that is some nasty interaction with the cache here! glad you found this one max! and yes, having the reset thing also reset the cache seems very reasonable.
is the same also used when triggering the reset through the web browser? or do we not need it then?
one small gripe: i would prefer it if you would squash the commits before merging such branches, to make them one single commit with a descriptive commit message. here it would be something like "Delete old cache before setup, to avoid problem with jackalope-doctrine-dbal cache". Its already merged, but for a next time ;-)
... and go on ...