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

System.MissingMethodException with latest RestSharp client #513

Closed
yosefmah opened this issue May 23, 2024 · 6 comments
Closed

System.MissingMethodException with latest RestSharp client #513

yosefmah opened this issue May 23, 2024 · 6 comments

Comments

@yosefmah
Copy link

SDK you're using (please complete the following information):

  • Version 5.0.0

Describe the bug
After upgrading to the latest version of Restsharp v111.0.0, the library the API calls result in an error as shown below. Downgrading back to 110.2 results in working successfully again.

To Reproduce
Steps to reproduce the behavior:

  1. Upgrade to latest release of Restsharp in project.
  2. Call the GetInvoices method

Expected behavior
Would expect the method to return a list of invoices.

Error:

Unhandled exception. System.AggregateException: One or more errors occurred. (Method not found: 'Void RestSharp.RestRequest.set_Timeout(Int32)'.)
 ---> System.MissingMethodException: Method not found: 'Void RestSharp.RestRequest.set_Timeout(Int32)'.
   at Xero.NetStandard.OAuth2.Client.ApiClient.newRequest(HttpMethod method, String path, RequestOptions options, IReadableConfiguration configuration)
   at Xero.NetStandard.OAuth2.Client.ApiClient.GetAsync[T](String path, RequestOptions options, IReadableConfiguration configuration, CancellationToken cancellationToken)
   at Xero.NetStandard.OAuth2.Api.AccountingApi.GetInvoicesAsyncWithHttpInfo(String accessToken, String xeroTenantId, Nullable`1 ifModifiedSince, String where, String order, List`1 iDs, List`1 invoiceNumbers, List`1 contactIDs, List`1 statuses, Nullable`1 page, Nullable`1 includeArchived, Nullable`1 createdByMyApp, Nullable`1 unitdp, Nullable`1 summaryOnly, CancellationToken cancellationToken)
   at Xero.NetStandard.OAuth2.Api.AccountingApi.GetInvoicesAsync(String accessToken, String xeroTenantId, Nullable`1 ifModifiedSince, String where, String order, List`1 iDs, List`1 invoiceNumbers, List`1 contactIDs, List`1 statuses, Nullable`1 page, Nullable`1 includeArchived, Nullable`1 createdByMyApp, Nullable`1 unitdp, Nullable`1 summaryOnly, CancellationToken cancellationToken)
Copy link

PETOSS-425

@yosefmah yosefmah changed the title System.MissingMethodException with latest ReshSharp client System.MissingMethodException with latest RestSharp client May 23, 2024
Copy link

Thanks for raising an issue, a ticket has been created to track your request

@DevelopmentDan
Copy link

This is generally an issue with this API - it uses a lot of NuGet packages, that if we try to update to the latest version it breaks the Xero API. I ran into this problem too today.

The versions of Microsoft.IdentityModel.JsonWebTokens, System.IdentityModel.Tokens.Jwt used by Xero both have vulnerabilities.

@Skintkingle
Copy link

Is there any news on this? I can see a reasonable fix has an open PR for this and this is stopping us from removing package vulnerabilities as well.

@Noisome6565
Copy link

Any update on this would be much appreciated

@sangeet-joy-tw
Copy link
Contributor

Hey @yosefmah,

We have replaced RestSharp with core httpClient library in our new Dotnet SDK version 9.0.0

Please install the latest version and hopefully RestSharp issue will not occur anymore.

Closing this card for now as this card was particularly for Restsharp issue.

Please feel free to raise separate issue cards for other vulnerabilities.

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

Successfully merging a pull request may close this issue.

5 participants