nopCommerce 4.50 -Suggestions, bug reports and improvements

5 meses atrás
alexey.a wrote:

5xx errors are caused by the server. Can you disable the JS/CSS bundling? Let me know if anything changes.

Yes it appears to be the JS Bundling - the issue goes away if I disable JS Bundling

alexey.a wrote:

It would be great if you could enable the Trace Failed Requests Logging in IIS and share the results with us.

Download here https://mystore.selectsystems.com.au/files/FailedRequest.zip
4 meses atrás
Yidna wrote:

It would be great if you could enable the Trace Failed Requests Logging in IIS and share the results with us.
Download here https://mystore.selectsystems.com.au/files/FailedRequest.zip

Were you able to find anything with this issue ?
4 meses atrás
Yidna wrote:

Were you able to find anything with this issue?


We're still can't reproduce it. Could you add the next following to the configuring response compression services?


services.AddResponseCompression( options => {
    options.MimeTypes = ResponseCompressionDefaults.MimeTypes.Concat(
        new[] { "text/javascript"}
    );
});


If that doesn't help, let's change "WebOptimizer": { "HttpsCompression" } (in the appsettings.json file) from 2 to 1. At the moment, I have no idea why we can't reproduce it in production.
4 meses atrás
Yidna wrote:
What happens when an admin page is loaded for the first time ?
Dont know if anyone else has see this ?

page is unformated and It has
Wait...
then menu options
John Smith
Logout
Public store

When checking for errors I see the style and scripts have not loaded and i get this error

Refused to apply style from 'https://mystore.selectsystems.com.au/css/LanguageList.Head.styles.css?v=3HS1hQ9ZH3FmjXXUm_dRUdwbrJg' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
LanguageList.Footer.scripts.js:1 Failed to load resource: the server responded with a status of 500 ()
kendo.messages.en-US.js:1262 Uncaught TypeError: Cannot read properties of undefined (reading 'jQuery')
    at kendo.messages.en-US.min.js:16:25768
    at kendo.messages.en-US.min.js:16:81
    at kendo.messages.en-US.min.js:16:85
List:1 Uncaught ReferenceError: Globalize is not defined
    at List:1:25130
List:1 Uncaught ReferenceError: kendo is not defined
    at List:1:25206

If I hit refresh it goes away and the page loads

Only happens when you load a new page that has not been loaded before
Tried restart application / stop and start webserver and apppool

Still does it on every new page not loaded before
including every time I edit a new product, product attribute edit, forum, etc
A bit frustrating


I see excact same behaviour on a site I upgraded to 4.5, login page and admin pages not applying the style at first load, when refresh it shows up good:

Error from browser:
Refused to apply style from 'https://mysite.dk/css/Login.Head.styles.css?v=WOTP02kdyZtO9qBYQY-BC6M5xQs' because its MIME type ('') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

Site is on shared host.
4 meses atrás
Hello! I have a store installed in Azure. Linux App Service, i'm getting 404 in js and css files when enter by first time in a page, all styles are bad and js not loaded

Image links:
https://imgbb.com/RBKMBNR

https://ibb.co/wWF5wzp

Disable Javascript and Css bundling in WebOptimizer section in appsettings.json, fixes the error, but i want to use WebOptimizer bundling. Any suggestions? As i say at first line, my store is hosted in Linux Azure App Service.
4 meses atrás
Check your system event logs (not nopCommerce) are you seeing something like the following
I have sent this info to nopCommerce

Category: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware
EventId: 3
SpanId: 869926268934f5c6
TraceId: bb9b952de6f311b9e9d4981bbce7129e
ParentId: 0000000000000000
RequestId: 80003da8-0000-f900-b63f-84710c7967bb
RequestPath: /js/Homepage.Footer.scripts.js

An exception was thrown attempting to execute the error handler.

Exception:
System.UnauthorizedAccessException: Access to the path 'C:\inetpub\wwwroot\nopCommerce45\wwwroot\bundles' is denied.
   at System.IO.FileSystem.CreateDirectory(String fullPath, Byte[] securityDescriptor)
   at System.IO.Directory.CreateDirectory(String path)
   at WebOptimizer.AssetResponseStore.AddAsync(String bucket, String cachekey, AssetResponse assetResponse)
   at WebOptimizer.AssetBuilder.BuildAsync(IAsset asset, HttpContext context, IWebOptimizerOptions options)
   at WebOptimizer.AssetMiddleware.HandleAssetAsync(HttpContext context, IAsset asset, WebOptimizerOptions options)
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
   at Nop.Web.Framework.Infrastructure.Extensions.ApplicationBuilderExtensions.<>c.<<UseNopExceptionHandler>b__2_1>d.MoveNext() in M:\Production\nopCommerce_4.50.0_Source\src\Presentation\Nop.Web.Framework\Infrastructure\Extensions\ApplicationBuilderExtensions.cs:line 125
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.HandleException(HttpContext context, ExceptionDispatchInfo edi)

Category: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware
EventId: 3
SpanId: 131bf1dccfbe9e67
TraceId: 541380e85ab8578d1528ce638ffd9fe0
ParentId: 0000000000000000
RequestId: 80001a4b-0000-d800-b63f-84710c7967bb
RequestPath: /Plugins/Widgets.NivoSlider/Scripts/jquery.nivo.slider.js

An exception was thrown attempting to execute the error handler.

Exception:
System.UnauthorizedAccessException: Access to the path 'C:\inetpub\wwwroot\nopCommerce45\wwwroot\bundles' is denied.
   at System.IO.FileSystem.CreateDirectory(String fullPath, Byte[] securityDescriptor)
   at System.IO.Directory.CreateDirectory(String path)
   at WebOptimizer.AssetResponseStore.AddAsync(String bucket, String cachekey, AssetResponse assetResponse)
   at WebOptimizer.AssetBuilder.BuildAsync(IAsset asset, HttpContext context, IWebOptimizerOptions options)
   at WebOptimizer.AssetMiddleware.HandleAssetAsync(HttpContext context, IAsset asset, WebOptimizerOptions options)
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
   at Nop.Web.Framework.Infrastructure.Extensions.ApplicationBuilderExtensions.<>c.<<UseNopExceptionHandler>b__2_1>d.MoveNext() in M:\Production\nopCommerce_4.50.0_Source\src\Presentation\Nop.Web.Framework\Infrastructure\Extensions\ApplicationBuilderExtensions.cs:line 125
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.HandleException(HttpContext context, ExceptionDispatchInfo edi)


RequestPath: /Plugins/Widgets.NivoSlider/Scripts/jquery.nivo.slider.js

An unhandled exception has occurred while executing the request.

Exception:
System.UnauthorizedAccessException: Access to the path 'C:\inetpub\wwwroot\nopCommerce45\wwwroot\bundles' is denied.
   at System.IO.FileSystem.CreateDirectory(String fullPath, Byte[] securityDescriptor)
   at System.IO.Directory.CreateDirectory(String path)
   at WebOptimizer.AssetResponseStore.AddAsync(String bucket, String cachekey, AssetResponse assetResponse)
   at WebOptimizer.AssetBuilder.BuildAsync(IAsset asset, HttpContext context, IWebOptimizerOptions options)
   at WebOptimizer.AssetMiddleware.HandleAssetAsync(HttpContext context, IAsset asset, WebOptimizerOptions options)
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
4 meses atrás
Yidna wrote:

System.UnauthorizedAccessException: Access to the path 'C:\inetpub\wwwroot\nopCommerce45\wwwroot\bundles' is denied.
   at System.IO.FileSystem.CreateDirectory(String fullPath, Byte[] securityDescriptor)


According to this, it looks like the bundles' directory doesn't exist for some reason, and nopCommerce doesn't have permissions to create it. Also ensure that your IIS application has appropriate permissions to create new files in the \wwwroot\bundles directory
4 meses atrás
I go to the Shopping Cart Page

The browser shows the error
Failed to load resource: the server responded with a status of 500 ()
for file https://mystore.selectsystems.com.au/js/ShoppingCart.Footer.scripts.js?v=lCU2gUghW7lWDIWa0DY9dVi2uAU

In the event log
RequestPath: /js/ShoppingCart.Footer.scripts.js
An unhandled exception has occurred while executing the request.
Exception:
System.UnauthorizedAccessException: Access to the path 'C:\inetpub\wwwroot\nopCommerce45\wwwroot\bundles' is denied.

I reload the page everything works
The file https://mystore.selectsystems.com.au/js/ShoppingCart.Footer.scripts.js?v=lCU2gUghW7lWDIWa0DY9dVi2uAU is loaded

But there is nothing in the C:\inetpub\wwwroot\nopCommerce45\wwwroot\bundles directory
This directory is blank - seems there is never any files saved there

The security on the directory for the IISAppPool\nopCommerce45 is Modify, Execute, Read, Write

It is only the first load that gives the error after that no error
4 meses atrás
Yidna wrote:

It is only the first load that gives the error after that no error


Because the next time, a static file outputs directly from the memory cache. WebOptimizer will try to take them from the disk cache If they aren't in the memory cache.
4 meses atrás
Hi guys,

It seems like when uninstalling a plugin with a database table the table is not deleted (Down migrations are not called).
You can easily test this with the Avalara plugin for example. After we uninstall the plugin the TaxTransactionLog table is still present.

Thanks,
Boyko