Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error after upgrade from 2.0.7 to 2.1.0 #5223

Closed
Krapulat opened this issue Jun 24, 2016 · 29 comments
Closed

Error after upgrade from 2.0.7 to 2.1.0 #5223

Krapulat opened this issue Jun 24, 2016 · 29 comments

Comments

@Krapulat
Copy link

After I upgrade magento from 2.0.7 to 2.1.0 via command line doing:

composer require magento/product-community-edition 2.1.0 --no-update
composer update

When I type "php bin/magento setup:upgrade" I get

[ReflectionException]
  Class Magento\Framework\App\Cache\Type\Webapi does not exist

Any ideas why is this happening?

@andimov
Copy link
Contributor

andimov commented Jun 24, 2016

@Krapulat
Manually clear the var/cache, var/page_cache, and var/generation directories.
A sample command follows:
rm -rf var/cache/* var/page_cache/* var/generation/*

Then run:
php bin/magento setup:upgrade

@Krapulat
Copy link
Author

@andimov Same problem after:

rm -rf var/cache/* var/page_cache/* var/generation/*

The output with -vvv is:

  [ReflectionException]
  Class Magento\Framework\App\Cache\Type\Webapi does not exist



Exception trace:
 () at /var/www/example.com/vendor/magento/framework/Code/Reader/ClassReader.php:19
 ReflectionClass->__construct() at /var/www/example.com/vendor/magento/framework/Code/Reader/ClassReader.php:19
 Magento\Framework\Code\Reader\ClassReader->getConstructor() at /var/www/example.com/vendor/magento/framework/ObjectManager/Definition/Runtime.php:44
 Magento\Framework\ObjectManager\Definition\Runtime->getParameters() at /var/www/example.com/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:71
 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create() at /var/www/example.com/vendor/magento/framework/ObjectManager/ObjectManager.php:71
 Magento\Framework\ObjectManager\ObjectManager->get() at /var/www/example.com/vendor/magento/framework/App/Cache/InstanceFactory.php:32
 Magento\Framework\App\Cache\InstanceFactory->get() at /var/www/example.com/vendor/magento/framework/App/Cache/TypeList.php:63
 Magento\Framework\App\Cache\TypeList->_getTypeInstance() at /var/www/example.com/vendor/magento/framework/App/Cache/TypeList.php:104
 Magento\Framework\App\Cache\TypeList->getTypes() at /var/www/example.com/vendor/magento/framework/App/Cache/Manager.php:131
 Magento\Framework\App\Cache\Manager->getAvailableTypes() at /var/www/example.com/setup/src/Magento/Setup/Model/Installer.php:1080
 Magento\Setup\Model\Installer->cleanCaches() at /var/www/example.com/setup/src/Magento/Setup/Model/Installer.php:1010
 Magento\Setup\Model\Installer->updateModulesSequence() at /var/www/example.com/setup/src/Magento/Setup/Console/Command/UpgradeCommand.php:88
 Magento\Setup\Console\Command\UpgradeCommand->execute() at /var/www/example.com/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
 Symfony\Component\Console\Command\Command->run() at /var/www/example.com/vendor/symfony/console/Symfony/Component/Console/Application.php:874
 Symfony\Component\Console\Application->doRunCommand() at /var/www/example.com/vendor/symfony/console/Symfony/Component/Console/Application.php:195
 Symfony\Component\Console\Application->doRun() at /var/www/example.com/vendor/magento/framework/Console/Cli.php:96
 Magento\Framework\Console\Cli->doRun() at /var/www/example.com/vendor/symfony/console/Symfony/Component/Console/Application.php:126
 Symfony\Component\Console\Application->run() at /var/www/example.com/bin/magento:23

@andimov
Copy link
Contributor

andimov commented Jun 24, 2016

@Krapulat
I can't reproduce it.
Please attach your composer.json and composer.lock
Also check permissions http://devdocs.magento.com/guides/v2.0/config-guide/prod/prod_file-sys-perms.html

@Krapulat
Copy link
Author

Krapulat commented Jun 24, 2016

@andimov The permissions are correct.
composer.lock.zip

I attach composer.lock and this is composer.json:

{
    "name": "magento/project-community-edition",
    "description": "eCommerce Platform for Growth (Community Edition)",
    "type": "project",
    "version": "2.0.2",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "repositories": [
        {
            "type": "composer",
            "url": "https://repo.magento.com/"
        }
    ],
    "require": {
        "magento/product-community-edition": "2.1.0",
        "composer/composer": "@alpha",
        "magefan/module-blog": "^2.0",
        "ebizmarts/magento2-magemonkey": "^3.0"
    },
    "require-dev": {
        "phpunit/phpunit": "4.1.0",
        "squizlabs/php_codesniffer": "1.5.3",
        "phpmd/phpmd": "@stable",
        "pdepend/pdepend": "2.2.2",
        "sjparkinson/static-review": "~4.1",
        "fabpot/php-cs-fixer": "~1.2",
        "lusitanian/oauth": "~0.3 <=0.7.0"
    },
    "config": {
        "use-include-path": true
    },
    "autoload": {
        "psr-4": {
            "Magento\\Framework\\": "lib/internal/Magento/Framework/",
            "Magento\\Setup\\": "setup/src/Magento/Setup/",
            "Magento\\": "app/code/Magento/"
        },
        "psr-0": {
            "": "app/code/"
        },
        "files": [
            "app/etc/NonComposerComponentRegistration.php"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/",
            "Magento\\Tools\\": "dev/tools/Magento/Tools/",
            "Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/",
            "Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/",
            "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/"
        }
    },
    "minimum-stability": "alpha",
    "prefer-stable": true,
    "extra": {
        "magento-force": "override"
    }
}

@Krapulat
Copy link
Author

@andimov In exception.log it appears:

[2016-06-24 16:57:11] main.CRITICAL: InvalidArgumentException: Plugin class Magento\Framework\App\Response\XFrameOptPlugin doesn't exist in /var/www/example.com/vendor/magento/framework/Interception/PluginList/PluginList.php:164
Stack trace:
#0 /var/www/example.com/vendor/magento/framework/Interception/PluginList/PluginList.php(250): Magento\Framework\Interception\PluginList\PluginList->_inheritPlugins('Magento\\Framewo...')
#1 /var/www/example.com/var/generation/Magento/Framework/App/Response/Http/Interceptor.php(217): Magento\Framework\Interception\PluginList\PluginList->getNext('Magento\\Framewo...', 'setHttpResponse...')
#2 /var/www/example.com/pub/errors/processor.php(206): Magento\Framework\App\Response\Http\Interceptor->setHttpResponseCode(503)
#3 /var/www/example.com/pub/errors/report.php(14): Magento\Framework\Error\Processor->processReport()
#4 /var/www/example.com/vendor/magento/framework/App/Http.php(324): require('/var/www/shoppi...')
#5 /var/www/example.com/vendor/magento/framework/App/Http.php(160): Magento\Framework\App\Http->handleGenericReport(Object(Magento\Framework\App\Bootstrap), Object(InvalidArgumentException))
#6 /var/www/example.com/vendor/magento/framework/App/Bootstrap.php(263): Magento\Framework\App\Http->catchException(Object(Magento\Framework\App\Bootstrap), Object(InvalidArgumentException))
#7 /var/www/example.com/pub/index.php(37): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#8 {main} [] []

@markalston
Copy link

markalston commented Jun 25, 2016

I am getting the exact same error with an identical exception trace. Here is my composer.json

{
    "name": "magento/project-community-edition",
    "description": "eCommerce Platform for Growth (Community Edition)",
    "type": "project",
    "version": "2.0.7",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "repositories": [
        {
            "type": "composer",
            "url": "https://repo.magento.com/"
        }
    ],
    "require": {
        "magento/product-community-edition": "2.1.0",
        "composer/composer": "@alpha"
    },
    "require-dev": {
        "phpunit/phpunit": "4.1.0",
        "squizlabs/php_codesniffer": "1.5.3",
        "phpmd/phpmd": "2.3.*",
        "pdepend/pdepend": "2.2.2",
        "sjparkinson/static-review": "~4.1",
        "fabpot/php-cs-fixer": "~1.2",
        "lusitanian/oauth": "~0.3 <=0.7.0"
    },
    "config": {
        "use-include-path": true
    },
    "autoload": {
        "psr-4": {
            "Magento\\Framework\\": "lib/internal/Magento/Framework/",
            "Magento\\Setup\\": "setup/src/Magento/Setup/",
            "Magento\\": "app/code/Magento/"
        },
        "psr-0": {
            "": "app/code/"
        },
        "files": [
            "app/etc/NonComposerComponentRegistration.php"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/",
            "Magento\\Tools\\": "dev/tools/Magento/Tools/",
            "Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/",
            "Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/",
            "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/"
        }
    },
    "minimum-stability": "alpha",
    "prefer-stable": true,
    "extra": {
        "magento-force": "override"
    }
}

@markalston
Copy link

I retried the upgrade without installing the sample data patch and it seems to have worked fine. There is also a possibility that I hadn't changed the document root to the base directory instead of pub before running the upgrade.

@developer-lindner
Copy link

I'm getting a different error:

[Magento\Framework\Exception\LocalizedException]
Area code is already set

setup:upgrade [--keep-generated] [--magento-init-params="..."]

composer.json:

{
    "name": "magento/project-community-edition",
    "description": "eCommerce Platform for Growth (Community Edition)",
    "type": "project",
    "version": "2.0.0",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "repositories": {
        "0": {
            "type": "composer",
            "url": "https://repo.magento.com/"
        }
    },
    "require": {
        "magento/product-community-edition": "^2.1.0",
        "splendidinternet/mage2-locale-de-de": "^1.3",
        "magestore/module-bannerslider": "^1.6"
    },
    "require-dev": {
        "phpunit/phpunit": "4.1.0",
        "squizlabs/php_codesniffer": "1.5.3",
        "phpmd/phpmd": "@stable",
        "pdepend/pdepend": "2.0.6",
        "sjparkinson/static-review": "~4.1",
        "fabpot/php-cs-fixer": "~1.2",
        "lusitanian/oauth": "~0.3 <=0.7.0",
        "behat/behat": "3.*",
        "phpspec/phpspec": "2.*",
        "symfony/process": "~2.1|~3.0",
        "bossa/phpspec2-expect": "*"
    },
    "config": {
        "use-include-path": true
    },
    "autoload": {
        "psr-4": {
            "Magento\\Framework\\": "lib/internal/Magento/Framework/",
            "Magento\\Setup\\": "setup/src/Magento/Setup/",
            "Magento\\": "app/code/Magento/"
        },
        "psr-0": {
            "": "app/code/"
        },
        "files": [
            "app/etc/NonComposerComponentRegistration.php",
            "src/Aqio/ProductSorter/registration.php",
            "src/Aqio/PMT/registration.php"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/",
            "Magento\\Tools\\": "dev/tools/Magento/Tools/",
            "Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/",
            "Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/",
            "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/"
        }
    },
    "minimum-stability": "alpha",
    "prefer-stable": true,
    "extra": {
        "magento-force": "override"
    }
}

@medinadato
Copy link

I'm getting the same error. Has anyone fixed it?
screen shot 2016-06-27 at 2 34 37 pm

@Krapulat
Copy link
Author

Editing composer.json and manually modify to

"magento/product-community-edition": "2.1.0",

and then 'composer update' it seems to work.

Is anything wrong to do this @andimov ?

@developer-lindner
Copy link

developer-lindner commented Jun 28, 2016

Any update here? Do i have to reinstall everything just because of an upgrade from 2.0.7 to 2.1.0?

@andimov
Copy link
Contributor

andimov commented Jun 29, 2016

@Krapulat
Thank you for response! This solution is correct.
Your issue resolved?
@developer-lindner
You don't need to reinstall. Also you already upgraded as I understand.
Most likely you have different problem.
@medinadato
Did you clear the var/* directories?
A sample command follows:
rm -rf var/cache/* var/page_cache/* var/generation/*

@developer-lindner
Copy link

developer-lindner commented Jun 29, 2016

@andimov
How can i fix it?

Frontend + Backend just shows:

Magento supports PHP 5.6, 7.0.2, and 7.0.6 or later. Please read Magento System Requirements.

I got it running under 2.0.7 already with PHP 7.0.6...

Command Line shows Exception as mentioned above.

@andimov
Copy link
Contributor

andimov commented Jun 29, 2016

@developer-lindner
Best way is to create a new issue with full description according to the template. It allow us process your issue with more attention.

@developer-lindner
Copy link

@andimov Just went for a fresh install which works now. Unfortunately there are several issues with this release, like #4638 or #5236. Thought Magento2 would be built with TDD?!

@maderlock
Copy link

No problems when updating composer - manually changed to 2.1.0 from 2.0.7. However, when I try to run setup:upgrade I get the same exception:

[ReflectionException]
Class Magento\Framework\App\Cache\Type\Webapi does not exist

I'm using php 7.0.7.

@maderlock
Copy link

Comparing my installation to a fresh install, there was an extra line in env.php. I added this and the issue went away:

compiled_config' => 1,

This gets added at the end of the following list:

'cache_types' =>
  array (
    'config' => 1,
    'layout' => 1,
    'block_html' => 1,
    'collections' => 1,
    'reflection' => 1,
    'db_ddl' => 1,
    'eav' => 1,
    'config_integration' => 1,
    'config_integration_api' => 1,
    'full_page' => 1,
    'translate' => 1,
    'config_webservice' => 1,
  ),

@andimov
Copy link
Contributor

andimov commented Jul 1, 2016

@maderlock
Thank you a lot for solution!

@jldmn
Copy link

jldmn commented Jul 2, 2016

For me, the
compiled_config' => 1,
has already been there and the error persists.

@andimov
Copy link
Contributor

andimov commented Jul 4, 2016

@jldmn
What error persists in your case?

@jldmn
Copy link

jldmn commented Jul 4, 2016

The "[Reflection Exception] Class Magento\Framework\App\Cache\Webapi does not exist" error

@andimov
Copy link
Contributor

andimov commented Jul 4, 2016

@jldmn
Did you clear the var/cache, var/page_cache, and var/generation directories?
A sample command follows:
rm -rf var/cache/* var/page_cache/* var/generation/*

Then run:
php bin/magento setup:upgrade

@jldmn
Copy link

jldmn commented Jul 4, 2016

Did the trick for me! Thanks a lot!

@jldmn
Copy link

jldmn commented Jul 4, 2016

Ok, but now i got
Magento supports PHP 5.6, 7.0.2, and 7.0.6 or later. Please read Magento System Requirements.
on both Store and Admin Page.

My Server runs Ubuntu 14.04 with php 5.6.23

@maderlock
Copy link

The check should pass for php 5.6 as the relevant part of the condition in bootstrap is: PHP_VERSION_ID >= 50600 && PHP_VERSION_ID < 50700. It also fails if PHP for some reason fails to report its version number.

I would first use phpinfo() to check that the version of PHP used to serve your pages is the one you think it is.

@ghost
Copy link

ghost commented Jul 4, 2016

@jldmn Do you have >1 version of PHP installed? What does php -v report?

@winechit1989
Copy link

winechit1989 commented Jul 6, 2016

I got that error!
[ReflectionException]
Class Magento\ConfigurableProduct\Model\Product\VariationMediaAttributes do
es not exist

@MidnightDesign
Copy link

Clearing the cache (in my case Redis, not var/cache/) helped.

@andimov
Copy link
Contributor

andimov commented Jul 28, 2016

@Krapulat
According to contributor guide, tickets without response for two weeks should be closed.
Please feel free to reopen if it's needed.
@anyone
Please create a separate ticket for other issues and provide detailed steps according to the template. This will help us to process issues. I'm closing this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants