.NET SDK v25.2.0 and 26.0.0 freeze/lock IIS/VS

When I upgraded from 25.1.0 to 26.0.0, any call to Square freezes/locks IIS and VS. I downgraded to 25.2.0 and still have the same error. I downgraded back to 25.1.0 and it worked. Some code update in 25.2.0 is crashing IIS. This is a critical problem.

Are the calls that are freezing up making it to Square? Do you see them in the API logs? :slightly_smiling_face:

Yes, the calls are making it to Square and there is a 200 response with data. When stepping through the code, the line of code that makes the call just hangs forever. I need to restart IIS/W3C to get back to normal. I’m happy to just on a Zoom to help debug. I just tried it with v27.0.0.

What’s the API call your making that’s freezing or is it every call? Also could you provide the snippet of code your seeing this behavior with and your application ID? :slightly_smiling_face:

Every API call freezes. The code and environments have not changed in a long time.

Sample Code:
try
{
SquareClient client = new SquareClient.Builder().Environment(Square.Environment.Production).AccessToken(cccessToken).Build();
var api = client.LocationsApi;
var locations = api.ListLocations().Locations;
string json = JsonConvert.SerializeObject(locations).ToStringEmptyIfNull();
return JsonConvert.DeserializeObject<FBShared.SquareLocations>(json);
}
catch (ApiException ex)
{

}
catch (Exception ex)
{

}

I just tested this with 26.0.0 and it worked as expected for me. Are you able to get our Quickstart to run as expected? :slightly_smiling_face:

Hmmm…yeah, it worked. Very weird, but good…I guess.
In my project, it works with v25.1.0, but nothing higher. All of the dependencies are correct.
Makes no sense. Any ideas? Thanks

If you remove and reinstall the dependencies does it work? :slightly_smiling_face:

Thanks, but unfortunately that didn’t work. That project has dozens of other dependencies as well. I’ll try to find time to remove them all and test it.

I know the release notes mentions API/Method updates, but there had to have been something else. Was there a dependency update? Was there a change to how Square is called from the SDK?

Thanks,
Brian

These are the updates, right? Release Version 25.2.0 · square/square-dotnet-sdk · GitHub

That’s correct. Those are the updates. :slightly_smiling_face:

Was there a resolution to this freeze/lock issue? I’m experiencing same problem with any version after v25.1.0

Still breaks for me. I need to debug more. It must have to do with config or other DLLs.

I have the exact same problem. I updated from V25.1.0 to V25.2.0 (or anything beyond) and every API call from the SDK hangs. I have the QuickStart working no problem, but my main application does not work. I have even tried to call the client.LocationsApi.ListLocationsAsync() method which needs no parameters other than the access token - no luck.

My code calls the API - I can see that in the Square logs. And I can see in the logs that the API call generated the JSON and returned it. Fiddler shows that the API HTTP call was made, and the response came back. Something happens in the SDK on my local machine where it is attempting to handle the response but never succeeds.

My main applications has dozens of other packages in it - I can’t remove them all and start adding them back one at a time to see what makes it fail.

Is there any way that I can configure Visual Studio to use the source code files when debugging so I can see what might be going on inside the Square package?

What are the other packages you have in your application? :slightly_smiling_face:

Here is the list of all packages:

Id Version


Antlr 3.5.0.2
APIMatic.Core 0.2.6
BarcodeLib 3.0.0
bootstrap 5.3.0
BouncyCastle.Cryptography 2.2.1
EntityFramework 6.4.4
jQuery 3.7.0
jQuery.UI.Combined 1.13.2
jQuery.Validation 1.19.5
MailKit 4.1.0
Microsoft.AspNet.Identity.Core 2.2.3
Microsoft.AspNet.Identity.EntityFramework 2.2.3
Microsoft.AspNet.Identity.Owin 2.2.3
Microsoft.AspNet.Mvc 5.2.9
Microsoft.AspNet.Razor 3.2.9
Microsoft.AspNet.Web.Optimization 1.1.3
Microsoft.AspNet.WebPages 3.2.9
Microsoft.Bcl.AsyncInterfaces 7.0.0
Microsoft.Bcl.HashCode 1.1.1
Microsoft.CodeDom.Providers.DotNetCompilerPlatform 4.1.0
Microsoft.CSharp 4.7.0
Microsoft.jQuery.Unobtrusive.Ajax 3.2.6
Microsoft.jQuery.Unobtrusive.Validation 4.0.0
Microsoft.Json.Pointer 2.3.0
Microsoft.Owin 4.2.2
Microsoft.Owin.Host.SystemWeb 4.2.2
Microsoft.Owin.Security 4.2.2
Microsoft.Owin.Security.Cookies 4.2.2
Microsoft.Owin.Security.Google 4.2.2
Microsoft.Owin.Security.OAuth 4.2.2
Microsoft.Web.Infrastructure 2.0.0
MimeKit 4.1.0
Modernizr 2.8.3
Newtonsoft.Json 13.0.3
Owin 1.0.0
Polly 7.2.4
popper.js 1.16.1
Portable.BouncyCastle 1.9.0
QRCoder 1.4.3
SkiaSharp 2.88.3
SkiaSharp.NativeAssets.macOS 2.88.3
SkiaSharp.NativeAssets.Win32 2.88.3
Square 28.0.1
System.Buffers 4.5.1
System.Collections.Immutable 7.0.0
System.Drawing.Common 7.0.0
System.Formats.Asn1 7.0.0
System.Memory 4.5.5
System.Numerics.Vectors 4.5.0
System.Resources.Extensions 7.0.0
System.Runtime.CompilerServices.Unsafe 6.0.0
System.Text.Encoding.CodePages 7.0.0
System.Text.Encodings.Web 7.0.0
System.Text.Json 7.0.3
System.Threading.Tasks.Extensions 4.5.4
System.ValueTuple 4.5.0
WebGrease 1.6.0

Hi @dseib, @brianpautsch @Merino (and anyone else running into this problem)

We are working to reproduce and figure out the issue you are running into - if you can, please follow these instructions to create a .DMP file.

With this we will be able to analyze the process dump to check the state and line of code where it’s getting stuck.

Once the .DMP file is created, please start a direct message with me, and upload it in that chat. If that doesn’t work, please let me know and we can figure out another way to send the file over.

Thank you :slight_smile:

Jordan

Hi @Jordan-Square was there ever a resolution to this issue?
We have exactly the same issue, upgrading from 25.1.0 to 26.0.0, any call to Square freezes/locks IIS and VS.
I can create a blank web project with nothing in it except the Square API, debug the application in localhost, make any call to Square and it freezes.
If I use a Windows Console Application upgrading from 25.1.0 to 26.0.0 and above it works correctly so suggests this is some issue running the API on a local web server.
Just an assumption but the library APIMatic.Core was used in the upgrade from 25.1.0 to 26.0.0, could it be something to do with this library?

hi @pauld

We don’t have a solution yet as we are still waiting to get more information from users that are having this issue.

Definitely seems like the APIMatic.Core library is culprit here.

If possible can you follow the instructions in my previous message to create .DMP file while running the code that freezes?

Another possibility is if you can push that blank repo where you have the code freezing to github so we can clone and try and reproduce as well.

Hi @Jordan-Square

It is just a blank web project with the Square library but here is a link to the zip of the project:

I removed our Access Token from the appsettings file but I can message it if needed.

Will look to get the .DMP file as well.