Open
Description
Preconditions and environment
- Magento 2.4.7-p2
- New Relic agents installed (not using Magento NewRelic modules)
Steps to reproduce
- Navigate to Dashboard (adminhtml)
- check console log
Expected result
Expect no console errors logged
Actual result
Lots of errors logged repeatedly:
legacy-build.min.js:1 Uncaught TypeError: this._each is not a function
at e (legacy-build.min.js:1:14513)
at nr-spa-1.267.0.min.js:2:81604
at Array.forEach ()
at y.ce [as onFinished] (nr-spa-1.267.0.min.js:2:81583)
at y.finish (nr-spa-1.267.0.min.js:2:76545)
at nr-spa-1.267.0.min.js:2:76118
Additional information
This is related to legacy-build.min.js which is released with Magento 2.4.7-p2. If the file is replaced by the version released by Magento 2.4.7-p1 the error goes away.
See also issue logged on New Relic github:
newrelic/newrelic-browser-agent#1201
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”.
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
m2-assistant commentedon Oct 8, 2024
Hi @pjw345. 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.
@magento I am working on this
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.
pisicabogdan commentedon Oct 9, 2024
Same error on Magento 2.4.6-p6
mrafyq commentedon Oct 15, 2024
Same error on Magento 2.4.5-p10
usuyukiso commentedon Oct 15, 2024
reproduced for me on 2.4.7-p3. It is only reproduced with New Relic installed.
MagePsycho commentedon Oct 16, 2024
Same issue on Magento 2.4.5-p2.
It is only reproduced with New Relic installed.
Got it fixed by using the legacy-build js file from Magento 2.4.7-p1 (still yet to check it's consequences)
bbrigagao commentedon Oct 16, 2024
I saw this error after updating projects to the bulletin APSB24-61 on projects with New Relic configured.
If you guys check the release notes there was a fix on prototype js scripts (I don't know if could be related to this).
There are 3 types of New Relic accounts and the script will be injected according to your account:
Lite - https://js-agent.newrelic.com/nr-rum-1.267.0.min.js
Pro - https://js-agent.newrelic.com/nr-full-1.267.0.min.js
SPA (pro + spa) - https://js-agent.newrelic.com/nr-spa-1.267.0.min.js
I saw this error only happens on projects that have SPA accounts, perhaps it could be an incompatibility with this SPA script.
pjw345 commentedon Oct 17, 2024
I've checked the bulletin and have not seen anything regarding legacy-build.min.js.
https://helpx.adobe.com/security/products/magento/apsb24-61.html
@bbrigagao can you remember where you read that or did I miss it?
pisicabogdan commentedon Oct 17, 2024
Again, same error on Magento 2.4.6-p7 (last week upgraded from 2.4.6-p6).
bbrigagao commentedon Oct 17, 2024
@pjw345 I found that the legacy-build.min.js is related to prototype js on this issue.
So, I suspected that could be related to this since on bulletin APSB24-61 there was a fix on prototype js scripts.
scadox commentedon Oct 17, 2024
Hi Adobe Commerce Support, same problem with Magento (2.4.7-p3) and not have problem with preview (2.4.7-p2) hosted in Magento Cloud.
Where i have this problem in Admin Panel :
Uncaught TypeError: this._each is not a function at e (legacy-build.min.js:1:14513) at nr-spa-1.268.0.min.js:2:83492 at Array.forEach (<anonymous>) at y.ce [as onFinished] (nr-spa-1.268.0.min.js:2:83471) at b.finish (nr-spa-1.268.0.min.js:2:78433) at nr-spa-1.268.0.min.js:2:78006
File from vendor lib (legacy-build.min.js) =
[...] var Enumerable = (function() { function e(E, D) { try { this._each(E, D) [...]
Cordialement,
Matthew Lafrance
MagePsycho commentedon Oct 17, 2024
I believe the issue can be resolved by fixing the
legacy-build.min.js
file directly. According to this ticket - newrelic/newrelic-browser-agent#1201, it appears that the legacy JavaScript is overridingObject.values()
, which is causing the problem.Please let us know if the Magento team or any of you have identified a permanent fix.
41 remaining items