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.5k stars 9.3k forks source link

Call to a member function getValue() on null in vendor/magento/module-bundle/Model/Product/Type.php:1098 #38779

Closed shakeblue closed 3 months ago

shakeblue commented 4 months ago

Preconditions and environment

Hi, we have a Fatal exception when accessing the cart page with V1/carts/mine/estimate-shipping-methods. Magento version: : 2.4.3

Detailed error:

Call to a member function getValue() on null in /app/vw75fn4ansfpu/vendor/magento/module-bundle/Model/Product/Type.php:1098

Stack trace:

0 /app/vw75fn4ansfpu/vendor/magento/module-quote/Model/Quote/Item/AbstractItem.php(342): Magento\Bundle\Model\Product\Type->checkProductBuyState()

1 /app/vw75fn4ansfpu/vendor/magento/module-quote/Model/ResourceModel/Quote/Item/Collection.php(295): Magento\Quote\Model\Quote\Item\AbstractItem->checkData()

2 /app/vw75fn4ansfpu/vendor/magento/module-quote/Model/ResourceModel/Quote/Item/Collection.php(214): Magento\Quote\Model\ResourceModel\Quote\Item\Collection->_assignProducts()

3 /app/vw75fn4ansfpu/vendor/magento/framework/Data/Collection/AbstractDb.php(594): Magento\Quote\Model\ResourceModel\Quote\Item\Collection->_afterLoad()

4 /app/vw75fn4ansfpu/generated/code/Magento/Quote/Model/ResourceModel/Quote/Item/Collection/Interceptor.php(32): Magento\Framework\Data\Collection\AbstractDb->loadWithFilter()

5 /app/vw75fn4ansfpu/vendor/magento/framework/Data/Collection/AbstractDb.php(565): Magento\Quote\Model\ResourceModel\Quote\Item\Collection\Interceptor->loadWithFilter()

6 /app/vw75fn4ansfpu/vendor/magento/framework/Data/Collection.php(840): Magento\Framework\Data\Collection\AbstractDb->load()

7 /app/vw75fn4ansfpu/vendor/magento/module-quote/Model/Quote.php(1447): Magento\Framework\Data\Collection->getIterator()

8 /app/vw75fn4ansfpu/vendor/magento/module-quote/Model/QuoteRepository/LoadHandler.php(46): Magento\Quote\Model\Quote->getAllVisibleItems()

9 /app/vw75fn4ansfpu/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Quote\Model\QuoteRepository\LoadHandler->load()

10 /app/vw75fn4ansfpu/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Quote\Model\QuoteRepository\LoadHandler\Interceptor->___callParent()

11 /app/vw75fn4ansfpu/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Quote\Model\QuoteRepository\LoadHandler\Interceptor->Magento\Framework\Interception{closure}()

12 /app/vw75fn4ansfpu/generated/code/Magento/Quote/Model/QuoteRepository/LoadHandler/Interceptor.php(23): Magento\Quote\Model\QuoteRepository\LoadHandler\Interceptor->___callPlugins()

13 /app/vw75fn4ansfpu/vendor/magento/module-quote/Model/QuoteRepository.php(155): Magento\Quote\Model\QuoteRepository\LoadHandler\Interceptor->load()

14 /app/vw75fn4ansfpu/vendor/magento/module-quote/Model/QuoteRepository.php(180): Magento\Quote\Model\QuoteRepository->getForCustomer()

15 /app/vw75fn4ansfpu/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Quote\Model\QuoteRepository->getActiveForCustomer()

16 /app/vw75fn4ansfpu/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Quote\Model\QuoteRepository\Interceptor->___callParent()

17 /app/vw75fn4ansfpu/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Quote\Model\QuoteRepository\Interceptor->Magento\Framework\Interception{closure}()

18 /app/vw75fn4ansfpu/generated/code/Magento/Quote/Model/QuoteRepository/Interceptor.php(41): Magento\Quote\Model\QuoteRepository\Interceptor->___callPlugins()

19 /app/vw75fn4ansfpu/vendor/magento/module-quote/Model/QuoteManagement.php(464): Magento\Quote\Model\QuoteRepository\Interceptor->getActiveForCustomer()

20 /app/vw75fn4ansfpu/vendor/magento/module-quote/Model/Webapi/ParamOverriderCartId.php(53): Magento\Quote\Model\QuoteManagement->getCartForCustomer()

21 /app/vw75fn4ansfpu/generated/code/Magento/Quote/Model/Webapi/ParamOverriderCartId/Proxy.php(95): Magento\Quote\Model\Webapi\ParamOverriderCartId->getOverriddenValue()

22 /app/vw75fn4ansfpu/vendor/magento/module-webapi/Controller/Rest/ParamsOverrider.php(64): Magento\Quote\Model\Webapi\ParamOverriderCartId\Proxy->getOverriddenValue()

23 /app/vw75fn4ansfpu/vendor/magento/module-webapi/Controller/Rest/InputParamsResolver.php(146): Magento\Webapi\Controller\Rest\ParamsOverrider->override()

24 /app/vw75fn4ansfpu/vendor/magento/module-webapi/Controller/Rest/InputParamsResolver.php(115): Magento\Webapi\Controller\Rest\InputParamsResolver->getInputData()

25 /app/vw75fn4ansfpu/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Webapi\Controller\Rest\InputParamsResolver->resolve()

26 /app/vw75fn4ansfpu/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Webapi\Controller\Rest\InputParamsResolver\Interceptor->___callParent()

27 /app/vw75fn4ansfpu/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Webapi\Controller\Rest\InputParamsResolver\Interceptor->Magento\Framework\Interception{closure}()

28 /app/vw75fn4ansfpu/generated/code/Magento/Webapi/Controller/Rest/InputParamsResolver/Interceptor.php(23): Magento\Webapi\Controller\Rest\InputParamsResolver\Interceptor->___callPlugins()

29 /app/vw75fn4ansfpu/vendor/magento/module-webapi/Controller/Rest/SynchronousRequestProcessor.php(85): Magento\Webapi\Controller\Rest\InputParamsResolver\Interceptor->resolve()

30 /app/vw75fn4ansfpu/vendor/magento/module-webapi/Controller/Rest.php(188): Magento\Webapi\Controller\Rest\SynchronousRequestProcessor->process()

31 /app/vw75fn4ansfpu/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Webapi\Controller\Rest->dispatch()

32 /app/vw75fn4ansfpu/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Webapi\Controller\Rest\Interceptor->___callParent()

33 /app/vw75fn4ansfpu/vendor/fastly/magento2/Model/FrontControllerPlugin.php(148): Magento\Webapi\Controller\Rest\Interceptor->Magento\Framework\Interception{closure}()

34 /app/vw75fn4ansfpu/vendor/magento/framework/Interception/Interceptor.php(135): Fastly\Cdn\Model\FrontControllerPlugin->aroundDispatch()

35 /app/vw75fn4ansfpu/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Webapi\Controller\Rest\Interceptor->Magento\Framework\Interception{closure}()

36 /app/vw75fn4ansfpu/generated/code/Magento/Webapi/Controller/Rest/Interceptor.php(23): Magento\Webapi\Controller\Rest\Interceptor->___callPlugins()

37 /app/vw75fn4ansfpu/vendor/magento/framework/App/Http.php(116): Magento\Webapi\Controller\Rest\Interceptor->dispatch()

38 /app/vw75fn4ansfpu/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http->launch()

39 /app/vw75fn4ansfpu/pub/index.php(30): Magento\Framework\App\Bootstrap->run()

40 {main}

Steps to reproduce

Access the cart page with bundle items.

Expected result

Catch the error with a corresponding error message

Actual result

The exception isn't caught

Additional information

No response

Release note

No response

Triage and priority

m2-assistant[bot] commented 4 months ago

Hi @shakeblue. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

m2-assistant[bot] commented 4 months ago

Hi @engcom-Bravo. 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-Bravo commented 4 months ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 4 months ago

Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 4 months ago

Hi @engcom-Bravo, here is your Magento Instance: https://95b7177f568d07c5f2fd4303363ab735.instances-prod.magento-community.engineering Admin access: https://95b7177f568d07c5f2fd4303363ab735.instances-prod.magento-community.engineering/admin_fd1e Login: 0d0204c7 Password: c9520c3f3908

engcom-Bravo commented 4 months ago

Hi @shakeblue,

Thanks for your reporting and collaboration.

We have verified the issue in Latest 2.4-develop instance and the issue is not reprroducible.

We are able to access the cart page with the bundle products without any issues.

Kindly recheck the issue in Latest 2.4-develop instance and check any third party modules causing this issue.

Thanks.

engcom-Bravo commented 3 months ago

Hi @shakeblue,

We have noticed that this issue has not been updated since long time.
Hence we assume that this issue is fixed now, so we are closing it. Please feel to raise a fresh ticket or reopen this ticket if you need more assistance on this.

Thanks.