symfony-cmf / cmf-sandbox

Base project for trying CMF components integration
http://cmf.symfony.com
Other
367 stars 140 forks source link

try to get the output #400

Closed ElectricMaxxx closed 6 years ago

ElectricMaxxx commented 6 years ago

... and go on ...

ElectricMaxxx commented 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?

dbu commented 6 years ago

that sounds odd. the root should automatically exist when a workspace is created. can you get a stack trace?

ElectricMaxxx commented 6 years ago

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
ElectricMaxxx commented 6 years ago

I increased the verbosity here too, so you could see same on the branch instance on platform.sh

dbu commented 6 years ago

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

dbu commented 6 years ago

can you check your database contents to see if / is existing? maybe the problem is earlier, when the workspace is created

ElectricMaxxx commented 6 years ago

@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?

dbu commented 6 years ago

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.

ElectricMaxxx commented 6 years ago

@dbu can it be that the cached FileSystem version is divergent to the the original. maybe du to write access issue or equal?

ElectricMaxxx commented 6 years ago

selection_139 yess, looks like the file which holds it isn't there.

ElectricMaxxx commented 6 years ago

ahh, sorry after that it looks into the database.

ElectricMaxxx commented 6 years ago

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.

ElectricMaxxx commented 6 years ago

yea and it works now. @dbu time for a little review?

ElectricMaxxx commented 6 years ago

parts of the code had been changed in a PR before.

ElectricMaxxx commented 6 years ago

I would merge now, to get the sandbox working again in the demo.

dbu commented 6 years ago

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?

dbu commented 6 years ago

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 ;-)