2

We recently purchased software that runs as an extension for Magento 2. We purchased a brand new VPS setup, and turned it over to them for installation. They completed the installation and got their product working, and turned the site/server back over to us, and everything seemed to be working fine.

I've been attempting to install some additional extensions through Magento's web component wizard, and kept getting the following error at the Cron readiness check:

Cron script readiness check failed.

Error from Updater Application Cron Script:
Cron job has not been configured yet

We configured the Cron Tasks and attempted to run them with bin/magento cron:run but then recieve the following error:

[Magento\Framework\Exception\LocalizedException] 
Invalid Document 
Element 'type': Character content other than whitespace is not allowed because the content type is 'element-only'

The same error is also generated when attempting to run magento setup:upgrade

setup:upgrade trace

I'm fairly new to the Magento platform, and am in the dark as to exactly how everything was configured during installation since a third party installed it, so my question is how do I go about tracking down the source of this error? I've looked through just about every log I can find and can't seem to find it.

XML that has been modified/added:

<?xml version="1.0"?>
<config_detail>
<url_detail>
   <appname></appname>
   <base_url></base_url>
</url_detail>
<Integration_detail>
    <accessToken></accessToken>
</Integration_detail>
<designer_tool_dbconnection>
    <host></host>
    <dbuser></dbuser>
    <dbpass></dbpass>
    <dbname></dbname>
</designer_tool_dbconnection>
</config_detail>
codestr
  • 505
  • 1
  • 7
  • 18
  • Please delete var/generation & run command again – Jackson Feb 07 '17 at 03:14
  • @AnkitShah remove the entire directory, or just delete the files within it? – codestr Feb 07 '17 at 03:15
  • @AnkitShah Also, it appears there are two var/generation directories, var/generation and var/generation1 – codestr Feb 07 '17 at 03:16
  • It should be only one var/generation directory delete other directory – Jackson Feb 07 '17 at 03:21
  • So, delete both of them, or delete the second directory and empty the first one? – codestr Feb 07 '17 at 03:21
  • Delete var/generation1 & Empty var/generation – Jackson Feb 07 '17 at 03:25
  • Receiving the same error after removing/emptying those two directories. – codestr Feb 07 '17 at 04:08
  • @ManthanDave as far as I'm aware, this is the only XML that has been added or modified (added to original post) – codestr Feb 07 '17 at 05:49
  • @codestr yes but where is it code ? post that xml file code ? – Manthan Dave Feb 07 '17 at 05:50
  • @ManthanDave Added to bottom of the original post, sorry. – codestr Feb 07 '17 at 05:54
  • I did just notice that if I remove the var/generation directory, then recreate it, it is created with the same owner but a different group than the rest of the app (user:user rather than user:www-data). Could this be a permissions issue? – codestr Feb 07 '17 at 05:55
  • ohh yes Correct !!!! that is what i am going to written !! the xml is correct you have only permission issue while you generate again !!! so change the permission of var and pub/media directory to 755 it will works – Manthan Dave Feb 07 '17 at 06:00
  • @codestr go to your magento2 root directory and the run sudo chmod -R 775 var , pub/media and then check – Manthan Dave Feb 07 '17 at 06:02
  • They're both currently 777 – codestr Feb 07 '17 at 06:03
  • @codestr thats okay - http://magento.stackexchange.com/questions/91870/magento-2-folder-file-permissions - follow this url for permission !!! now is it solved ? – Manthan Dave Feb 07 '17 at 06:04
  • So, I think my issue is that the apache user/group (www-data) cannot write to the var/generation directory because when it is created, ownership is assigned to user:user-group instead of user:www-data, but I'm not sure how to set the permissions so new files/directories are created under the web server group. – codestr Feb 07 '17 at 06:28

1 Answers1

0

Turns out this was an issue with the custom module we had purchased, and was a result of an error in their di.xml file.

codestr
  • 505
  • 1
  • 7
  • 18
  • 2
    Could you please specify the error and how they solved it? Im having the same situation, but no di.xml, other XML seem okay.. – Max Nov 06 '17 at 20:56
  • @Max So, I'm not 100% sure whether it was maybe a syntax issue, or maybe even an encoding issue, but when I had opened their di.xml file, character spacing was all over the place, random line breaks, etc. All I did was clean up the spacing and re-save the file and the issue disappeared. – codestr Nov 28 '17 at 15:26
  • I am facing similar issue and beautified all the XML files of third part module. Still I get the same error. How do I resolve this ? – Slimshadddyyy Dec 11 '17 at 11:08
  • @Vikram have you tried disabling/removing the extension to confirm that it is indeed the cause of the error? It may not be a syntax issue at all, there could be a number of issues wrong, referencing the wrong element, spelling typo, etc. – codestr Dec 12 '17 at 14:26
  • @codestr yes the issue is happening when I install a third party extension. If I uninstall, it do not give the exception. How do I resolve this ? – Slimshadddyyy Dec 13 '17 at 05:21