Troubles with the Nop.Plugin.Payments.Robocassa plug-in

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 years ago
Hi,

I have compiled the Robocassa plug-in against the 2.60 version and uploaded it on the server. I have copied the Views folder as well. When trying to configure the plug-in I get the Null Ref exception being thrown. Please advice.

Server Error in '/' Application.

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:


Line 12: @if (!String.IsNullOrEmpty(Model.ConfigurationActionName))
Line 13: {
Line 14:     @Html.Action(Model.ConfigurationActionName, Model.ConfigurationControllerName, Model.ConfigurationRouteValues);
Line 15: }
Line 16: else

Source File: d:\hostingspaces\z2484321\stester.ru\wwwroot\Administration\Views\Payment\ConfigureMethod.cshtml    Line: 14

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   Nop.Plugin.Payments.Robocassa.Controllers.PaymentRobocassaController.Configure() +179
   lambda_method(Closure , ControllerBase , Object[] ) +62
   System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +17
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +208
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +27
   System.Web.Mvc.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() +55
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +263
   System.Web.Mvc.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14() +19
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +191
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +343
   System.Web.Mvc.Controller.ExecuteCore() +116
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +97
   System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10
   System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +37
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +21
   System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +12
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
   System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +50
   System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) +7
   System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +22
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +60
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
   System.Web.Mvc.<>c__DisplayClassa.<EndProcessRequest>b__9() +23
   System.Web.Mvc.<>c__DisplayClass4.<Wrap>b__3() +12
   System.Web.Mvc.ServerExecuteHttpHandlerWrapper.Wrap(Func`1 func) +38
   System.Web.Mvc.ServerExecuteHttpHandlerWrapper.Wrap(Action action) +65
   System.Web.Mvc.ServerExecuteHttpHandlerAsyncWrapper.EndProcessRequest(IAsyncResult result) +71
   System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride) +1072

[HttpException (0x80004005): Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'.]
   System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride) +3050063
   System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage) +77
   System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm) +28
   System.Web.HttpServerUtilityWrapper.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm) +22
   System.Web.Mvc.Html.ChildActionExtensions.ActionHelper(HtmlHelper htmlHelper, String actionName, String controllerName, RouteValueDictionary routeValues, TextWriter textWriter) +497
   System.Web.Mvc.Html.ChildActionExtensions.Action(HtmlHelper htmlHelper, String actionName, String controllerName, RouteValueDictionary routeValues) +88
   ASP._Page_Administration_Views_Payment_ConfigureMethod_cshtml.Execute() in d:\hostingspaces\z2484321\stester.ru\wwwroot\Administration\Views\Payment\ConfigureMethod.cshtml:14
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +207
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +81
   System.Web.WebPages.StartPage.RunPage() +19
   System.Web.WebPages.StartPage.ExecutePageHierarchy() +65
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +76
   System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +220
   System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +115
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +303
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +13
   System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +23
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +260
   System.Web.Mvc.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b() +19
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +260
   System.Web.Mvc.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b() +19
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +177
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +343
   System.Web.Mvc.Controller.ExecuteCore() +116
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +97
   System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10
   System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +37
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +21
   System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +12
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
   System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +50
   System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) +7
   System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +22
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +60
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8970061
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184
11 years ago
There's no need to copy the Views folder. Just ensure that all appropriate cshtml files are marked as embedded.
11 years ago
Thanks, Andrei,

But everything seems set correctly. Here is the screenshot - http://dropi.ru/ddh.png
11 years ago
Try clearing your "Temporary ASP.NET Files" directory. It should work fine out of the box
11 years ago
Thanks, will ask my host support to do that.
11 years ago
Unfortunately, this did not help.

The first time I compiled the plug-in, I've manually created a folder inside the NC Plugins folder and copied the dll and pdb files from the obj\Debug folder. Then, in the Admin panel, I refreshed the plug-ins list and installed the mentioned Robocassa plug-in. It was installed without error, but clicking the Configure button throws an exception.

Then, I've tried to copy the output folder that was generated after the project compile (didn't noticed that the first time). But, this does not work as well. I still get a null reference exception. Any ideas?
11 years ago
Megazoid wrote:
I've manually created a folder inside the NC Plugins folder and copied the dll and pdb files from the obj\Debug folder

Copying it from obj/Debug folder is not the best of doing it. Follow the next steps:
1. Attach the project to the solution ("Plugins" solution directory).
2. Compile the project
3. Copy the the output directory (\Presentation\Nop.Web\Plugins\{PluginFolder}) to your server.

But I'm not sure that it'll help. Does it work on your local computer when running from Visual Studio?

If you're experiencing some issues with getting the deployable plugin package, please contact the plugin author to compile it for you and include in the package
11 years ago
Hi Andrei,

When I compiled the plug-in following your steps, I've got much more files in the output "Presentation\Nop.Web\Plugins\Payments.Robocassa\" folder. Here they are:

de
es
fr
it
nl
pl
pt
ru
sv
Autofac.dll
Autofac.Integration.Mvc.dll
Autofac.xml
Description.txt
EntityFramework.dll
EntityFramework.xml
EPPlus.dll
EPPlus.xml
FluentValidation.dll
FluentValidation.pdb
FluentValidation.xml
itextsharp.dll
Nop.Core.dll
Nop.Core.pdb
Nop.Data.dll
Nop.Data.pdb
Nop.Plugin.Payments.Robocassa.dll
Nop.Plugin.Payments.Robocassa.pdb
Nop.Services.dll
Nop.Services.pdb
Nop.Web.Framework.dll
Nop.Web.Framework.pdb
Recaptcha.dll
Recaptcha.pdb
System.Data.SqlServerCe.dll
Telerik.Web.Mvc.dll

I've copied everything in the Plug-in folder, reinstalled the plug-in via Admin panel, and I still get the same NullRef exception.

>>> Does it work on your local computer when running from Visual Studio?

I get the "Operation could destabilize runtime" error

Yes, I have Visual Studio 2012 installed and I know that you have fixed it in 2.65, but I use 2.60.

I'm going to contact the author about this issue. Thank you for your help!
11 years ago
These files should not be copied. Make sure "Copy local" properties of all third-party assembly references are set to "False" (do not copy) as written here

Megazoid wrote:
>>> Does it work on your local computer when running from Visual Studio?

I haven't tested it

Megazoid wrote:
I get the "Operation could destabilize runtime" error - http://dropi.ru/ffh.png
4
Replace all referenced of FluentValidation with new version as described here
11 years ago
Hi Andrei,

[quote]Replace all referenced of FluentValidation with new version as described here[/quote]

I'm getting closer. After I have replaced the FluentValidation assembly with the latest versuin, I tried to run the project from inside Visual Studio. I have installed it using a local database on my machine. However, when I login with an admin e-mail, I can not get inside the Admin Area. If I try to set the Nop.Admin project as a Start-up project, it simply opens the nopcommerce.com site. How do I test the plug-in locally?

I've contacted the author via his e-mail (info @ sunrize-r. ru) but he didn't respond yet.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.