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

Can't install sample data #1216

Closed
minhluan259 opened this issue Apr 27, 2015 · 36 comments
Closed

Can't install sample data #1216

minhluan259 opened this issue Apr 27, 2015 · 36 comments
Labels
bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: needs update

Comments

@minhluan259
Copy link

Windows 8.1 / Xampp V3.2.1

By Setup Wizard:

98% (about 1h)
http://www.awesomescreenshot.com/image/144185/a1c96922f99038abcdaaaff0d562b2af

By command:

Luan@MINHLUAN /d/App/htdocs/magentodev/dev/tools/Magento/Tools/SampleData (maste
r)
$ php -f install.php -- --admin_user=admin

Fatal error: Cannot instantiate interface Symfony\Component\Console\Output\OutputInterface in D:\App\htdocs\magentodev\lib\internal\Magento\Framework\ObjectManager\Factory\Dynamic\Developer.php on line 75

Call Stack:
0.0003 129504 1. {main}() D:\App\htdocs\magentodev\dev\tools\Magento\Tools\SampleData\install.php:0
8.2838 11881648 2. Magento\Framework\App\Bootstrap->run() D:\App\htdocs\magentodev\dev\tools\Magento\Tools\SampleData\install.php:30
8.3015 11903296 3. Magento\Tools\SampleData\InstallerApp->launch() D:\App\htdocs\magentodev\lib\internal\Magento\Framework\App\Bootstrap.php:245
8.4709 11907960 4. Magento\Framework\ObjectManager\ObjectManager->get()
D:\App\htdocs\magentodev\dev\tools\Magento\Tools\SampleData\InstallerApp.php:94
8.4710 11908040 5.Magento\Framework\ObjectManager\Factory\Dynamic\Developer>create() D:\App\htdocs\magentodev\lib\internal\Magento\Framework\ObjectManager\ObjectManager.php:71
8.5846 11929816 6.Magento\Framework\ObjectManager\Factory\Dynamic\Developer>_resolveArguments() D:\App\htdocs\magentodev\lib\internal\Magento\Framework\ObjectManager\Factory\Dynamic\Developer.php:84
8.5848 11930600 7.Magento\Framework\ObjectManager\Factory\AbstractFactory>resolveArgument() D:\App\htdocs\magentodev\lib\internal\Magento\Framework\ObjectManager\Factory\Dynamic\Developer.php:53
8.5848 11930632 8. Magento\Framework\ObjectManager\ObjectManager->get()
D:\App\htdocs\magentodev\lib\internal\Magento\Framework\ObjectManager\Factory\AbstractFactory.php:236
8.5848 11930728 9.Magento\Framework\ObjectManager\Factory\Dynamic\Developer>create() D:\App\htdocs\magentodev\lib\internal\Magento\Framework\ObjectManager\ObjectManager.php:71

@robjmills
Copy link

+1

1 similar comment
@Pakkapao
Copy link

+1

@kokoc
Copy link
Member

kokoc commented Apr 27, 2015

Thank you for reporting the issue. We will fix the problem and get back to you once we have the working code.
Internal reference: MAGETWO-36702

@kokoc kokoc added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Apr 27, 2015
@iamaravi
Copy link

+1 Same issue on Mac too.

@therouv
Copy link
Contributor

therouv commented Apr 30, 2015

Error still exists with latest sample data (Tag 0.74.0-beta7).

@Pakkapao
Copy link

Pakkapao commented May 1, 2015

+1 for 0.74.0-beta7

1 similar comment
@asrob
Copy link

asrob commented May 2, 2015

+1 for 0.74.0-beta7

@asrob
Copy link

asrob commented May 2, 2015

I got these errors when install it with sample data via web:

Installing product links:
.......................................................................................................................................................................................................................................................................................................................................................................
Installing orders:
[ERROR] exception 'Magento\Framework\Exception\NoSuchEntityException' with message 'No such entity with cartId = 1' in /var/www/html/lib/internal/Magento/Framework/Exception/NoSuchEntityException.php:38
Stack trace:
#0 /var/www/html/app/code/Magento/Quote/Model/QuoteRepository.php(194): Magento\Framework\Exception\NoSuchEntityException::singleField('cartId', '1')
#1 /var/www/html/app/code/Magento/Quote/Model/QuoteRepository.php(88): Magento\Quote\Model\QuoteRepository->loadQuote('load', 'cartId', '1', Array)
#2 /var/www/html/var/generation/Magento/Quote/Model/QuoteRepository/Interceptor.php(135): Magento\Quote\Model\QuoteRepository->get('1', Array)
#3 /var/www/html/app/code/Magento/Backend/Model/Session/Quote.php(146): Magento\Quote\Model\QuoteRepository\Interceptor->get('1', Array)
#4 /var/www/html/app/code/Magento/Sales/Model/AdminOrder/Create.php(429): Magento\Backend\Model\Session\Quote->getQuote()
#5 /var/www/html/app/code/Magento/Sales/Model/AdminOrder/Create.php(1545): Magento\Sales\Model\AdminOrder\Create->getQuote()
#6 /var/www/html/app/code/Magento/Sales/Model/AdminOrder/Create.php(1597): Magento\Sales\Model\AdminOrder\Create->setAccountData(Array)
#7 /var/www/html/dev/tools/Magento/Tools/SampleData/Module/Sales/Setup/Order/Processor.php(163): Magento\Sales\Model\AdminOrder\Create->importPostData(Array)
#8 /var/www/html/dev/tools/Magento/Tools/SampleData/Module/Sales/Setup/Order/Processor.php(123): Magento\Tools\SampleData\Module\Sales\Setup\Order\Processor->processQuote(Array)
#9 /var/www/html/dev/tools/Magento/Tools/SampleData/Module/Sales/Setup/Order.php(77): Magento\Tools\SampleData\Module\Sales\Setup\Order\Processor->createOrder(Array)
#10 /var/www/html/dev/tools/Magento/Tools/SampleData/Helper/PostInstaller.php(86): Magento\Tools\SampleData\Module\Sales\Setup\Order->run()
#11 /var/www/html/dev/tools/Magento/Tools/SampleData/Installer.php(89): Magento\Tools\SampleData\Helper\PostInstaller->run()
#12 /var/www/html/setup/src/Magento/Setup/Model/SampleData.php(76): Magento\Tools\SampleData\Installer->run(Object(Magento\User\Model\User))
#13 /var/www/html/setup/src/Magento/Setup/Model/Installer.php(1120): Magento\Setup\Model\SampleData->install(Object(Magento\Framework\ObjectManager\ObjectManager), Object(Magento\Setup\Model\WebLogger), 'asrob')
#14 [internal function]: Magento\Setup\Model\Installer->installSampleData(Array)
#15 /var/www/html/setup/src/Magento/Setup/Model/Installer.php(288): call_user_func_array(Array, Array)
#16 /var/www/html/setup/src/Magento/Setup/Controller/Install.php(87): Magento\Setup\Model\Installer->install(Array)
#17 /var/www/html/vendor/zendframework/zend-mvc/Zend/Mvc/Controller/AbstractActionController.php(83): Magento\Setup\Controller\Install->startAction()
#18 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#19 /var/www/html/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#20 /var/www/html/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php(207): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#21 /var/www/html/vendor/zendframework/zend-mvc/Zend/Mvc/Controller/AbstractController.php(117): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#22 /var/www/html/vendor/zendframework/zend-mvc/Zend/Mvc/DispatchListener.php(114): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
#23 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#24 /var/www/html/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#25 /var/www/html/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php(207): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#26 /var/www/html/vendor/zendframework/zend-mvc/Zend/Mvc/Application.php(313): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#27 /var/www/html/setup/index.php(26): Zend\Mvc\Application->run()
#28 {main}

@cmuench
Copy link
Contributor

cmuench commented May 3, 2015

The problem still exists. Tested with latest n98-magerun2 developer version.

@benmarks
Copy link
Contributor

benmarks commented May 3, 2015

+1

4 similar comments
@martindines
Copy link

+1

@kieranja
Copy link

kieranja commented May 5, 2015

+1

@navarr
Copy link
Member

navarr commented May 5, 2015

+1

@Styopchik
Copy link

+1

@vpelipenko
Copy link
Contributor

Guys, we are working on the fix, Internal ticket is in progress now.

@kokoc
Copy link
Member

kokoc commented May 6, 2015

@asrob Seems like you're trying to install sample data on top of already installed data. Could you try to clean up the database and try again?

@hirenvasani
Copy link

+1

@asrob
Copy link

asrob commented May 8, 2015

@kokoc Sure, I'll try again soon.

@asrob
Copy link

asrob commented May 9, 2015

@kokoc I tried it again but I got an error:

Installing admin user...

Enabling caches:
Current status:
Array
(
[config] => 1
[layout] => 1
[block_html] => 1
[view_files_fallback] => 1
[view_files_preprocessing] => 1
[collections] => 1
[db_ddl] => 1
[eav] => 1
[full_page] => 1
[translate] => 1
[config_integration] => 1
[config_integration_api] => 1
[config_webservice] => 1
)


Installing sample data:
[ERROR] exception 'Magento\Framework\Exception\LocalizedException' with message 'Area code is already set' in /var/www/magento2.asrob.eu/public_html/lib/internal/Magento/Framework/App/State.php:137
Stack trace:
#0 /var/www/magento2.asrob.eu/public_html/setup/src/Magento/Setup/Model/SampleData.php(66): Magento\Framework\App\State->setAreaCode('adminhtml')
#1 /var/www/magento2.asrob.eu/public_html/setup/src/Magento/Setup/Model/Installer.php(1123): Magento\Setup\Model\SampleData->install(Object(Magento\Framework\ObjectManager\ObjectManager), Object(Magento\Setup\Model\WebLogger), 'admin')
#2 [internal function]: Magento\Setup\Model\Installer->installSampleData(Array)
#3 /var/www/magento2.asrob.eu/public_html/setup/src/Magento/Setup/Model/Installer.php(288): call_user_func_array(Array, Array)
#4 /var/www/magento2.asrob.eu/public_html/setup/src/Magento/Setup/Controller/Install.php(87): Magento\Setup\Model\Installer->install(Array)
#5 /var/www/magento2.asrob.eu/public_html/vendor/zendframework/zend-mvc/Zend/Mvc/Controller/AbstractActionController.php(83): Magento\Setup\Controller\Install->startAction()
#6 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#7 /var/www/magento2.asrob.eu/public_html/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#8 /var/www/magento2.asrob.eu/public_html/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php(207): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#9 /var/www/magento2.asrob.eu/public_html/vendor/zendframework/zend-mvc/Zend/Mvc/Controller/AbstractController.php(117): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#10 /var/www/magento2.asrob.eu/public_html/vendor/zendframework/zend-mvc/Zend/Mvc/DispatchListener.php(114): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
#11 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#12 /var/www/magento2.asrob.eu/public_html/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#13 /var/www/magento2.asrob.eu/public_html/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php(207): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#14 /var/www/magento2.asrob.eu/public_html/vendor/zendframework/zend-mvc/Zend/Mvc/Application.php(313): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#15 /var/www/magento2.asrob.eu/public_html/setup/index.php(26): Zend\Mvc\Application->run()
#16 {main}

Fresh database, magento2 beta-8 with sample data 0.74.0-beta7.

I tried it without sample data but after install I got 404 error. But this is another issue. (#1250)

@OnTapKristjan
Copy link
Contributor

Guys, in case your 'dev/tools/Magento/Tools/SampleData/install.php' fails
you can try the following workaround.

Run php bin/magento setup:install --use_sample_data --admin_user=xxx --admin_password=xxx --admin_email=xxx --admin_firstname=xxx --admin_lastname=xxx
To install sample data on TOP of your current data.

Or you can run php bin/magento setup:install --cleanup_database --use_sample_data --admin_user=xxx --admin_password=xxx --admin_email=xxx --admin_firstname=xxx --admin_lastname=xxx
To cleanup your DB and install the sample-data into a clean DB

*replace the xxx with your existing admin credentials

magento-team pushed a commit that referenced this issue May 15, 2015
MAGETWO-36702  [GITHUB] Can't install sample data #1216
@therouv
Copy link
Contributor

therouv commented May 16, 2015

I can confirm that the sample data installation now works again! Thank you :-)

@kokoc
Copy link
Member

kokoc commented May 25, 2015

The fix is now available in 0.74.0-beta9. Thank you very much for your contribution and continued support to Magento 2!

@minhluan259 Could you please verify the issue?

@kokoc kokoc removed the in progress label May 25, 2015
@minhluan259
Copy link
Author

By Setup Wizard:

capture

After setup:

capture2

I enter command: php -f dev/tools/Magento/Tools/View/deploy.php
Could not open input file: dev/tools/Magento/Tools/View/deploy.php

capture3

@buskamuza
Copy link
Contributor

Hi @minhluan259,

  1. Regarding sample data. Due to structure changes in the Sample Data packages, temporary it's not installed during Magento installation. It should be fixed soon apublishingcation of a new sample data module. Meanwhile sample data can be installed via a separate tool dev/tools/Magento/Tools/SampleData/installphp
  2. Regardind deploy.php tool. It has been converted to a command 'setup:static-content:deploy' of 'bin/magento' tool.

@buskamuza
Copy link
Contributor

Sample Data packages are fixed now. Please, try to reinstall. magento/sample-data meta-package of version 0.74.0-beta10 should be used.

@minhluan259
Copy link
Author

@buskamuza . It still error:
capture
capture3

@kokoc
Copy link
Member

kokoc commented May 27, 2015

Similar issue #1295

@voleye
Copy link

voleye commented May 27, 2015

@minhluan259, do you have xdebug enabled?

@kokoc
Copy link
Member

kokoc commented May 27, 2015

@minhluan259 we identified a source of timeouts. Appropriate item is placed in backlog: MAGETWO-37970. Details in #1295

@buskamuza
Copy link
Contributor

@minhluan259, thanks for the details. Could you, please, help us to clarify installation of Sample Data?

  1. Have you installed the latest version of Sample Data (0.74.0-beta10)?
  2. Do you have Sample Data module (app/code/Magento/SampleData)?
  3. Do you have sampledata:install command available in ./bin/magento list tool?

Thanks for the hellp

@minhluan259
Copy link
Author

@buskamuza

  1. Yes, I has installed the last version of Sample Data.
    composer require magento/sample-data:~0.74.0-beta9
  2. Yes, I has Sample Data module.
  3. Yes, I has sampledata:install command.

@minhluan259
Copy link
Author

@voleye, I has xdebug enabled.
[XDebug]
zend_extension = "D:\App\php\ext\php_xdebug.dll"
xdebug.max_nesting_level=50000
xdebug.profiler_enable = 0
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "D:\App\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1

@buskamuza
Copy link
Contributor

@minhluan259 , thanks so much!
Could you, please, try ./bin/magento sampledata:install command instead of the tool from dev/tools/...SampleData? The Sample Data had to be deleted by Composer, but looks like it didn't (as I can see from your screenshot). We'll check it.
The tool may be outdated comparing to the new command.

@minhluan259
Copy link
Author

@kokoc , @buskamuza. After remove set_time_limit(3600) on line 78 Magento\SampleData\Model\Installer and install (about 2h, so slowly) by Setup Wizard have success.
But another issue:
capture
setup:static-content:deploy (about 1h)
capture2
capture4

@buskamuza
Copy link
Contributor

@minhluan259 , enabled XDebug may cause significant performance degradation, that's why you may have so long installation. Let us know, if you try it with xDebug disabled and it's still so slow.

And I created an internal ticket for these warnings in the deployment command - MAGETWO-38010
Looks like it's a Windows only issue.

@vpelipenko
Copy link
Contributor

@minhluan259, internal ticket was fixed and closed. Could you verify the fix on the latest source code in develop branch?

magento-team pushed a commit that referenced this issue Jan 16, 2018
 - Merge Pull Request magento-engcom/magento2ce#1216 from serhii-balko/magento2:github-8453
 - Merged commits:
   1. 21566e8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: needs update
Projects
None yet
Development

No branches or pull requests