magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

Moment.min.js.map file is not generating

Open bartoszjuszczyk opened this issue 2 years ago • 17 comments

Preconditions and environment

  • Magento 2.4.6-p2

Steps to reproduce

  1. Navigate to backend panel

Expected result

Moment.min.js.map file is generated

Actual result

Moment.min.js.map file is not generated

image

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.
  • [X] 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”.

bartoszjuszczyk avatar Aug 27 '23 03:08 bartoszjuszczyk

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

m2-assistant[bot] avatar Aug 27 '23 03:08 m2-assistant[bot]

@magento give me 2.4.6-p2 instance

bartoszjuszczyk avatar Aug 27 '23 03:08 bartoszjuszczyk

Hi @bartoszjuszczyk. Thank you for your request. I'm working on Magento instance for you.

Hi @bartoszjuszczyk, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

@magento reproduced on 2.4.6-p2 instance

bartoszjuszczyk avatar Aug 27 '23 03:08 bartoszjuszczyk

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:

  • [ ] 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.

m2-assistant[bot] avatar Aug 27 '23 12:08 m2-assistant[bot]

@magento give me 2.4-develop instance

engcom-Bravo avatar Aug 29 '23 09:08 engcom-Bravo

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

Hi @engcom-Bravo, here is your Magento Instance: https://ff6d7274b42c2d9cdb243464dc60f797.instances-prod.magento-community.engineering Admin access: https://ff6d7274b42c2d9cdb243464dc60f797.instances-prod.magento-community.engineering/admin_5e80 Login: a7c77547 Password: 5168cde66022

Hi @bartoszjuszczyk,

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

  • Navigate to backend panel
Screenshot 2023-08-29 at 3 09 55 PM Screenshot 2023-08-29 at 3 17 12 PM

There is no error in console and also Moment.min.js.map file is generating.

Could you please refer this document https://experienceleague.adobe.com/docs/commerce-operations/performance-best-practices/performance-best-practices/advanced-js-bundling.html regarding enabling javascript Bundling.

Thanks.

engcom-Bravo avatar Aug 29 '23 12:08 engcom-Bravo

I've seen this as well on many shops. It should definitely still be reproducible on 2.4-develop I think. But I don't have time to find exact steps. It's quite annoying, the JS console should ideally be empty, no warnings or errors, but this warning is added there.

Issue was introduced by updating the moment.js library from version 2.29.1 to 2.29.4 over here. You'll see that the last line added introduces that link to moment.min.js.map This change got added in:

  • 2.4.4-p4
  • 2.4.5-p3
  • 2.4.6-p1
  • 2.4.7-beta1

So I think the solution is simple, that extra line at the bottom of that file should be removed again, just like it was before the upgrade.

hostep avatar Aug 31 '23 10:08 hostep

This is extremely easy to reproduce, @engcom-Bravo, I'm not sure how you aren't able to:

  1. Install Magento 2.4-develop (I've used commit 867d074b64caaa172cf08b0471665a22799c2ea9)
  2. Go to the backoffice (no need to login) (or use the frontend)
  3. Look into your console in your browser (I'm using Google Chrome)

I've tested it both in production & develop modes, in both cases it can be reproduced.

Screenshot: Screenshot 2023-08-31 at 16 49 59

I'm also noticing multiple other JS files have a sourcemap defined:

If you go in the frontend to the 'Create an account' page, you can see the failure to load zxcvbn.js.map for example.

I'm now wondering if the problem is that these non-existing files are referenced, or if those files should get generated somehow. @bartoszjuszczyk: do you remember if those files got generated in the past? Or has this always been a problem?

hostep avatar Aug 31 '23 14:08 hostep

@hostep I don't think I've ever seen a .map files.

bartoszjuszczyk avatar Aug 31 '23 15:08 bartoszjuszczyk

@hostep Thanks for your contribution & collaboration over here.

Hi @bartoszjuszczyk,

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

Steps to Reproduce

  • Install Magento 2.4-develop
  • Go to the backoffice (no need to login) (or use the frontend)
  • Look into your console in your browser
Screenshot 2023-09-01 at 12 11 21 PM Screenshot 2023-09-01 at 12 12 54 PM Screenshot 2023-09-01 at 12 24 38 PM

We are getting error failure to load zxcvbn.js.map and Moment.min.js.map.

Hence Confirming the issue.

Thanks.

engcom-Bravo avatar Sep 01 '23 10:09 engcom-Bravo

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-9452 is successfully created for this GitHub issue.

github-jira-sync-bot avatar Sep 01 '23 10:09 github-jira-sync-bot

:white_check_mark: Confirmed by @engcom-Bravo. Thank you for verifying the issue.
Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

m2-assistant[bot] avatar Sep 01 '23 10:09 m2-assistant[bot]

@engcom-Bravo do you know which is the PR created related to this issue?

LucScu avatar Jan 03 '24 18:01 LucScu

Hi @bartoszjuszczyk,

Internal team has started working on this issue.

Thanks,

engcom-Bravo avatar Jan 30 '24 08:01 engcom-Bravo

Closed without any comment telling why?

But appears to be fixed by removing the sourceMappingURL: https://github.com/magento/magento2/commit/11add87193d7ba5fd822631df8e329998f841026

hostep avatar Mar 05 '24 21:03 hostep

Hello,

As I can see this issue got fixed in the scope of the internal Jira ticket AC-9452 by the internal team Related commits: https://github.com/search?q=repo%3Amagento%2Fmagento2+AC-9452&type=commits

Thanks.

engcom-Bravo avatar Mar 06 '24 06:03 engcom-Bravo

I am on Magento ver. 2.4.6-p4 and am having the 404 moment.min.js.map issue. I am lucky if I can save one page in my store configuration, I clear all caches, data stores refresh everything, and I might get one tab to work.

Screenshot 2024-03-14 at 06 37 21 Screenshot 2024-03-14 at 06 40 33

mooseducks avatar Mar 14 '24 12:03 mooseducks

But appears to be fixed by removing the sourceMappingURL: 11add87

So no issues with "main.CRITICAL: Unable to resolve the source file" for any .js.map files once all plugins are updated and we can upgrade to 2.4.7 ?

YiffyToys avatar May 06 '24 16:05 YiffyToys