Nopcommerce 4.3 Live - Restart application kills app pool and website

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 years ago
Just reporting what I have experienced thus far:

I tried the 503 fix as noted here and still encountered the 503.0 http error and the same behavior.  
https://github.com/nopSolutions/nopCommerce/tree/503-status-bag-on-restart

It may be related to what amirabel mentioned.

I agree that an application restart (as a result of a plugin installation) in VS will cause debugging to stop and that I have to start debugging again in VS.  That is all good and expected.  However, I receive the Http 500.3 error before a successful restart which is the problem.  It may be a timing issue.

Thank you.
3 years ago
a.m. wrote:
We've found a possible solution. It works fine on our local machines and on our servers. Please see the "503-status-bag-on-restart" branch

Could you please also test it and let me know the results before we merge it?


We've applied some new changes. Could you please get the latest version of this branch and test it one more time? Here is the new brabch - issue-4765-fix-restart-bug

Your help is highly appreciated!
3 years ago
Thanks, Andrei.  The good news is that this branch fixed the Http 503.0 error.  I was able to install my plugin as in prior version of nopCommerce without any errors.  

The bad news is that the Install button on my plugin did not change to Uninstall.  I see that my custom table was created but I have no way of Uninstalling now.

Please let me know if I need to provide further information.
3 years ago
I put a breakpoint in my PluginProvider class, Install() method to see if it gets hit and it's not.  It's the same exact plugin I had in 4.2 minus the DBObjectContext.
Here's my Install method where base.Install() is being called.
public override void Install()
{
    // Create Locales
    ...
    base.Install();
    ...
}


Here's the error that I'm getting in the logs:

Nop.Core.NopException: No constructor was found that had all the dependencies satisfied.
---> Nop.Core.NopException: Unknown dependency
   at Nop.Core.Infrastructure.NopEngine.<ResolveUnregistered>b__15_0(ParameterInfo parameter) in C:\src\Libraries\Nop.Core\Infrastructure\NopEngine.cs:line 250
   at System.Linq.Enumerable.SelectArrayIterator`2.ToArray()
   at Nop.Core.Infrastructure.NopEngine.ResolveUnregistered(Type type) in C:\src\Libraries\Nop.Core\Infrastructure\NopEngine.cs:line 254
   --- End of inner exception stack trace ---
   at Nop.Core.Infrastructure.NopEngine.ResolveUnregistered(Type type) in C:\src\Libraries\Nop.Core\Infrastructure\NopEngine.cs:line 263
   at Nop.Services.Plugins.PluginDescriptor.Instance[TPlugin]() in C:\src\Libraries\Nop.Services\Plugins\PluginDescriptor.cs:line 67
   at Nop.Services.Plugins.PluginService.InstallPlugins() in C:\src\Libraries\Nop.Services\Plugins\PluginService.cs:line 469
3 years ago
a.m. wrote:
We've found a possible solution. It works fine on our local machines and on our servers. Please see the "503-status-bag-on-restart" branch

Could you please also test it and let me know the results before we merge it?

We've applied some new changes. Could you please get the latest version of this branch and test it one more time? Here is the new brabch - issue-4765-fix-restart-bug

Your help is highly appreciated!



Hi,
I checked out the Hotfix branch and tried it out in my remote VM.
The restart of the application runs again with the only difference that the overlay appears with a bite delay.
the only disadvantage is that my plugins are gone after a new start of the application and are not copied into the "plugins/bin" directory, so the list of local plugins is empty.

do you have an explanation? otherwise I'll debug the bugfix version tonight.

many Greetings
3 years ago
Thank you for the information!
3 years ago
Thanks a lot to everyone for testing and helping with investigation of this issue

If you downloaded nopCommerce 4.30 before May 29th (the first 10 days after the release), then please read this post.
3 years ago
bpejman wrote:
I put a breakpoint in my PluginProvider class, Install() method to see if it gets hit and it's not.  It's the same exact plugin I had in 4.2 minus the DBObjectContext.
Here's my Install method where base.Install() is being called.
public override void Install()
{
    // Create Locales
    ...
    base.Install();
    ...
}


Here's the error that I'm getting in the logs:

Nop.Core.NopException: No constructor was found that had all the dependencies satisfied.
---> Nop.Core.NopException: Unknown dependency
   at Nop.Core.Infrastructure.NopEngine.<ResolveUnregistered>b__15_0(ParameterInfo parameter) in C:\src\Libraries\Nop.Core\Infrastructure\NopEngine.cs:line 250
   at System.Linq.Enumerable.SelectArrayIterator`2.ToArray()
   at Nop.Core.Infrastructure.NopEngine.ResolveUnregistered(Type type) in C:\src\Libraries\Nop.Core\Infrastructure\NopEngine.cs:line 254
   --- End of inner exception stack trace ---
   at Nop.Core.Infrastructure.NopEngine.ResolveUnregistered(Type type) in C:\src\Libraries\Nop.Core\Infrastructure\NopEngine.cs:line 263
   at Nop.Services.Plugins.PluginDescriptor.Instance[TPlugin]() in C:\src\Libraries\Nop.Services\Plugins\PluginDescriptor.cs:line 67
   at Nop.Services.Plugins.PluginService.InstallPlugins() in C:\src\Libraries\Nop.Services\Plugins\PluginService.cs:line 469


Hi,
Did you manage to resolve this? I'm having the same issue - same plugin as 4.20, minus the DBObjectContext and a couple of small changes for 4.30.

Thanks,
Craig
3 years ago
The original problem was fixed - did you download the latest version ?
https://www.nopcommerce.com/en/download-nopcommerce
Looks like you may have a different error - did you debug and step though your plugin with Visual Studio ?
3 years ago
Yidna wrote:
The original problem was fixed - did you download the latest version ?
https://www.nopcommerce.com/en/download-nopcommerce
Looks like you may have a different error - did you debug and step though your plugin with Visual Studio ?


Hi,

Yes, using the latest version :)

Every time I try and debug, install the plugin, then hitting 'restart application to apply changes', after a few seconds, it kills IIS and shuts down the debugger!

Output:
Microsoft.AspNetCore.Hosting.Diagnostics: Information: Request starting HTTP/1.1 POST http://localhost:55390/Admin/Plugin/List application/x-www-form-urlencoded 343
Microsoft.AspNetCore.Routing.EndpointMiddleware: Information: Executing endpoint 'Nop.Web.Areas.Admin.Controllers.PluginController.ApplyChanges (Nop.Web)'
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker: Information: Route matched with {area = "Admin", action = "List", controller = "Plugin"}. Executing controller action with signature Microsoft.AspNetCore.Mvc.IActionResult ApplyChanges() on controller Nop.Web.Areas.Admin.Controllers.PluginController (Nop.Web).
Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor: Information: Executing ViewResult, running view RestartApplication.
Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor: Information: Executed ViewResult - view RestartApplication executed in 149.984ms.
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker: Information: Executed action Nop.Web.Areas.Admin.Controllers.PluginController.ApplyChanges (Nop.Web) in 207.043ms
Microsoft.AspNetCore.Routing.EndpointMiddleware: Information: Executed endpoint 'Nop.Web.Areas.Admin.Controllers.PluginController.ApplyChanges (Nop.Web)'
Microsoft.AspNetCore.Hosting.Diagnostics: Information: Request finished in 617.837ms 200 text/html; charset=utf-8
Microsoft.AspNetCore.Hosting.Diagnostics: Information: Request starting HTTP/1.1 GET http://localhost:55390/Admin/Plugin/AdminNavigationPlugins?_=1593167089135  
Microsoft.AspNetCore.Routing.EndpointMiddleware: Information: Executing endpoint 'Nop.Web.Areas.Admin.Controllers.PluginController.AdminNavigationPlugins (Nop.Web)'
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker: Information: Route matched with {area = "Admin", action = "AdminNavigationPlugins", controller = "Plugin"}. Executing controller action with signature Microsoft.AspNetCore.Mvc.IActionResult AdminNavigationPlugins() on controller Nop.Web.Areas.Admin.Controllers.PluginController (Nop.Web).
Microsoft.AspNetCore.Mvc.NewtonsoftJson.NewtonsoftJsonResultExecutor: Information: Executing JsonResult, writing value of type 'System.Collections.Generic.List`1[[<>f__AnonymousType19`5[[System.String, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Int32, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], Nop.Web, Version=4.3.0.0, Culture=neutral, PublicKeyToken=null]]'.
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker: Information: Executed action Nop.Web.Areas.Admin.Controllers.PluginController.AdminNavigationPlugins (Nop.Web) in 46.077ms
Microsoft.AspNetCore.Routing.EndpointMiddleware: Information: Executed endpoint 'Nop.Web.Areas.Admin.Controllers.PluginController.AdminNavigationPlugins (Nop.Web)'
Microsoft.AspNetCore.Hosting.Diagnostics: Information: Request finished in 422.9301ms 200 application/json; charset=utf-8
Microsoft.AspNetCore.Hosting.Diagnostics: Information: Request starting HTTP/1.1 GET http://localhost:55390/Admin/Common/RestartApplication  
Microsoft.AspNetCore.Routing.EndpointMiddleware: Information: Executing endpoint 'Nop.Web.Areas.Admin.Controllers.CommonController.RestartApplication (Nop.Web)'
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker: Information: Route matched with {area = "Admin", action = "RestartApplication", controller = "Common"}. Executing controller action with signature Microsoft.AspNetCore.Mvc.IActionResult RestartApplication() on controller Nop.Web.Areas.Admin.Controllers.CommonController (Nop.Web).
Microsoft.Hosting.Lifetime: Information: Application is shutting down...
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker: Information: Executed action Nop.Web.Areas.Admin.Controllers.CommonController.RestartApplication (Nop.Web) in 62.679ms
Microsoft.AspNetCore.Routing.EndpointMiddleware: Information: Executed endpoint 'Nop.Web.Areas.Admin.Controllers.CommonController.RestartApplication (Nop.Web)'
Microsoft.AspNetCore.Hosting.Diagnostics: Information: Request finished in 345.1019ms 200
The thread 0x32f8 has exited with code 0 (0x0).
The program '[2748] Nop.Web.exe' has exited with code 0 (0x0).


Just to add, I've upgraded this plugin (SagePay) from 2.80, through to 3.00, then 3.20, 3.90, 4.00 and also 4.20. But 4.30 is causing me headaches.. aahhhh lol

Thanks,
Craig
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.