koenigs wrote:Hello guys,
This is the first time ever I'm trying copCommerce so I don't know if I'm doing anything wrong.
I get an error when installing nopCommerce.
I specify the MySQL connection string
Server=localhost;Database=nop_commerce;Uid=nop_user;Pwd=nop_password;
But I get the following error
"
Setup failed: Fatal error encountered during command execution."
How to get past this issue? The connection string is correct because I can see in MySQL Workbench all the nopCommerce tables are created in the schema...
I was running nopCommerce from Visual Studio but I can see no error message in the console when doing that...
mysql Ver 8.0.19 for Win64 on x86_64 (MySQL Community Server - GPL)
Thanks a lot
EDIT: It's not even working with the
root user...
OK so I narrowed down the problem but I couldn't find how to fix it.
It seems the
WebHelper.RestartAppDomain() method isn't working as expected.
If debugging
Nop.Web in console mode it just doesn't work and therefore in the
InstallController when redirecting to the homepage, the
DataSettingsManager._databaseIsInstalled field is still equal to
false so the application just redirects back to the
/install page...
The workaround is simply to manually stop and restart the application so
DataSettingsManager._databaseIsInstalled gets the correct value
true.
If debugging with IIS Express the story is different, the application just completely stops.
Here is what I get in the Debug output in VS
Exception thrown: 'System.Exception' in Nop.Web.Framework.dll
The thread 0x4e10 has exited with code 0 (0x0).
Microsoft.Hosting.Lifetime: Information: Application is shutting down...
Microsoft.AspNetCore.Mvc.RedirectToRouteResult: Information: Executing RedirectToRouteResult, redirecting to / from route Homepage.
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker: Information: Executed action Nop.Web.Controllers.InstallController.Index (Nop.Web) in 51411.4063ms
Microsoft.AspNetCore.Routing.EndpointMiddleware: Information: Executed endpoint 'Nop.Web.Controllers.InstallController.Index (Nop.Web)'
Microsoft.AspNetCore.Hosting.Diagnostics: Information: Request finished in 51495.5081ms 302
The thread 0x7be4 has exited with code 0 (0x0).
The program '[20428] iisexpress.exe' has exited with code 0 (0x0).
I couldn't find how to properly implement a restart, everywhere the internet says to use
IHostApplicationLifetime.StopApplication() but this just does what it says, it stops the application but doesn't restart it...
WebHelper.RestartAppDomain is also referenced in the
PluginController and the
CommonController so the bug isn't only located in the
InstallControllerI hope with all this information this will finally be considered as a bug by the NopCommerce team.
Thanks guys for your work!
Sorry I couldn't go further and fix this issue