Open Closed

Moment.min.js.map missing from bundle, causing a 404 Error page flash on Auth server login #7890


User avatar
0
okains created
  • ABP Framework version: v8.2.3
  • UI Type: Blazor Server
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

Hi,

I am getting a 404 returned on every login in production, due to there being a missing moment.min.js.map file.

This is causing a noticeable 404 Error Page flashing on screen for 1 second before the login page loads.

Here are the sections of the logs that show this :

2024-09-07 03:43:25.154 +00:00 [INF] > Minified /libs/timeago/jquery.timeago.js (7636 bytes -> 4107 bytes) 2024-09-07 03:43:25.157 +00:00 [DBG] - /libs/bootstrap-datepicker/bootstrap-datepicker.min.js (33878 bytes) 2024-09-07 03:43:25.157 +00:00 [DBG] > Already minified. 2024-09-07 03:43:25.161 +00:00 [DBG] - /libs/moment/moment.min.js (58891 bytes) 2024-09-07 03:43:25.161 +00:00 [DBG] > Already minified.

2024-09-07 03:46:01.711 +00:00 [INF] Request starting HTTP/1.1 GET https://esv2-auth-test.azurewebsites.net/__bundles/moment.min.js.map; - null null 2024-09-07 03:46:01.712 +00:00 [DBG] The request path /__bundles/moment.min.js.map; does not match a supported file type 2024-09-07 03:46:01.712 +00:00 [DBG] No candidates found for the request path '/__bundles/moment.min.js.map;' 2024-09-07 03:46:01.712 +00:00 [DBG] Request did not match any endpoints 2024-09-07 03:46:01.715 +00:00 [INF] Request finished HTTP/1.1 GET https://esv2-auth-test.azurewebsites.net/__bundles/moment.min.js.map; - 302 null null 3.4218ms 2024-09-07 03:46:01.715 +00:00 [INF] Request reached the end of the middleware pipeline without being handled by application code. Request path: GET https://esv2-auth-test.azurewebsites.net/__bundles/moment.min.js.map;, Response status code: 302 2024-09-07 03:46:01.834 +00:00 [INF] Executing ContentResult with HTTP Response ContentType of application/javascript 2024-09-07 03:46:01.835 +00:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.Localization.AbpApplicationLocalizationScriptController.GetAsync (Volo.Abp.AspNetCore.Mvc) in 2397.8982ms 2024-09-07 03:46:01.835 +00:00 [INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.Localization.AbpApplicationLocalizationScriptController.GetAsync (Volo.Abp.AspNetCore.Mvc)' 2024-09-07 03:46:01.856 +00:00 [INF] Request finished HTTP/1.1 GET https://esv2-auth-test.azurewebsites.net/Abp/ApplicationLocalizationScript?cultureName=en - 200 91128 application/javascript 2427.1567ms 2024-09-07 03:46:02.131 +00:00 [INF] Request starting HTTP/1.1 GET https://esv2-auth-test.azurewebsites.net/Error?httpStatusCode=404 - null null

How can I fix this problem?

Thanks,

Karim Ainsworth


3 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    This is Chrome's behavior. It tries to get all map files. I think you can ignore it.

    Or you can copy node_modules/moment/min/moment.min.js.map to your libs folder.

  • User Avatar
    0
    okains created

    Hi,

    OK I copied the .map file into the libs folder and that seems to have fixed it, thanks,

    Karim

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    : )

Made with ❤️ on ABP v9.1.0-preview. Updated on October 11, 2024, 07:13