I am trying to install or mount OpenSocial codebase into Docker4Drupal.
I was able to access the installation process but I am getting the error message below after installing OpenSocial modules. Specifically, it stops installing the gnode.
An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /core/install.php?profile=social&langcode=en&id=2&op=do_nojs&op=do
StatusText: OK
ResponseText: Drupal\Component\Serialization\Exception\InvalidDataTypeException: yaml_parse(): end of stream reached without finding document 0 in Drupal\Component\Serialization\YamlPecl::errorHandler() (line 63 of /var/www/html/core/lib/Drupal/Component/Serialization/YamlPecl.php).
There is an error message link provided and when I access it, this what it displays:
Additional uncaught exception thrown while handling exception.
Original
Drupal\Component\Serialization\Exception\InvalidDataTypeException: yaml_parse(): end of stream reached without finding document 0 in Drupal\Component\Serialization\YamlPecl::errorHandler() (line 63 of /var/www/html/core/lib/Drupal/Component/Serialization/YamlPecl.php).
Drupal\Component\Serialization\YamlPecl::errorHandler(2, 'yaml_parse(): end of stream reached without finding document 0', '/var/www/html/core/lib/Drupal/Component/Serialization/YamlPecl.php', 45, Array)
yaml_parse('#services:
# grolesync.synchronizer:
# class: 'Drupal\grolesync\GroupRoleSynchronizer'
# arguments: ['@entity_type.manager']
', 0, 0, Array) (Line: 45)
Drupal\Component\Serialization\YamlPecl::decode('#services:
# grolesync.synchronizer:
# class: 'Drupal\grolesync\GroupRoleSynchronizer'
# arguments: ['@entity_type.manager']
') (Line: 35)
Drupal\Component\Serialization\Yaml::decode('#services:
# grolesync.synchronizer:
# class: 'Drupal\grolesync\GroupRoleSynchronizer'
# arguments: ['@entity_type.manager']
') (Line: 343)
Drupal\Core\DependencyInjection\YamlFileLoader->loadFile('modules/group/modules/grolesync/grolesync.services.yml') (Line: 63)
Drupal\Core\DependencyInjection\YamlFileLoader->load('modules/group/modules/grolesync/grolesync.services.yml') (Line: 1254)
Drupal\Core\DrupalKernel->compileContainer() (Line: 873)
Drupal\Core\DrupalKernel->initializeContainer() (Line: 18)
Drupal\Core\Installer\InstallerKernel->initializeContainer() (Line: 465)
Drupal\Core\DrupalKernel->boot() (Line: 414)
install_begin_request(Object, Array) (Line: 114)
install_drupal(Object) (Line: 44)
Additional
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "theme.manager". in Symfony\Component\DependencyInjection\ContainerBuilder->getDefinition() (line 824 of /var/www/html/vendor/symfony/dependency-injection/ContainerBuilder.php).
Symfony\Component\DependencyInjection\ContainerBuilder->getDefinition('theme.manager') (Line: 464)
Symfony\Component\DependencyInjection\ContainerBuilder->get('theme.manager') (Line: 674)
Drupal::theme() (Line: 22)
_drupal_maintenance_theme() (Line: 710)
drupal_maintenance_theme() (Line: 967)
install_display_output(Array, Array, Array) (Line: 264)
_drupal_log_error(Array, 1) (Line: 570)
_drupal_exception_handler(Object)
Checking the server logs using sudo docker-compose logs -f php, I am getting the result below:
[25-May-2017 09:30:08] WARNING: [pool www] child 31 said into stderr: "NOTICE: PHP message: Drupal\Component\Serialization\Exception\InvalidDataTypeException: yaml_parse(): end of stream reached without finding document 0 in /var/www/html/core/lib/Drupal/Component/Serialization/YamlPecl.php on line 63 #0 [internal function]: Drupal\Component\Serialization\YamlPecl::errorHandler(2, 'yaml_parse(): e...', '/var/www/html/c...', 45, Array)"
php_1 | [25-May-2017 09:30:08] WARNING: [pool www] child 31 said into stderr: "#1 /var/www/html/core/lib/Drupal/Component/Serialization/YamlPecl.php(45): yaml_parse('#services:\n# g...', 0, 0, Array)"
php_1 | [25-May-2017 09:30:08] WARNING: [pool www] child 31 said into stderr: "#2 /var/www/html/core/lib/Drupal/Component/Serialization/Yaml.php(35): Drupal\Component\Serialization\YamlPecl::decode('#services:\n# g...')"
php_1 | [25-May-2017 09:30:08] WARNING: [pool www] child 31 said into stderr: "#3 /var/www/html/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php(343): Drupal\Component\Serialization\Yaml::decode('#services:\n# g...')"
php_1 | [25-May-2017 09:30:08] WARNING: [pool www] child 31 said into stderr: "#4 /var/www/html/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php(63): Drupal\Core\DependencyInjection\YamlFileLoader->loadFile('modules/group/m...')"
php_1 | [25-May-2017 09:30:08] WARNING: [pool www] child 31 said into stderr: "#5 /var/www/html/core/lib/Drupal/Core/DrupalKernel.php(1254): Drupal\Core\Dep..."
php_1 | 172.18.0.6 - 25/May/2017:09:30:07 +0000 "POST /core/install.php" 200
php_1 | [25-May-2017 09:37:19] WARNING: [pool www] child 30 said into stderr: "NOTICE: PHP message: Drupal\Component\Serialization\Exception\InvalidDataTypeException: yaml_parse(): end of stream reached without finding document 0 in /var/www/html/core/lib/Drupal/Component/Serialization/YamlPecl.php on line 63 #0 [internal function]: Drupal\Component\Serialization\YamlPecl::errorHandler(2, 'yaml_parse(): e...', '/var/www/html/c...', 45, Array)"
php_1 | [25-May-2017 09:37:19] WARNING: [pool www] child 30 said into stderr: "#1 /var/www/html/core/lib/Drupal/Component/Serialization/YamlPecl.php(45): yaml_parse('#services:\n# g...', 0, 0, Array)"
php_1 | [25-May-2017 09:37:19] WARNING: [pool www] child 30 said into stderr: "#2 /var/www/html/core/lib/Drupal/Component/Serialization/Yaml.php(35): Drupal\Component\Serialization\YamlPecl::decode('#services:\n# g...')"
php_1 | [25-May-2017 09:37:19] WARNING: [pool www] child 30 said into stderr: "#3 /var/www/html/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php(343): Drupal\Component\Serialization\Yaml::decode('#services:\n# g...')"
php_1 | [25-May-2017 09:37:19] WARNING: [pool www] child 30 said into stderr: "#4 /var/www/html/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php(63): Drupal\Core\DependencyInjection\YamlFileLoader->loadFile('modules/group/m...')"
php_1 | [25-May-2017 09:37:19] WARNING: [pool www] child 30 said into stderr: "#5 /var/www/html/core/lib/Drupal/Core/DrupalKernel.php(1254): Drupal\Core\Dep..."
And I won't be able to continue again. When I access the homepage again, I am getting the message below:
The requested page could not be found.
I really need a help on this. Thanks you.
Comments
Comment #2
Andy_D commentedSame message just received on a clean install using DrupalVM. I'd instantiated the project using the
composer create-projectoutside of the VM and then pointed the VM at the directory. I'd gone through the site install and received this at the Install Open Social modules step.Comment #3
johnreytanquinco commentedI tried to import a fresh database that I used when OpenSocial was installed in my localhost into the MariaDB docker container(which is now empty/dropped), did a refresh of the page but getting the same result from the last error log above, and this message in the homepage "The website encountered an unexpected error. Please try again later."
I take a look at similar issue from the net but no luck.
Hoping to find fix for this.
Comment #4
Andy_D commentedSo doing a
drush sql-dropallows you restart the process again but the error comes in when you are doing the Install Open Social modules part of the installation.Comment #5
Andy_D commentedLooks like this might be an issue with 8.3 and some incompatibilities there. I'm going to try it on a prior version.
Comment #6
johnreytanquinco commentedI access the mysql container and just drop the database. The error comes during the fresh install of the site and after I import a working database. Pretty much, its not an issue of database but in the core when installing it on VM or docker. Well, I have a working OpenSocial site installed in my localhost, as I mentioned.
Yes, hopefully it will work on the earlier version. I might also try but please send me updates if you found something. Thanks!
Comment #7
johnreytanquinco commentedI have tried so far but still showing the same result/error message mentioned above.
Drupal core version:
- v 8.2.8
- v 8.1.10
I modified my docker-compose.yml file config to its latest wodby-docker image of the following:
- MariaDB
- php
- nginx
Comment #8
kristiaanvandeneyndeCan you try renaming the following files?
The grolesync module has been temporarily disabled but it may cause an issue because it still lists YAML files without content, only comments.
Comment #9
Andy_D commentedA temporary fix is to edit the files as follows:
renaming the following files to ._DISABLED_yml instead of .yml
- grolesync.links.task.yml
- grolesync.routing.yml
- grolesync.services.yml
These are found in /html/modules/contrib/group/modules/grolesync.
Doing this I was able to fully install the profile. I have raised a new issue to remove this module from the build.
Comment #10
johnreytanquinco commentedThank you so much @kristiaanvandeneynde @Andy_D. Will give it a try now :D
Comment #11
jaapjan commentedSome YamlParsers can not handle "empty" YAML files (with only comments) very well. I was not able to reproduce it in the Docker builds or in Platform.sh environments but I've seen similar errors in the past.
Anyway I've opened a pull request in the issue Andy created. I agree that is the way forward (for now) even though grolesync will most likely be enabled again in a later stage.
Comment #12
kristiaanvandeneyndeCross-post from #2882738: Remove Group role sync from install profile
The group role sync module will be empty as of #2883238: Move the grolesync module to the main module for outsiders only.. So it should no longer break any install. When I cut a new release, I'll mention it in the notes. There is absolutely no need to have it still enabled and it will be removed in 8.x-1.0. You have until then to make sure it is uninstalled everywhere.
Comment #13
Andy_D commentedI will be revisiting the installed this week so will be able to update this ticket.
Comment #14
Andy_D commentedTried this yesterday - clean install and it worked perfectly. I was able to enable all the extras and populate the system with demo content. Consider it working for DrupalVM at least.
Comment #16
pieterdcIndeed.
And looking at your stack trace you're using PECL YAML. That's a parser which can't handle YAML files with only comments, yet. For more details, see: #3003300: PECL YAML errors at valid YAML file which only contains comments.