Open nhatlich994 opened 2 years ago
Hi @psydog-1101. Thank you for your report. To speed up processing of this issue, make sure that you provided the following information:
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:
@magento give me 2.4-develop instance
- upcoming 2.4.x release
For more details, review the Magento Contributor Assistant documentation.
Add a comment to assign the issue: @magento I am working on this
To learn more about issue processing workflow, refer to the Code Contributions.
Join Magento Community Engineering Slack and ask your questions in #github channel.
:warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
: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, join the Community Contributions Triage session to discuss the appropriate ticket.
:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel
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:
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).Details
If the issue has a valid description, the label Issue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid
appears.
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description
label to the issue by yourself.
[ ] 3. Add Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.4-develop
branchDetails
- 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.
:heavy_check_mark: Issue confirmed
Issue got reproduced in 2.4-develop branch.
Description:
While sending the invoice mail , mail was sent and an error is showing in the system.log file.
Pre-requisite:
Steps to reproduce:
Expected result:
Invoice send to customer without error
Actual result:
In system.log file error is generated.
Screenshots:
Create a order from frontend
Create a invoice for the order
Send the mail from invoice
Checked in system.log file
Hence, confirming the issue. Thanks.
:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-6721 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-Delta. Thank you for verifying the issue.
Issue Available: @engcom-Delta, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
This is probably a duplicate of https://github.com/magento/magento2/issues/35603 which got fixed in the meanwhile, so this issue can probably be closed?
I'm still experiencing this issue, I need to dig a bit deeper to confirm.
Feels like it should be fixed in the 2.4.7 release, but I'm also still experiencing this issue on 2.4.6-p5
Same here and this is from 2.4.6-p6
Also, starting from version 2.4.6-p6, this error is difficult to debug. However, we discovered that it originates from the EmailSenderHandler.php function sendEmails() at line 134. In this line, it uses the AbstractModel $item and selects the send method by the abstract class name. So, if it is a Shipment, it goes to the deprecated ShipmentSender.php class where the nested emulation starts—first emulation at line 125 and the second emulation triggered by $this->getPaymentHtml($order) -> getInfoBlockHtml(InfoInterface $info, $storeId) at line 223. The process works, and emails are sent successfully. However, the message "nested emulation..." generates garbage in the system.log when you send 1000 emails daily to customers.
This is a core issue, and we hope for an update. Meanwhile, we are patching this message by commenting out Emulation.php line 126 temporarily to keep the log clear.
any update?
I'd also like an update? @engcom-Delta
Potentially a more conscientious fix would be the following:
Although I don't really know when this would ever happen unless it's some wacky coding, so maybe just removing the logger line is fine.
@atIOCrON
Looks like this was fixed in 2.4.7 onwards: https://github.com/magento/magento2/commit/4c6d47846fb00c398d36c0b8c0b1e69a417c3a79#diff-9c76aaedd0d6bac8ab3575c02f0107dca7af5ae95bb8fe11e2faf1753221f32bR147
Preconditions and environment
Steps to reproduce
Expected result
Invoice send to customer without error
Actual result
system.log logged the error: Environment emulation nesting is not allowed.
The reason is \Magento\Sales\Model\Order\Email\Sender\InvoiceSender::send calls \Magento\Payment\Helper\Data::getInfoBlockHtml into (startEnvironmentEmulation and stopEnvironmentEmulation) scope. and \Magento\Payment\Helper\Data::getInfoBlockHtml is also declared (startEnvironmentEmulation and stopEnvironmentEmulation).
https://imgur.com/0YvQX4E https://imgur.com/Wd3AUhQ
Additional information
No response
Release note
No response
Triage and priority