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

Magento Shipping Module, SimpleXMLElement parser error AbstractCarrier.php #37758

Closed
1 of 5 tasks
dandrikop opened this issue Jul 15, 2023 · 6 comments
Closed
1 of 5 tasks
Assignees
Labels
Issue: needs update Additional information is require, waiting for response Reported on 2.4.6-p1 Indicates original Magento version for the Issue report.

Comments

@dandrikop
Copy link

Preconditions and environment

Magento 2.4.6-p1
PHP 8.1.20

Steps to reproduce

  1. Add an item to the shopping cart.
  2. At the shopping cart page (/checkout/cart/) get a shipping quotation by providing the destination country, city and ZIP code.

Expected result

The customer gets a shipping quotation based on the available services for the destination country, city and ZIP code.

Actual result

The customer gets a shipping quotation based on the available services for the destination country, city and ZIP code, but the below error is recorded at both the /var/log/system.log and /var/log/shipping.log files:

`[2023-07-15T10:35:28.109661+00:00] main.CRITICAL: Exception: Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : Opening and ending tag mismatch: br line 1 and body in /vendor/magento/module-shipping/Model/Carrier/AbstractCarrier.php on line 673 in /vendor/magento/framework/App/ErrorHandler.php:62
Stack trace:
#0 [internal function]: Magento\Framework\App\ErrorHandler->handler(2, 'SimpleXMLElemen...', '/vendor/magento/...', 673)
#1 /vendor/magento/module-shipping/Model/Carrier/AbstractCarrier.php(673): SimpleXMLElement->__construct('<ti...')
#2 /vendor/magento/module-dhl/Model/Carrier.php(1025): Magento\Shipping\Model\Carrier\AbstractCarrier->filterDebugData('<ti...')
#3 /vendor/magento/module-dhl/Model/Carrier.php(1120): Magento\Dhl\Model\Carrier->processQuotesResponses(Array)
#4 /vendor/magento/framework/Async/CallbackDeferred.php(99): Magento\Dhl\Model\Carrier->Magento\Dhl\Model{closure}()
#5 /generated/code/Magento/Shipping/Model/Rate/Result/ProxyDeferred.php(61): Magento\Framework\Async\CallbackDeferred->get()
#6 /generated/code/Magento/Shipping/Model/Rate/Result/ProxyDeferred.php(92): Magento\Shipping\Model\Rate\Result\ProxyDeferred->wait()
#7 /generated/code/Magento/Shipping/Model/Rate/Result/ProxyDeferred.php(93): Magento\Shipping\Model\Rate\Result\ProxyDeferred->getError()
#8 /vendor/magento/module-shipping/Model/Rate/CarrierResult.php(41): Magento\Shipping\Model\Rate\Result\ProxyDeferred->getError()
#9 /vendor/magento/module-quote/Model/Quote/Address.php(1081): Magento\Shipping\Model\Rate\CarrierResult->getAllRates()
#10 /vendor/magento/module-quote/Model/Quote/Address.php(1004): Magento\Quote\Model\Quote\Address->requestShippingRates()
#11 /vendor/magento/module-quote/Model/Quote/Address/Total/Shipping.php(83): Magento\Quote\Model\Quote\Address->collectShippingRates()
#12 /vendor/magento/module-quote/Model/Quote/TotalsCollector.php(261): Magento\Quote\Model\Quote\Address\Total\Shipping->collect(Object(Magento\Quote\Model\Quote\Interceptor), Object(Magento\Quote\Model\ShippingAssignment), Object(Magento\Quote\Model\Quote\Address\Total))
#13 /vendor/magento/module-quote/Model/ShippingMethodManagement.php(336): Magento\Quote\Model\Quote\TotalsCollector->collectAddressTotals(Object(Magento\Quote\Model\Quote\Interceptor), Object(Magento\Quote\Model\Quote\Address\Interceptor))
#14 /vendor/magento/module-quote/Model/ShippingMethodManagement.php(269): Magento\Quote\Model\ShippingMethodManagement->getShippingMethods(Object(Magento\Quote\Model\Quote\Interceptor), Object(Magento\Quote\Model\Quote\Address\Interceptor))
#15 /vendor/magento/framework/Interception/Interceptor.php(58): Magento\Quote\Model\ShippingMethodManagement->estimateByExtendedAddress(123335, Object(Magento\Quote\Model\Quote\Address\Interceptor))
#16 /vendor/magento/framework/Interception/Interceptor.php(138): Magento\Quote\Model\ShippingMethodManagement\Interceptor->___callParent('estimateByExten...', Array)
#17 /vendor/magento/framework/Interception/Interceptor.php(153): Magento\Quote\Model\ShippingMethodManagement\Interceptor->Magento\Framework\Interception{closure}(123335, Object(Magento\Quote\Model\Quote\Address\Interceptor))
#18 /generated/code/Magento/Quote/Model/ShippingMethodManagement/Interceptor.php(32): Magento\Quote\Model\ShippingMethodManagement\Interceptor->___callPlugins('estimateByExten...', Array, Array)
#19 /vendor/magento/module-quote/Model/GuestCart/GuestShippingMethodManagement.php(103): Magento\Quote\Model\ShippingMethodManagement\Interceptor->estimateByExtendedAddress(123335, Object(Magento\Quote\Model\Quote\Address\Interceptor))
#20 [internal function]: Magento\Quote\Model\GuestCart\GuestShippingMethodManagement->estimateByExtendedAddress('g74NmixUrhBqxsj...', Object(Magento\Quote\Model\Quote\Address\Interceptor))
#21 /vendor/magento/module-webapi/Controller/Rest/SynchronousRequestProcessor.php(95): call_user_func_array(Array, Array)
#22 /vendor/magento/module-webapi/Controller/Rest.php(202): Magento\Webapi\Controller\Rest\SynchronousRequestProcessor->process(Object(Magento\Framework\Webapi\Rest\Request\Proxy))
#23 /vendor/magento/framework/Interception/Interceptor.php(58): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
#24 /vendor/magento/framework/Interception/Interceptor.php(138): Magento\Webapi\Controller\Rest\Interceptor->___callParent('dispatch', Array)
#25 /vendor/magento/framework/Interception/Interceptor.php(153): Magento\Webapi\Controller\Rest\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))
#26 /generated/code/Magento/Webapi/Controller/Rest/Interceptor.php(23): Magento\Webapi\Controller\Rest\Interceptor->___callPlugins('dispatch', Array, Array)
#27 /vendor/magento/framework/App/Http.php(116): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#28 /generated/code/Magento/Framework/App/Http/Interceptor.php(23): Magento\Framework\App\Http->launch()
#29 /vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http\Interceptor->launch()
#30 /pub/index.php(30): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#31 {main}

Next Exception: String could not be parsed as XML in /vendor/magento/module-shipping/Model/Carrier/AbstractCarrier.php:673
Stack trace:
#0 /vendor/magento/module-shipping/Model/Carrier/AbstractCarrier.php(673): SimpleXMLElement->__construct('<ti...')
#1 /vendor/magento/module-dhl/Model/Carrier.php(1025): Magento\Shipping\Model\Carrier\AbstractCarrier->filterDebugData('<ti...')
#2 /vendor/magento/module-dhl/Model/Carrier.php(1120): Magento\Dhl\Model\Carrier->processQuotesResponses(Array)
#3 /vendor/magento/framework/Async/CallbackDeferred.php(99): Magento\Dhl\Model\Carrier->Magento\Dhl\Model{closure}()
#4 /generated/code/Magento/Shipping/Model/Rate/Result/ProxyDeferred.php(61): Magento\Framework\Async\CallbackDeferred->get()
#5 /generated/code/Magento/Shipping/Model/Rate/Result/ProxyDeferred.php(92): Magento\Shipping\Model\Rate\Result\ProxyDeferred->wait()
#6 /generated/code/Magento/Shipping/Model/Rate/Result/ProxyDeferred.php(93): Magento\Shipping\Model\Rate\Result\ProxyDeferred->getError()
#7 /vendor/magento/module-shipping/Model/Rate/CarrierResult.php(41): Magento\Shipping\Model\Rate\Result\ProxyDeferred->getError()
#8 /vendor/magento/module-quote/Model/Quote/Address.php(1081): Magento\Shipping\Model\Rate\CarrierResult->getAllRates()
#9 /vendor/magento/module-quote/Model/Quote/Address.php(1004): Magento\Quote\Model\Quote\Address->requestShippingRates()
#10 /vendor/magento/module-quote/Model/Quote/Address/Total/Shipping.php(83): Magento\Quote\Model\Quote\Address->collectShippingRates()
#11 /vendor/magento/module-quote/Model/Quote/TotalsCollector.php(261): Magento\Quote\Model\Quote\Address\Total\Shipping->collect(Object(Magento\Quote\Model\Quote\Interceptor), Object(Magento\Quote\Model\ShippingAssignment), Object(Magento\Quote\Model\Quote\Address\Total))
#12 /vendor/magento/module-quote/Model/ShippingMethodManagement.php(336): Magento\Quote\Model\Quote\TotalsCollector->collectAddressTotals(Object(Magento\Quote\Model\Quote\Interceptor), Object(Magento\Quote\Model\Quote\Address\Interceptor))
#13 /vendor/magento/module-quote/Model/ShippingMethodManagement.php(269): Magento\Quote\Model\ShippingMethodManagement->getShippingMethods(Object(Magento\Quote\Model\Quote\Interceptor), Object(Magento\Quote\Model\Quote\Address\Interceptor))
#14 /vendor/magento/framework/Interception/Interceptor.php(58): Magento\Quote\Model\ShippingMethodManagement->estimateByExtendedAddress(123335, Object(Magento\Quote\Model\Quote\Address\Interceptor))
#15 /vendor/magento/framework/Interception/Interceptor.php(138): Magento\Quote\Model\ShippingMethodManagement\Interceptor->___callParent('estimateByExten...', Array)
#16 /vendor/magento/framework/Interception/Interceptor.php(153): Magento\Quote\Model\ShippingMethodManagement\Interceptor->Magento\Framework\Interception{closure}(123335, Object(Magento\Quote\Model\Quote\Address\Interceptor))
#17 /generated/code/Magento/Quote/Model/ShippingMethodManagement/Interceptor.php(32): Magento\Quote\Model\ShippingMethodManagement\Interceptor->___callPlugins('estimateByExten...', Array, Array)
#18 /vendor/magento/module-quote/Model/GuestCart/GuestShippingMethodManagement.php(103): Magento\Quote\Model\ShippingMethodManagement\Interceptor->estimateByExtendedAddress(123335, Object(Magento\Quote\Model\Quote\Address\Interceptor))
#19 [internal function]: Magento\Quote\Model\GuestCart\GuestShippingMethodManagement->estimateByExtendedAddress('g74NmixUrhBqxsj...', Object(Magento\Quote\Model\Quote\Address\Interceptor))
#20 /vendor/magento/module-webapi/Controller/Rest/SynchronousRequestProcessor.php(95): call_user_func_array(Array, Array)
#21 /vendor/magento/module-webapi/Controller/Rest.php(202): Magento\Webapi\Controller\Rest\SynchronousRequestProcessor->process(Object(Magento\Framework\Webapi\Rest\Request\Proxy))
#22 /vendor/magento/framework/Interception/Interceptor.php(58): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
#23 /vendor/magento/framework/Interception/Interceptor.php(138): Magento\Webapi\Controller\Rest\Interceptor->___callParent('dispatch', Array)
#24 /vendor/magento/framework/Interception/Interceptor.php(153): Magento\Webapi\Controller\Rest\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))
#25 /generated/code/Magento/Webapi/Controller/Rest/Interceptor.php(23): Magento\Webapi\Controller\Rest\Interceptor->___callPlugins('dispatch', Array, Array)
#26 /vendor/magento/framework/App/Http.php(116): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#27 /generated/code/Magento/Framework/App/Http/Interceptor.php(23): Magento\Framework\App\Http->launch()
#28 /vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http\Interceptor->launch()
#29 /pub/index.php(30): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#30 {main} [] []
`

Additional information

No response

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
@m2-assistant
Copy link

m2-assistant bot commented Jul 15, 2023

Hi @dandrikop. 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:


Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
🕙 You can find the schedule on the Magento Community Calendar page.
📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

@m2-assistant
Copy link

m2-assistant bot commented Jul 16, 2023

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: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
  • 3. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
  • 4. Verify that the issue is reproducible on 2.4-develop branch
    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
  • 5. Add label Issue: Confirmed once verification is complete.
  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Bravo engcom-Bravo added the Reported on 2.4.6-p1 Indicates original Magento version for the Issue report. label Jul 16, 2023
@engcom-Bravo
Copy link
Contributor

Hi @dandrikop,

Thank you for reporting and collaboration.

Verified the issue on Magento 2.4-develop instance and the issue is not reproducible.Kindly refer the screenshots.

Steps to reproduce

  • Add an item to the shopping cart.
  • At the shopping cart page (/checkout/cart/) get a shipping quotation by providing the destination country, city and ZIP code.

The customer getting a shipping quotation based on the available services for the destination country, city and ZIP code.

Checkout (2)

NOTE: There is no error logged in both the /var/log/system.log and /var/log/shipping.log files.

Kindly recheck the behaviour on Magento 2.4-develop instance and elaborate steps to reproduce if the issue is still reproducible.

Thanks.

@engcom-Bravo engcom-Bravo added the Issue: needs update Additional information is require, waiting for response label Jul 17, 2023
@dandrikop
Copy link
Author

Hello,

As mentioned in the initial message of this thread, the issue appears at Magento 2.4.6-p1. It may not appear in older versions. For example, when I was on 2.4.3-p1, this problem was not occurred.

Regards,
Dimitris

@engcom-Bravo
Copy link
Contributor

Hi @dandrikop,

Thanks for your update.

it is recommended to verify the issue on Magento 2.4-develop instance as it is an upcoming 2.4.x release and have latest code base.

Kindly recheck the issue on Magento 2.4-develop instance and check if any 3rd party extensions / modules enabled is causing this issue.

Thanks.

@engcom-Bravo
Copy link
Contributor

Hi @dandrikop,

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: needs update Additional information is require, waiting for response Reported on 2.4.6-p1 Indicates original Magento version for the Issue report.
Projects
None yet
Development

No branches or pull requests

2 participants