Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vouchers Plugin not working on 1.12.3 #1

Open
petzsch opened this issue Dec 26, 2023 · 2 comments
Open

Vouchers Plugin not working on 1.12.3 #1

petzsch opened this issue Dec 26, 2023 · 2 comments
Labels

Comments

@petzsch
Copy link

petzsch commented Dec 26, 2023

A user on telegram mentioned he wanted to try out the Vouchers Plugin. (got a POS device just for that).
Attempted to guide him, I reached a error 500 (blank page) and the following exception:

Hope you can help him with this. 😄

2023-12-26 16:05:03.033 +00:00 [ERR] Connection id "0HN065HDGJ8DJ", Request id "0HN065HDGJ8DJ:00000001": An unhandled exception was thrown by the application.
System.InvalidOperationException: The model item passed into the ViewDataDictionary is of type 'System.ValueTuple`2[System.String,System.String]', but this ViewDataDictionary instance requires a model item of type 'System.ValueTuple`2[System.String,BTCPayServer.Models.StoreBrandingViewModel]'.
   at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.EnsureCompatible(Object value)
   at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary..ctor(ViewDataDictionary source, Object model, Type declaredModelType)
   at lambda_method2399(Closure, ViewDataDictionary)
   at Microsoft.AspNetCore.Mvc.Razor.RazorPagePropertyActivator.Activate(Object page, ViewContext context)
   at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context)
   at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, Boolean invokeViewStarts)
   at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context)
   at Microsoft.AspNetCore.Mvc.TagHelpers.PartialTagHelper.RenderPartialViewAsync(TextWriter writer, Object model, IView view)
   at Microsoft.AspNetCore.Mvc.TagHelpers.PartialTagHelper.ProcessAsync(TagHelperContext context, TagHelperOutput output)
   at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.<RunAsync>g__Awaited|0_0(Task task, TagHelperExecutionContext executionContext, Int32 i, Int32 count)
   at AspNetCoreGeneratedDocument.Views_Voucher_Keypad.ExecuteAsync() in /build/Plugins/BTCPayServer.RockstarDev.Plugins.Vouchers/Views/Voucher/Keypad.cshtml:line 18
   at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context)
   at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, Boolean invokeViewStarts)
   at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context)
   at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode)
   at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode)
   at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ActionContext actionContext, IView view, ViewDataDictionary viewData, ITempDataDictionary tempData, String contentType, Nullable`1 statusCode)
   at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor.ExecuteAsync(ActionContext context, ViewResult result)
   at Microsoft.AspNetCore.Mvc.ViewResult.ExecuteResultAsync(ActionContext context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsync>g__Awaited|30_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at BTCPayServer.Hosting.BTCPayMiddleware.Invoke(HttpContext httpContext) in /source/BTCPayServer/Hosting/BTCpayMiddleware.cs:line 97
   at BTCPayServer.Hosting.GreenfieldMiddleware.Invoke(HttpContext httpContext) in /source/BTCPayServer/Hosting/GreenfieldMiddleware.cs:line 30
   at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
   at BTCPayServer.Hosting.HeadersOverrideMiddleware.Invoke(HttpContext httpContext) in /source/BTCPayServer/Hosting/HeadersOverrideMiddleware.cs:line 29
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
@rockstardev
Copy link
Owner

Sorry for late reply @petzsch & @dsbaars. This seems like a problem with the referenced BTCPay Server submodule not being up to date. I've bumped version there and published update of Voucher plugin. @dsbaars can now give it a try and let me know if it works for him.

@dsbaars
Copy link

dsbaars commented Jan 31, 2024

@dsbaars can now give it a try and let me know if it works for him.

Unfortunately it still doesn't. I get a similar error in the log file as was already posted:

btcpayserver-btcpayserver-1  | fail: Microsoft.AspNetCore.Server.Kestrel: Connection id "0HN12IADF7I3J", Request id "0HN12IADF7I3J:00000018": An unhandled exception was thrown by the application.
btcpayserver-btcpayserver-1  | System.InvalidOperationException: The model item passed into the ViewDataDictionary is of type 'System.ValueTuple`2[System.String,System.String]', but this ViewDataDictionary i
nstance requires a model item of type 'System.ValueTuple`2[System.String,BTCPayServer.Models.StoreBrandingViewModel]'.
btcpayserver-btcpayserver-1  |    at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary..ctor(ViewDataDictionary source, Object model, Type declaredModelType)
btcpayserver-btcpayserver-1  |    at lambda_method2441(Closure, ViewDataDictionary)
btcpayserver-btcpayserver-1  |    at Microsoft.AspNetCore.Mvc.Razor.RazorPagePropertyActivator.Activate(Object page, ViewContext context)
btcpayserver-btcpayserver-1  |    at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context)
btcpayserver-btcpayserver-1  |    at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, Boolean invokeViewStarts)
btcpayserver-btcpayserver-1  |    at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context)
btcpayserver-btcpayserver-1  |    at Microsoft.AspNetCore.Mvc.TagHelpers.PartialTagHelper.RenderPartialViewAsync(TextWriter writer, Object model, IView view)
btcpayserver-btcpayserver-1  |    at Microsoft.AspNetCore.Mvc.TagHelpers.PartialTagHelper.ProcessAsync(TagHelperContext context, TagHelperOutput output)                                                       btcpayserver-btcpayserver-1  |    at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.<RunAsync>g__Awaited|0_0(Task task, TagHelperExecutionContext executionContext, Int32 i, Int32 count)
btcpayserver-btcpayserver-1  |    at AspNetCoreGeneratedDocument.Views_Voucher_Keypad.ExecuteAsync() in /build/Plugins/BTCPayServer.RockstarDev.Plugins.Vouchers/Views/Voucher/Keypad.cshtml:line 18           btcpayserver-btcpayserver-1  |    at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context)
btcpayserver-btcpayserver-1  |    at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, Boolean invokeViewStarts)
btcpayserver-btcpayserver-1  |    at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context)
btcpayserver-btcpayserver-1  |    at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode)
btcpayserver-btcpayserver-1  |    at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode)
btcpayserver-btcpayserver-1  |    at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ActionContext actionContext, IView view, ViewDataDictionary viewData, ITempDataDictionary tempData, String
 contentType, Nullable`1 statusCode)
btcpayserver-btcpayserver-1  |    at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor.ExecuteAsync(ActionContext context, ViewResult result)
btcpayserver-btcpayserver-1  |    at Microsoft.AspNetCore.Mvc.ViewResult.ExecuteResultAsync(ActionContext context)                                                                                             btcpayserver-btcpayserver-1  |    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsync>g__Awaited|30_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask, State n
ext, Scope scope, Object state, Boolean isCompleted)
btcpayserver-btcpayserver-1  |    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context)
btcpayserver-btcpayserver-1  |    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted)                  btcpayserver-btcpayserver-1  |    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants