Upgrade to QbSync 2.3.0 causes MissingMethodException
Closed this issue · 8 comments
Setup
Visual Studio Version: 16.8.5
Project .NET Version: 5.0.3
QbSync.QbXml Version 2.3.0
QbSync.WebConnector.AspNetCore: 2.0.2
Issue
When using QbSync.QbXml version 2.2.0, all steps complete without issue. However, when upgrading to version 2.3.0 (using NuGet package manager), the following error is observed on the first step. Please note the followoing:
- Authentication works flawlessly and we are getting to the first step.
- This first step is a simple AccountQuery type.
- The returned XML observed in the debugger looks fine, aka, Quickbooks is returning the proper response.
- The only way I could seem to get insight into this issue was wrapping the base.ReceiveXMLAsync call in a try/catch.
Request Code
public class Request : StepQueryRequestBase<AccountQueryRqType>
{
public override string Name => StepName;
///This only exists to ensure we are sending good XML during testing of the 2.3.0 issue
public override async Task<string> SendXMLAsync(IAuthenticatedTicket authenticatedTicket)
{
var results = await base.SendXMLAsync(authenticatedTicket);
return results;
}
protected override Task<bool> ExecuteRequestAsync(IAuthenticatedTicket ticket, AccountQueryRqType request)
{
request.ActiveStatus = ActiveStatus.All;
request.metaData = AccountQueryRqTypeMetaData.NoMetaData;
request.IncludeRetElement = new []
{
nameof(AccountRet.ListID),
nameof(AccountRet.EditSequence),
nameof(AccountRet.Name),
nameof(AccountRet.FullName),
nameof(AccountRet.AccountType),
nameof(AccountRet.SpecialAccountType),
nameof(AccountRet.AccountNumber)
};
return base.ExecuteRequestAsync(ticket, request);
}
}
The response class' ExecuteResponseAsync
is never called in this scenario.
I don't mind keeping our solution at version 2.2.0, but if I am implementing something incorrectly, I want to ensure I am not version locked here going forward.
Thanks for an awesome project
Can you include the callstack?
It seems that this update
58e479f#diff-be127370af13f6eabf6f607e4bb054334e9bdbda6c96a14482610dff0ab1b7e6R72
Does not work well with the update of only the QbXml
.
If I update the WebConnector project to another version, could you try a private nuget?
No problem, I think here is what you are looking for
at QbSync.WebConnector.Impl.StepQueryResponseBase`1.<ReceiveXMLAsync>d__3.MoveNext()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
at QbSync.WebConnector.Impl.StepQueryResponseBase`1.ReceiveXMLAsync(IAuthenticatedTicket authenticatedTicket, String response, String hresult, String message)
at DR.Quickbooks.Steps.AccountQuery.Response.<>n__0(IAuthenticatedTicket authenticatedTicket, String response, String hresult, String message)
at DR.Quickbooks.Steps.AccountQuery.Response.<ReceiveXMLAsync>d__5.MoveNext() in C:\Development\DMS\src\DR.Quickbooks\Steps\AccountQuery.cs:line 64
Yeah, I should be able to, though I've never used a private NuGet :)
The 2 nuget packages here are only a recompilation of the current code. If it doesn't work, I'll force the parameters.
http://www.jsgoupil.com/temp/QbSync.WebConnector.2.0.2-alpha1.nupkg
http://www.jsgoupil.com/temp/QbSync.WebConnector.AspNetCore.2.0.3-alpha1.nupkg
And here are the forced parameters
http://www.jsgoupil.com/temp/QbSync.WebConnector.2.0.2-alpha2.nupkg
http://www.jsgoupil.com/temp/QbSync.WebConnector.AspNetCore.2.0.3-alpha2.nupkg
Let me know if the alpha1 works, and if it doesn't try the alpha2.
If it works, I'll push the code, if it doesn't we will have to investigate further!
Installing the alpha-1 packages worked flawlessly! I'll downgrade back to the release versions until you all are able to push an official update. Thanks for the quick response and help! Since I didn't support via fork/pull request, do you have a donate link by chance?
That means the QbXml was a breaking change, I didn't notice :(
I'll upgrade this one right now.
Here we go. It's listed.
Thanks @tommytayman for testing all of this and reporting a thorough bug report!