Unhandled exception. System.Exception: Method 'Void' in type from assembly does not have an implementation.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
2 anos atrás
I have made my custom payment process. The plugin is working fine on my local environment. Once I try to install it on my cloud testing environment, the application fails to start. The log shows the following:

Unhandled exception. System.Exception: Plugin 'URWAY - Redirect'. Method 'Void' in type 'Nop.Plugin.Payments.UrwayRedirect.UrwayRedirectPaymentProcessor' from assembly 'Nop.Plugin.Payments.UrwayRedirect, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.

Unable to load one or more of the requested types.
Method 'Void' in type 'Nop.Plugin.Payments.UrwayRedirect.UrwayRedirectPaymentProcessor' from assembly 'Nop.Plugin.Payments.UrwayRedirect, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.

---> System.Exception: Plugin 'URWAY - Redirect'. Method 'Void' in type 'Nop.Plugin.Payments.UrwayRedirect.UrwayRedirectPaymentProcessor' from assembly 'Nop.Plugin.Payments.UrwayRedirect, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.

---> System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.
Method 'Void' in type 'Nop.Plugin.Payments.UrwayRedirect.UrwayRedirectPaymentProcessor' from assembly 'Nop.Plugin.Payments.UrwayRedirect, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.Assembly.GetTypes()
   at Nop.Web.Framework.Infrastructure.Extensions.ApplicationPartManagerExtensions.InitializePlugins(ApplicationPartManager applicationPartManager, PluginConfig pluginConfig)
System.TypeLoadException: Method 'Void' in type 'Nop.Plugin.Payments.UrwayRedirect.UrwayRedirectPaymentProcessor' from assembly 'Nop.Plugin.Payments.UrwayRedirect, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
   --- End of inner exception stack trace ---
   at Nop.Web.Framework.Infrastructure.Extensions.ApplicationPartManagerExtensions.InitializePlugins(ApplicationPartManager applicationPartManager, PluginConfig pluginConfig)
   --- End of inner exception stack trace ---
   at Nop.Web.Framework.Infrastructure.Extensions.ApplicationPartManagerExtensions.InitializePlugins(ApplicationPartManager applicationPartManager, PluginConfig pluginConfig)
   at Nop.Web.Framework.Infrastructure.Extensions.ServiceCollectionExtensions.ConfigureApplicationServices(IServiceCollection services, WebApplicationBuilder builder)
   at Program.<Main>$(String[] args)


Any Idea what could be the issue?
2 anos atrás
adnanmasd wrote:
Unhandled exception. System.Exception: Plugin 'URWAY - Redirect'. Method 'Void' in type 'Nop.Plugin.Payments.UrwayRedirect.UrwayRedirectPaymentProcessor' from assembly 'Nop.Plugin.Payments.UrwayRedirect, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.


Do you have a method called Void
Or trying to call a method called Void
or used the reserved word void in some special / different way
2 anos atrás
No. There is no method "Void" in my class.

Actually it is working fine in my local development environment.
Could any other plugin/theme implementing this method?
2 anos atrás
What version of nopCommerce ?
If v4.5 you have implemented async methods ?

Cross check your code and calls to all methods with an exiting payment plugin
Specifically check the VoidAsync  method
i.e. public Task<VoidPaymentResult> VoidAsync(VoidPaymentRequest voidPaymentRequest)
2 anos atrás
Yes, I am using v4.50.0 locally and on my cloud server.

I have crossed checked the code and payment calls. All of them seems to be correct.
The VoidAsync method os also implemented correctly as follows:


        /// <summary>
        /// Voids a payment
        /// </summary>
        /// <param name="voidPaymentRequest">Request</param>
        /// <returns>Result</returns>
        public Task<VoidPaymentResult> VoidAsync(VoidPaymentRequest voidPaymentRequest)
        {
            var result = new VoidPaymentResult();
            result.AddError("Void method not supported");
            return Task.FromResult(result);
      }


All the methods are in async.
2 anos atrás
If it fails looking for  "Method 'Void' in type ...", then it would seem to me that the nopC version on the server is not 4.50
2 anos atrás


The server has the exact same version as in local.
Thats why I am confused.
2 anos atrás
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.