Giter VIP home page Giter VIP logo

Comments (13)

ServicePal avatar ServicePal commented on June 9, 2024 1

Huge thanks to Travis for digging in. Using the enum fixed the problem for us as well. We can now test with 5.9.0

from quickbooks-v3-dotnet-sdk.

nimisha84 avatar nimisha84 commented on June 9, 2024

This seems to me like a dll hell issue. Please clean your references, do a clean solution, add the latest package n then retry. That should fix this issue.

from quickbooks-v3-dotnet-sdk.

ServicePal avatar ServicePal commented on June 9, 2024

I have checked all dll's in the bin folder. They all are all 5.8 version from ipp.Core to ipp.WebhooksService.

screen shot 2018-11-16 at 9 35 36 am

I have tried removing the package from Nuget. doing fresh install.
screen shot 2018-11-16 at 12 16 01 pm

screen shot 2018-11-16 at 12 16 24 pm

The result is the same when I deploy our build to Azure. With 5.8 we might be able to call the integration a few times, but eventually it will fail when refreshing the access token. If I redeploy our build using 5.6, it runs without interruption.

from quickbooks-v3-dotnet-sdk.

nimisha84 avatar nimisha84 commented on June 9, 2024

I pushed 5.9.0 package to Nuget. Try downloading it and see if that resolves your issues. Did you try removing the bin n debug folders too after uninstalling the package?Generally that helps.

from quickbooks-v3-dotnet-sdk.

wolfet avatar wolfet commented on June 9, 2024

I had this same issue when upgrading from 5.6.0 to 5.9.0. It looks like a bug introduced by this commit in DiscoveryClient.cs:

73ba9d6

Passing in the full URL to DiscoveryClient used to work, but it does not now:

DiscoveryClient discoveryClient = 
 new DiscoveryClient("https://developer.api.intuit.com/.well-known/openid_sandbox_configuration/");
var _discoveredEndpoint = discoveryClient.Get();

The above call returns the following error, which shows the prod route appended to the end of the passed in url:

Error connecting to https://developer.api.intuit.com/.well-known/openid_sandbox_configuration/.well-known/openid_configuration/: Not Found

Passing in the AppEnvironment enum to the DiscoveryClient constructor resolves to the correct url:

DiscoveryClient discoveryClient = new 
DiscoveryClient(Intuit.Ipp.OAuth2PlatformClient.Helpers.AppEnvironment.Sandbox);

Edit: The issue looks like it is from the linked commit adding a trailing slash to the ProdDiscoveryEndpoint and SandBoxDiscoveryEndPoint in the Discovery class.

from quickbooks-v3-dotnet-sdk.

nimisha84 avatar nimisha84 commented on June 9, 2024

Fixed in 5.9.1. The trailing slash was indeed the culprit. Thanks!

from quickbooks-v3-dotnet-sdk.

bobmanz avatar bobmanz commented on June 9, 2024

Seeing this same behavior in 7.5.0. Uninstalled and re-installed everything. Oddly, the same code in a console app (instead of my Web API app) works...

`OAuth2Client oauthClient = new OAuth2Client(clientId, clientSecret, 'https://developer.intuit.com/v2/OAuth2Playground/RedirectUrl', 'sandbox');

        var tokenResp = oauthClient.RefreshTokenAsync(refreshToken).Result;`

Value cannot be null.
Parameter name: endpoint

at Intuit.Ipp.OAuth2PlatformClient.TokenClient..ctor(String endpoint, HttpMessageHandler innerHttpMessageHandler)
at Intuit.Ipp.OAuth2PlatformClient.TokenClient..ctor(String endpoint, String clientId, String clientSecret, HttpMessageHandler innerHttpMessageHandler, AuthenticationStyle style)
at Intuit.Ipp.OAuth2PlatformClient.OAuth2Client.d__29.MoveNext()

from quickbooks-v3-dotnet-sdk.

nimisha84 avatar nimisha84 commented on June 9, 2024

7.5.0 is the SDK version that works with .Net full framework 4.6.1 or higher full frameworks.
Please make sure that you are using .Net frameworks 4.6.1 or higher.
Also, make sure that TLS1.2 is being used by your code. Enable fiddler logs.
Blog for TLS1.2 update- https://developer.intuit.com/hub/blog/2018/07/11/tls-1-0-1-1-deprecation-intuit-developers

Please follow the steps mentioned here- https://developer.intuit.com/hub/blog/2017/08/03/upgrading-your-apps-to-support-tls-1-2
to make just an http call to this url- https://tlstest.intuit.com
Code example-

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; //Add this just to be sure to use TLS1.2
var result = string.Empty;
using (var webClient = new WebClient())
{
result = webClient.DownloadString("https://tlstest.intuit.com");
}

Download Fiddler from Google and run it alongside your code to log raw requests and responses along with URL and headers to confirm that your calls are using TLS1.2 protocol. If the calls works for the url above then your QBO api sandbox/prod calls will also work once the change goes live after Dec 31st, 2017. I have also added how the fiddler logs would look like once you test your code.

When you download Fiddler, open it, go to Tools > Fiddler Option > Enable (Tick Mark) Capture HTTPS connects > Do not Enable Decrypt Https traffic (https://textslashplain.com/2015/10/12/viewing-https-handshakes-in-fiddler/). That’s it. No other setting is required. The .NET localhost is by default captured in Fiddler, so after you have enabled https traffic in Fiddler just run your code. (Fiddler should be open.) You will see requests and responses logged in Fiddler.

You should set 'decode the raw request body' by clicking on the yellow bar in Fiddler. Then go to the File menu on top, select Save all session > Save the fiddler session. A .saz file is created, which can be viewed later.

So, for checking TLS version, you need to set Do not Enable Decrypt Https traffic in fiddler.
But I would also like to see the exact request and response which is failing, so send me the logs by running youe code again with fiddler having this setting-
Enable Decrypt Https traffic in fiddler.

Another thing to check is the registry keys if something works on your machine but not on client's machine-
https://stackoverflow.com/questions/43872575/net-framework-4-6-1-not-defaulting-to-tls-1-2
http://www.excel-fsm.com/ExcelFSM.html#IssuesAnswers
@rkasaraneni20

from quickbooks-v3-dotnet-sdk.

bobmanz avatar bobmanz commented on June 9, 2024

Thanks for the quick response! The following code gives me the error:
The remote server returned an error: (503) Server Unavailable.

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; var result = string.Empty; using (var webClient = new WebClient()) { result = webClient.DownloadString("https://tlstest.intuit.com"); }

I'm running ASP.NET Web API using .NET Full Framework 4.6.1 on IIS Express.

from quickbooks-v3-dotnet-sdk.

bobmanz avatar bobmanz commented on June 9, 2024

GET https://tlstest.intuit.com/ HTTP/1.1
Host: tlstest.intuit.com

HTTP/1.1 503 Service Temporarily Unavailable
Server: awselb/2.0
Date: Fri, 14 Jun 2019 01:17:42 GMT
Content-Type: text/plain; charset=utf-8
Content-Length: 20
Connection: keep-alive

Resource Unavailable

from quickbooks-v3-dotnet-sdk.

rkasaraneni20 avatar rkasaraneni20 commented on June 9, 2024

Can you please check whether the DiscoveryURL is valid or not..

from quickbooks-v3-dotnet-sdk.

bobmanz avatar bobmanz commented on June 9, 2024

Figured it out! Saw an error in the OAuth2Client that it could not load 'System.Diagnostics.DiagnosticSource'. Installed latest System.Net.Http and it resolved the issue. Thanks!

from quickbooks-v3-dotnet-sdk.

rkasaraneni20 avatar rkasaraneni20 commented on June 9, 2024

Thats nice to hear.. Let us know if you face any issues.

from quickbooks-v3-dotnet-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.