magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.58k stars 9.32k forks source link

Category and Search page not opening EngineResolver, Argument 2 passed to Magento\Search\Model\EngineResolver::__construct() must be of the type array, null given, called in #31312

Closed gbyte-dev closed 3 years ago

gbyte-dev commented 3 years ago

Upgraded from magento 2.3.5 to 2.4.1 version, installed ElasticSearch 7.10.1

Working on magento 2.4.1

  1. Reaching to the search page - https://freedom.southernsarms.com/search/?q=sarm
  2. Reaching to the category page - https://freedom.southernsarms.com/sarms.html

Steps to reproduce (*)

Following info of elastic search- { "name" : "freedom", "cluster_name" : "elasticsearch", "cluster_uuid" : "ZSJHr7FGQle3MBhGI0ntgA", "version" : { "number" : "7.10.1", "build_flavor" : "default", "build_type" : "deb", "build_hash" : "1c34507e66d7db1211f66f3513706fdf548736aa", "build_date" : "2020-12-05T01:00:33.671820Z", "build_snapshot" : false, "lucene_version" : "8.7.0", "minimum_wire_compatibility_version" : "6.8.0", "minimum_index_compatibility_version" : "6.0.0-beta1" }, "tagline" : "You Know, for Search" }

Expected result (*)

1.It should open the magento category and search page returning error

Actual result (*)

1 exception(s): Exception #0 (Magento\Framework\Exception\RuntimeException): Type Error occurred when creating object: Magento\Search\Model\EngineResolver, Argument 2 passed to Magento\Search\Model\EngineResolver::__construct() must be of the type array, null given, called in /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 121

Exception #0 (Magento\Framework\Exception\RuntimeException): Type Error occurred when creating object: Magento\Search\Model\EngineResolver, Argument 2 passed to Magento\Search\Model\EngineResolver::__construct() must be of the type array, null given, called in /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 121

#1 Magento\Framework\ObjectManager\Factory\Compiled->create() called at [vendor/magento/framework/ObjectManager/Factory/Compiled.php:150]
#2 Magento\Framework\ObjectManager\Factory\Compiled->get() called at [vendor/magento/framework/ObjectManager/Factory/Compiled.php:79]
#3 Magento\Framework\ObjectManager\Factory\Compiled->create() called at [vendor/magento/framework/ObjectManager/Factory/Compiled.php:150]
#4 Magento\Framework\ObjectManager\Factory\Compiled->get() called at [vendor/magento/framework/ObjectManager/Factory/Compiled.php:79]
#5 Magento\Framework\ObjectManager\Factory\Compiled->create() called at [vendor/magento/framework/ObjectManager/Factory/Compiled.php:150]
#6 Magento\Framework\ObjectManager\Factory\Compiled->get() called at [vendor/magento/framework/ObjectManager/Factory/Compiled.php:79]
#7 Magento\Framework\ObjectManager\Factory\Compiled->create() called at [vendor/magento/framework/ObjectManager/ObjectManager.php:70]
#8 Magento\Framework\ObjectManager\ObjectManager->get() called at [vendor/magento/module-catalog-search/Model/ResourceModel/Fulltext/Collection.php:207]
#9 Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection->__construct() called at [generated/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext/Collection/Interceptor.php:14]
#10 Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection\Interceptor->__construct() called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:121]
#11 Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject() called at [vendor/magento/framework/ObjectManager/Factory/Compiled.php:108]
#12 Magento\Framework\ObjectManager\Factory\Compiled->create() called at [vendor/magento/framework/ObjectManager/ObjectManager.php:56]
#13 Magento\Framework\ObjectManager\ObjectManager->create() called at [generated/code/Magento/Catalog/Model/ResourceModel/Product/CollectionFactory.php:43]
#14 Magento\Catalog\Model\ResourceModel\Product\CollectionFactory->create() called at [vendor/magento/module-catalog-search/Model/Layer/Category/ItemCollectionProvider.php:36]
#15 Magento\CatalogSearch\Model\Layer\Category\ItemCollectionProvider->getCollection() called at [vendor/magento/module-catalog/Model/Layer.php:146]
#16 Magento\Catalog\Model\Layer->getProductCollection() called at [vendor/magento/module-catalog/Block/Product/ListProduct.php:481]
#17 Magento\Catalog\Block\Product\ListProduct->initializeProductCollection() called at [vendor/magento/module-catalog/Block/Product/ListProduct.php:121]
#18 Magento\Catalog\Block\Product\ListProduct->_getProductCollection() called at [vendor/magento/module-catalog/Block/Product/ListProduct.php:200]
#19 Magento\Catalog\Block\Product\ListProduct->_beforeToHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1110]
#20 Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{closure}() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1115]
#21 Magento\Framework\View\Element\AbstractBlock->_loadCache() called at [vendor/magento/framework/View/Element/AbstractBlock.php:675]
#22 Magento\Framework\View\Element\AbstractBlock->toHtml() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#23 Magento\Catalog\Block\Product\ListProduct\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#24 Magento\Catalog\Block\Product\ListProduct\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#25 Magento\Catalog\Block\Product\ListProduct\Interceptor->___callPlugins() called at [generated/code/Magento/Catalog/Block/Product/ListProduct/Interceptor.php:50]
#26 Magento\Catalog\Block\Product\ListProduct\Interceptor->toHtml() called at [vendor/magento/framework/View/Layout.php:566]
#27 Magento\Framework\View\Layout->_renderBlock() called at [vendor/magento/framework/View/Layout.php:542]
#28 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#29 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:497]
#30 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#31 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Element/AbstractBlock.php:522]
#32 Magento\Framework\View\Element\AbstractBlock->getChildHtml() called at [vendor/magento/module-catalog/Block/Category/View.php:100]
#33 Magento\Catalog\Block\Category\View->getProductListHtml() called at [vendor/magento/module-catalog/view/frontend/templates/category/products.phtml:15]
#34 include('/var/www/html/ve...') called at [vendor/magento/framework/View/TemplateEngine/Php.php:71]
#35 Magento\Framework\View\TemplateEngine\Php->render() called at [vendor/magento/framework/View/Element/Template.php:273]
#36 Magento\Framework\View\Element\Template->fetchView() called at [vendor/magento/framework/View/Element/Template.php:303]
#37 Magento\Framework\View\Element\Template->_toHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1111]
#38 Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{closure}() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1115]
#39 Magento\Framework\View\Element\AbstractBlock->_loadCache() called at [vendor/magento/framework/View/Element/AbstractBlock.php:675]
#40 Magento\Framework\View\Element\AbstractBlock->toHtml() called at [vendor/magento/framework/View/Layout.php:566]
#41 Magento\Framework\View\Layout->_renderBlock() called at [vendor/magento/framework/View/Layout.php:542]
#42 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#43 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:497]
#44 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#45 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:594]
#46 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:544]
#47 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#48 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:497]
#49 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#50 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:594]
#51 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:544]
#52 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#53 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:497]
#54 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#55 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:594]
#56 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:544]
#57 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#58 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:497]
#59 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#60 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:594]
#61 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:544]
#62 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#63 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:497]
#64 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#65 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:594]
#66 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:544]
#67 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#68 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:497]
#69 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#70 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:594]
#71 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:544]
#72 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#73 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:497]
#74 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#75 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:963]
#76 Magento\Framework\View\Layout->getOutput() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#77 Magento\Framework\View\Layout\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#78 Magento\Framework\View\Layout\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#79 Magento\Framework\View\Layout\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:347]
#80 Magento\Framework\View\Layout\Interceptor->getOutput() called at [vendor/magento/framework/View/Result/Page.php:258]
#81 Magento\Framework\View\Result\Page->render() called at [vendor/magento/framework/View/Result/Layout.php:171]
#82 Magento\Framework\View\Result\Layout->renderResult() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#83 Magento\Framework\View\Result\Page\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#84 Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#85 Magento\Framework\View\Result\Page\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/View/Result/Page/Interceptor.php:23]
#86 Magento\Framework\View\Result\Page\Interceptor->renderResult() called at [vendor/magento/framework/App/Http.php:120]
#87 Magento\Framework\App\Http->launch() called at [vendor/magento/framework/App/Bootstrap.php:263]
#88 Magento\Framework\App\Bootstrap->run() called at [pub/index.php:40]

Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

m2-assistant[bot] commented 3 years ago

Hi @gbyte-dev. Thank you for your report. To help us process this issue please make sure that you provided the following information:

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


:clock10: You can find the schedule on the Magento Community Calendar page.

:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

m2-assistant[bot] commented 3 years ago

Hi @engcom-Delta. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-Delta commented 3 years ago

Hi @gbyte-dev thank you for your report, I'm not able to reproduce issue by steps you described after upgrade on clean 2.4.1 Manual testing scenario:

Result: :heavy_check_mark: Category page is opened without errors image :heavy_check_mark: Search page is opened without errors Screenshot from 2021-01-14 14-56-10

Also was checked this scenario after upgrade from 2.3.6 to 2.4.1

Are my steps correct or something was missed?

engcom-Delta commented 3 years ago

@gbyte-dev we are closing this issue due to inactivity. If you'd like to update it, please reopen the issue.

WoutervanderLoopNL commented 3 years ago

I've the same issue upgrading from 2.3.4 to 2.4.2. on the category page, and even on a reindex.

udhaiixly commented 3 years ago

Hi,

I have same problem, upgrade magento2.3 to 2.4 version. Please let me know how to fix this issue.

MagentoDevelopersUdaipur commented 3 years ago

Hi,

I am facing the same issue from past 5 days and I have Magento 2.4.1 and migrated data from Magento 1.9 to Magento 2.4.1 but the category and search pages are not opening.

Getting below issue:

Type Error occurred when creating object: Magento\Search\Model\EngineResolver, Argument 2 passed to Magento\Search\Model\EngineResolver::__construct() must be of the type array, null given, called in /Applications/MAMP/htdocs/uj-backend/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 121

I have Mac system and installed Elasticsearch on my local also run below command to start Elasticsearch

bin/php -dmemory_limit=5G setup:install --elasticsearch-host localhost --elasticsearch-port 9200 --elasticsearch-enable-auth 1 --elasticsearch-username "pj" --elasticsearch-password "pj@123" --elasticsearch-index-prefix "pj.magento2"

Still I am not able to configure Elastic search because while going to Configuration > Catalog > Catalog giving same error. Type Error occurred when creating object: Magento\Search\Model\EngineResolver, Argument 2 passed to Magento\Search\Model\EngineResolver::__construct() must be of the type array, null given, called in /Applications/MAMP/htdocs/uj-backend/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 121

Any one please help me out here.

luigidi-it commented 3 years ago

Same issue.

No ElasticSearch. Upgrade from 2.3.1 to 2.4.2.

main.CRITICAL: Type Error occurred when creating object: Magento\Search\Model\EngineResolver, Argument 2 passed to Magento\Search\Model\EngineResolver::__construct() must be of the type array, null given, called in /home/xxxx/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 121

supgeek-rod commented 3 months ago

+1