0

I have a jQuery ajax POST that sends data to the server and immediately I get a ::ERR_CONNECTION_RESET message in the console:

POST http://www.example.com/casino/update net::ERR_CONNECTION_RESET

In the browser Network tab, the request shows this enter image description here

Request Headers:

Accept: application/json, text/javascript, */*; q=0.01 Accept-Encoding: gzip, deflate 
Accept-Language: en-US,en;q=0.9,ar;q=0.8,de;q=0.7,la;q=0.6,fr;q=0.5 Connection: keep-alive 
Content-Length: 470559 Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Cookie:__RequestVerificationToken=8Cwc2L37NPyl1F4DzZmbAWsA9hIdIVg7QvasixpkG7H1LCCLs1L9nw0x6UChMi29rmrILiPC696f5Z7L1O-L-ZaNLGXd6fCnFIc04HZ0hDs1; ai_user=lJP/J|2022-10-08T16:05:46.372Z; ai_session=6tmMv|1667568222358.7|1667569384189.9 
Host: www.example.com 
Origin: http://www.example.com 
Referer: http://www.example.com/casino/b696197f-3836-44f0-8061-8c19fbff321a/settings Request-Id: |AERzm.7NhxS 
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36 
X-Requested-With: XMLHttpRequest

There is nothing in the Preview or Reponse tabs

In the error callback, the error object contains the following:

{"readyState":0,"responseText":"","status":0,"statusText":"error"}

... so it's not very apparent what the issue is.

Here's the code

   $.ajax({
            
            url: this.action,
            type: this.method, // always POST in this case
            data: $(this).serialize(),
            dataType: "json",

            beforeSend: function () {
                toolbar.SaveButton.startLoaderIcon();
            },

            complete: function () {
                toolbar.SaveButton.stopLoaderIcon();
            },

            success: function (result) {
                toolbar.SaveButton.stopLoaderIcon();

                SettingsPage.renderResultMessages(result, "Casino", null, null);

                //update Casino Operating Systems table with saved data
                reloadCasinoOperatingSystemDataTable(result.CompatibleOperatingSystems);
                reloadTrackerLinksDataTable(result.TrackerLinks);
                reloadCasinoGameTypeDataTable(result.CasinoGameTypes);
                reloadCasinoBankingProvidersDataTable(result.CasinoBankingProviders)

            },
            error: function (error, type, httpStatus) {
                toolbar.SaveButton.stopLoaderIcon();

                var message = "The Casino was not saved because the following error occurred:<br />" + error.status + ' ' + error.statusText + ' - ' + httpStatus;
                SettingsPage.renderErrorMessage(message, "Save Error");

            }
        });

This only seems to happen to me - not to any of my users. It happens in Chrome and Firefox, so doesn't appear to be a browser issue.

Again, this only happens to me, so it can't be a server or header issue. When I debug locally on localhost:[portnumber]/... it works fine, so it does not appear to be anything to do with the app

Thanks in advance

UPDATE:

  • I tried everything described here
  • I tried deactivating all extensions in Chrome
  • I tried on two other machines on my network with success (so it's my machine!)
  • I tried turning off every feature in Norton Security and turned off Windows Defender
  • I turned off Nord VPN
  • I read about 73 SO posts that mention ERR_CONNECTION_RESET
  • I even tried in Edge!

Only remaining variable seems to be Windows 11 (the other two machines are Windows 10)

UPDATE 2: I tried Wireshark to check for network traffic and followed this turorial but it seems that a network connection is not even being established. Ajax GET requests work fine...

UPDATE 3: Uninstalled Norton Security Ultra and rebooted. Same sh**. When I view one of my photos on photos.google.com and hit SHFT+D to download it, I get "ERR_EMPTY_RESPONSE".

Adam Hey
  • 1,512
  • 1
  • 20
  • 24
  • If it only happens to you, and in multiple browsers then I'd guess it's a local network-level issue. Do you have a LAN or router based ad blocker or other network traffic monitor? Pi-hole for example. – Rory McCrossan Nov 04 '22 at 14:10
  • yeah that makes sense, but no ad blockers. No extensions whatsoever in FF. Out of interest, I tested on my old Windows 10 dev laptop and it works fine. So it's something on my Win11 machine. At least I now know it's specific to this machine and isn't a server/network issue – Adam Hey Nov 04 '22 at 15:39

1 Answers1

0

Well, it turns out the problem was Nord VPN! Even with it DISCONNECTED, it was causing the issue.

When I closed the app, things worked again. Opened the app in a disconnected state and the errors began reoccurring.

I established that it is NordVPN's "Threat Protection". When I deactivated it, things work. reactivate it, things stop working. enter image description here

Even with all of its settings deactivated, the problem persists enter image description here I had to turn it off completely for things to work

I went as far as uninstalling Norton and trying again (maybe they conflicted), but the above Nord setting still had precisely the same effect.

Maybe this is a unicorn situation. Perhaps someone else will experience it and find this useful.

Adam Hey
  • 1,512
  • 1
  • 20
  • 24