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

Module installation fails with errors #281

Closed
kennethbruyninckx opened this issue Oct 17, 2024 · 2 comments · Fixed by #283
Closed

Module installation fails with errors #281

kennethbruyninckx opened this issue Oct 17, 2024 · 2 comments · Fixed by #283
Labels
bug Something isn't working pdk This is a pdk related issue released

Comments

@kennethbruyninckx
Copy link

MyParcelNL version

v4.0.0

PrestaShop version

8.1.7

PHP version

8.1.29

What went wrong?

Module installation fails with errors.

Reproduction steps

  1. Go to Module Manager
  2. Click on Upload a Module
  3. Drag and drop myparcelbe-prestashop-4.0.0.zip in the upload screen
  4. Error: "Oops... Upload failed."
  5. When you click on "What happened?" the attached error list is shown

Relevant log output

Installation of module myparcelbe failed. Failed to instantiate MyParcelBE: Cannot compile closures which import variables using the `use` keyword

Stack trace:
#0 /home/tillandsias/domains/tillandsias.be/public_html/modules/myparcelbe/vendor/php-di/php-di/src/Compiler/Compiler.php(285): _MyParcelBE\DI\Compiler\Compiler->compileClosure()
#1 /home/tillandsias/domains/tillandsias.be/public_html/modules/myparcelbe/vendor/php-di/php-di/src/Compiler/Compiler.php(251): _MyParcelBE\DI\Compiler\Compiler->compileValue()
#2 /home/tillandsias/domains/tillandsias.be/public_html/modules/myparcelbe/vendor/php-di/php-di/src/Compiler/Compiler.php(137): _MyParcelBE\DI\Compiler\Compiler->compileDefinition()
#3 /home/tillandsias/domains/tillandsias.be/public_html/modules/myparcelbe/vendor/php-di/php-di/src/ContainerBuilder.php(148): _MyParcelBE\DI\Compiler\Compiler->compile()
#4 /home/tillandsias/domains/tillandsias.be/public_html/modules/myparcelbe/vendor/myparcelnl/pdk/src/Base/Factory/PdkFactory.php(89): _MyParcelBE\DI\ContainerBuilder->build()
#5 /home/tillandsias/domains/tillandsias.be/public_html/modules/myparcelbe/vendor/myparcelnl/pdk/src/Base/Factory/PdkFactory.php(35): MyParcelNL\Pdk\Base\Factory\PdkFactory->setupContainer()
#6 /home/tillandsias/domains/tillandsias.be/public_html/modules/myparcelbe/vendor/myparcelnl/pdk/src/Base/PdkBootstrapper.php(57): MyParcelNL\Pdk\Base\Factory\PdkFactory::create()
#7 /home/tillandsias/domains/tillandsias.be/public_html/modules/myparcelbe/vendor/myparcelnl/pdk/src/Base/PdkBootstrapper.php(41): MyParcelNL\Pdk\Base\PdkBootstrapper->createPdkInstance()
#8 /home/tillandsias/domains/tillandsias.be/public_html/modules/myparcelbe/src/functions.php(30): MyParcelNL\Pdk\Base\PdkBootstrapper::boot()
#9 /home/tillandsias/domains/tillandsias.be/public_html/modules/myparcelbe/myparcelbe.php(149): MyParcelBE\PrestaShop\bootPdk()
#10 /home/tillandsias/domains/tillandsias.be/public_html/modules/myparcelbe/myparcelbe.php(162): MyParcelBE->setup()
#11 /home/tillandsias/domains/tillandsias.be/public_html/modules/myparcelbe/myparcelbe.php(66): MyParcelBE->withErrorHandling()
#12 [internal function]: MyParcelBE->__construct()
#13 /home/tillandsias/domains/tillandsias.be/public_html/src/Core/Foundation/IoC/Container.php(123): ReflectionClass->newInstance()
#14 /home/tillandsias/domains/tillandsias.be/public_html/src/Core/Foundation/IoC/Container.php(153): PrestaShop\PrestaShop\Core\Foundation\IoC\Container->makeInstanceFromClassName()
#15 /home/tillandsias/domains/tillandsias.be/public_html/src/Core/Foundation/IoC/Container.php(166): PrestaShop\PrestaShop\Core\Foundation\IoC\Container->doMake()
#16 /home/tillandsias/domains/tillandsias.be/public_html/src/Adapter/ServiceLocator.php(70): PrestaShop\PrestaShop\Core\Foundation\IoC\Container->make()
#17 /home/tillandsias/domains/tillandsias.be/public_html/classes/module/Module.php(1235): PrestaShop\PrestaShop\Adapter\ServiceLocator::get()
#18 /home/tillandsias/domains/tillandsias.be/public_html/classes/module/Module.php(1214): ModuleCore::coreLoadModule()
#19 /home/tillandsias/domains/tillandsias.be/public_html/src/Adapter/Module/Module.php(419): ModuleCore::getInstanceByName()
#20 /home/tillandsias/domains/tillandsias.be/public_html/src/Adapter/Module/Module.php(212): PrestaShop\PrestaShop\Adapter\Module\Module->instanciateLegacyModule()
#21 /home/tillandsias/domains/tillandsias.be/public_html/src/Adapter/Module/Module.php(258): PrestaShop\PrestaShop\Adapter\Module\Module->hasValidInstance()
#22 /home/tillandsias/domains/tillandsias.be/public_html/src/Core/Module/ModuleManager.php(109): PrestaShop\PrestaShop\Adapter\Module\Module->onInstall()
#23 /home/tillandsias/domains/tillandsias.be/public_html/src/PrestaShopBundle/Controller/Admin/Improve/ModuleController.php(384): PrestaShop\PrestaShop\Core\Module\ModuleManager->install()
#24 /home/tillandsias/domains/tillandsias.be/public_html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php(169): PrestaShopBundle\Controller\Admin\Improve\ModuleController->importModuleAction()
#25 /home/tillandsias/domains/tillandsias.be/public_html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#26 /home/tillandsias/domains/tillandsias.be/public_html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(201): Symfony\Component\HttpKernel\HttpKernel->handle()
#27 /home/tillandsias/domains/tillandsias.be/public_html/prestashopadmin/index.php(84): Symfony\Component\HttpKernel\Kernel->handle()
#28 {main}

Additional context

No response

@kennethbruyninckx kennethbruyninckx added bug Something isn't working pdk This is a pdk related issue labels Oct 17, 2024
@github-project-automation github-project-automation bot moved this to Todo in PDK Oct 17, 2024
@RichardPerdaan
Copy link
Member

Hi @kennethbruyninckx ,

Thank you very much for reporting the error. We appreciate your attentiveness and for taking the time to inform us. Our team is currently investigating the issue, and we are doing our best to resolve it as quickly as possible.

If you have any questions or additional information in the meantime, please don't hesitate to contact us. We will, of course, keep you updated on the progress.

Thank you again for your understanding and cooperation.

FreekVR added a commit that referenced this issue Oct 21, 2024
fixes an error on install with recent prestashop releases caused by the `psVersionFactory`

Fixes #281, Closes INT-695
github-merge-queue bot pushed a commit that referenced this issue Oct 23, 2024
)

fixes an error on install with recent prestashop releases caused by the `psVersionFactory`

Fixes #281, Closes INT-695
@github-project-automation github-project-automation bot moved this from Todo to Done in PDK Oct 23, 2024
myparcel-bot bot added a commit that referenced this issue Oct 30, 2024
## [4.1.0](v4.0.0...v4.1.0) (2024-10-30)

### 🐛 Bug Fixes

* fix error on install due to usage of `use` in factory closure ([#283](#283)) ([1b4fdca](1b4fdca)), closes [#281](#281)

### ⚡ Performance Improvements

* **admin:** only save product settings once per request ([#279](#279)) ([e60bce1](e60bce1))

### ✨ New Features

* **deps:** upgrade @myparcel-pdk/* ([0cd4941](0cd4941))
* **deps:** upgrade myparcelnl/pdk to v2.45.0 ([6ff668d](6ff668d))
@myparcel-bot
Copy link
Contributor

myparcel-bot bot commented Oct 30, 2024

🎉 This issue has been resolved in version 4.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pdk This is a pdk related issue released
Development

Successfully merging a pull request may close this issue.

2 participants