# Xojo.Net.HTTPSocket broken with R4

**URL:** <https://forum.xojo.com/t/xojo-net-httpsocket-broken-with-r4/46615>\
**Category:** General\
**Created:** [December 12, 2018, 6:38am UTC](https://forum.xojo.com/t/xojo-net-httpsocket-broken-with-r4/46615 "2018-12-12T06:38:23Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![StefanA](https://forum.xojo.com/user_avatar/forum.xojo.com/stefana/32/286_2.png) [@StefanA](https://forum.xojo.com/u/StefanA)\
**Post date:** [December 12, 2018, 6:38am UTC](https://forum.xojo.com/t/xojo-net-httpsocket-broken-with-r4/46615/1 "2018-12-12T06:38:23Z")

</div>

I just opened a project of us with the new R4 release.  
Something must be broken with the Xojo.Net.HTTPSocket.  
The PageReceived event is fired immediately after calling the .Send method and the content is always empty.  
Same project(s) is/are working totally fine with R3.

Is anyone else experiencing this behaviour?  
I’ll try to make a small sample project.

---

<div class="post-metadata">

**Author:** ![DerkJ](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/e495f1/32.png) [@DerkJ](https://forum.xojo.com/u/DerkJ)\
**Post date:** [December 12, 2018, 7:01am UTC](https://forum.xojo.com/t/xojo-net-httpsocket-broken-with-r4/46615/2 "2018-12-12T07:01:16Z")

</div>

I see it working on mac. Used the examples it didn’t seem to work, but it requires “https” on mac and the example uses [jsontest.com](http://jsontest.com) which server is erroring out.

It does work if you use a secure url or set the plist entry for “http”, i’ll test this later on windows too.  
You can set if the certificates must be validated or not.

If i put a MsgBox err.Reason in the error event of the socket i get this:

> [@](#):
>
> The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.

Within the example supplied by Xojo, but the examples are lacking this making it seem it isn’t working.

---

<div class="post-metadata">

**Author:** ![Greg\_O\_Lone](https://forum.xojo.com/user_avatar/forum.xojo.com/greg_o_lone/32/49_2.png) [@Greg\_O\_Lone](https://forum.xojo.com/u/Greg_O_Lone)\
**Post date:** [December 12, 2018, 10:25am UTC](https://forum.xojo.com/t/xojo-net-httpsocket-broken-with-r4/46615/3 "2018-12-12T10:25:12Z")

</div>

Have any of you noticed if this is specific to the method? I.e. GET, POST, etc…

---

<div class="post-metadata">

**Author:** ![DerkJ](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/e495f1/32.png) [@DerkJ](https://forum.xojo.com/u/DerkJ)\
**Post date:** [December 12, 2018, 10:47am UTC](https://forum.xojo.com/t/xojo-net-httpsocket-broken-with-r4/46615/4 "2018-12-12T10:47:18Z")

</div>

> [@417638:@Greg O'Lone](#):
>
> Have any of you noticed if this is specific to the method? I.e. GET, POST, etc…

Im using get or GET both working normally.  
If i catch the error() event on mac i see it requires secure connection. Xojo.net.httpsocket is this one

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [December 12, 2018, 12:05pm UTC](https://forum.xojo.com/t/xojo-net-httpsocket-broken-with-r4/46615/5 "2018-12-12T12:05:03Z")

</div>

Did you try to use [URLConnection](https://documentation.xojo.com/api/networking/urlconnection.html) instead ?

---

<div class="post-metadata">

**Author:** ![Greg\_O\_Lone](https://forum.xojo.com/user_avatar/forum.xojo.com/greg_o_lone/32/49_2.png) [@Greg\_O\_Lone](https://forum.xojo.com/u/Greg_O_Lone)\
**Post date:** [December 12, 2018, 2:08pm UTC](https://forum.xojo.com/t/xojo-net-httpsocket-broken-with-r4/46615/6 "2018-12-12T14:08:57Z")

</div>

[quote=417640:@Derk Jochems]Im using get or GET both working normally.  
If i catch the error() event on mac i see it requires secure connection. Xojo.net.httpsocket is this one[/quote]  
Right. On macOS youll need to use a secure connection or specifically add a plist entry declaring that insecure connections are okay.

---

<div class="post-metadata">

**Author:** ![StefanA](https://forum.xojo.com/user_avatar/forum.xojo.com/stefana/32/286_2.png) [@StefanA](https://forum.xojo.com/u/StefanA)\
**Post date:** [December 13, 2018, 6:04am UTC](https://forum.xojo.com/t/xojo-net-httpsocket-broken-with-r4/46615/7 "2018-12-13T06:04:19Z")

</div>

> [@417653:@Greg O'Lone](#):
>
> Right. On macOS youll need to use a secure connection or specifically add a plist entry declaring that insecure connections are okay.

I’m using Windows.

> [@417646:@Emile Schwarz](#):
>
> Did you try to use [URLConnection](https://documentation.xojo.com/api/networking/urlconnection.html) instead ?

No. I simply wanted to start our (working) project with the new R4.  
Unfortunately no time at the moment to investigate the issue further.

---

<div class="post-metadata">

**Author:** ![DerkJ](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/e495f1/32.png) [@DerkJ](https://forum.xojo.com/u/DerkJ)\
**Post date:** [December 13, 2018, 6:45am UTC](https://forum.xojo.com/t/xojo-net-httpsocket-broken-with-r4/46615/8 "2018-12-13T06:45:37Z")

</div>

[quote=417753:@Stefan Adelsberger]I’m using Windows.

No. I simply wanted to start our (working) project with the new R4.  
Unfortunately no time at the moment to investigate the issue further.[/quote]

Are you catching the error event ?

---

<div class="post-metadata">

**Author:** ![StefanA](https://forum.xojo.com/user_avatar/forum.xojo.com/stefana/32/286_2.png) [@StefanA](https://forum.xojo.com/u/StefanA)\
**Post date:** [December 13, 2018, 7:18am UTC](https://forum.xojo.com/t/xojo-net-httpsocket-broken-with-r4/46615/9 "2018-12-13T07:18:55Z")

</div>

> [@417756:@Derk Jochems](#):
>
> Are you catching the error event ?

The error event doesn’t get fired.  
After calling the Send method the PageReceived is fired immediately with HTTPStatus 200 but no content.

---

<div class="post-metadata">

**Author:** ![DerkJ](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/e495f1/32.png) [@DerkJ](https://forum.xojo.com/u/DerkJ)\
**Post date:** [December 13, 2018, 7:56am UTC](https://forum.xojo.com/t/xojo-net-httpsocket-broken-with-r4/46615/10 "2018-12-13T07:56:43Z")

</div>

[quote=417760:@Stefan Adelsberger]The error event doesn’t get fired.  
After calling the Send method the PageReceived is fired immediately with HTTPStatus 200 but no content.[/quote]

What url are you calling if i may ask?

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [December 13, 2018, 9:07am UTC](https://forum.xojo.com/t/xojo-net-httpsocket-broken-with-r4/46615/11 "2018-12-13T09:07:03Z")

</div>

> [@417753:@Stefan Adelsberger](#):
>
> No. I simply wanted to start our (working) project with the new R4.

Read the r4 release notes and you will know this is NEW in r4

[https://documentation.xojo.com/resources/release\_notes/2018r4.html](https://documentation.xojo.com/resources/release_notes/2018r4.html)

The new URLConnection class (part of API 2.0) is an updated version of HTTPSocket and Xojo.Net.HTTPSocket used for web communications  
[https://documentation.xojo.com/api/networking/urlconnection.html](https://documentation.xojo.com/api/networking/urlconnection.html)

---

<div class="post-metadata">

**Author:** ![StefanA](https://forum.xojo.com/user_avatar/forum.xojo.com/stefana/32/286_2.png) [@StefanA](https://forum.xojo.com/u/StefanA)\
**Post date:** [December 13, 2018, 12:27pm UTC](https://forum.xojo.com/t/xojo-net-httpsocket-broken-with-r4/46615/12 "2018-12-13T12:27:16Z")

</div>

> [@417769:@Emile Schwarz](#):
>
> URLConnection

I know what the new URLConnection class is but this doesn’t matter.  
The existing Xojo.Net.HTTPSocket (which I want to use) is broken with the latest R4.

---

<div class="post-metadata">

**Author:** ![Paul\_Lefebvre](https://forum.xojo.com/user_avatar/forum.xojo.com/paul_lefebvre/32/3152_2.png) [@Paul\_Lefebvre](https://forum.xojo.com/u/Paul_Lefebvre)\
**Post date:** [December 13, 2018, 2:49pm UTC](https://forum.xojo.com/t/xojo-net-httpsocket-broken-with-r4/46615/13 "2018-12-13T14:49:39Z")

</div>

> [@417790:@Stefan Adelsberger](#):
>
> The existing Xojo.Net.HTTPSocket (which I want to use) is broken with the latest R4.

Have you tried other URLs?

With Windows 10 and 2018r4, I just tried these two examples: Eddie’s Electronics Desktop and HTTPSocketGetExample. Both returned the expected information. Location JSON and a map image for Eddie’s and text/JSON for the GET example. So Xojo.Net.HTTPSocket is not broken although it is apparently not working for your situation, which is a bit unknown at this point.

If you can put together a sample project and get it into Feedback this would help with troubleshooting.

---

<div class="post-metadata">

**Author:** ![Paul\_Rodman](https://forum.xojo.com/user_avatar/forum.xojo.com/paul_rodman/32/349_2.png) [@Paul\_Rodman](https://forum.xojo.com/u/Paul_Rodman)\
**Post date:** [December 13, 2018, 4:20pm UTC](https://forum.xojo.com/t/xojo-net-httpsocket-broken-with-r4/46615/14 "2018-12-13T16:20:33Z")

</div>

My users are reporting stack overflow exceptions from those parts of my application using Xojo.net.HTTPSocket. I will be investigating today.

---

<div class="post-metadata">

**Author:** ![Ivan\_Tellez](https://forum.xojo.com/letter_avatar_proxy/v4/letter/i/a9a28c/32.png) [@Ivan\_Tellez](https://forum.xojo.com/u/Ivan_Tellez)\
**Post date:** [December 13, 2018, 4:26pm UTC](https://forum.xojo.com/t/xojo-net-httpsocket-broken-with-r4/46615/15 "2018-12-13T16:26:08Z")

</div>

> [@417828:@Paul Rodman](#):
>
> My users are reporting stack overflow exceptions from those parts of my application using Xojo.net.HTTPSocket. I will be investigating today.

Do you distribute production releases compiled with 2018r4?

---

<div class="post-metadata">

**Author:** ![Paul\_Rodman](https://forum.xojo.com/user_avatar/forum.xojo.com/paul_rodman/32/349_2.png) [@Paul\_Rodman](https://forum.xojo.com/u/Paul_Rodman)\
**Post date:** [December 13, 2018, 4:38pm UTC](https://forum.xojo.com/t/xojo-net-httpsocket-broken-with-r4/46615/16 "2018-12-13T16:38:09Z")

</div>

> [@417829:@Pedro Ivan Tellez Corella](#):
>
> Do you distribute production releases compiled with 2018r4?

Alpha releases only. Based on 18 years with Xojo, I would never do a production release based on a one day old IDE and framework. Never. Ever.

---

<div class="post-metadata">

**Author:** ![Thom\_McGrath](https://forum.xojo.com/user_avatar/forum.xojo.com/thom_mcgrath/32/192_2.png) [@Thom\_McGrath](https://forum.xojo.com/u/Thom_McGrath)\
**Post date:** [December 13, 2018, 5:04pm UTC](https://forum.xojo.com/t/xojo-net-httpsocket-broken-with-r4/46615/17 "2018-12-13T17:04:05Z")

</div>

> [@417828:@Paul Rodman](#):
>
> My users are reporting stack overflow exceptions from those parts of my application using Xojo.net.HTTPSocket. I will be investigating today.

For what it’s worth, I’m seeing lots of new Stack overflow exceptions with R4, though unrelated to Xojo.Net.HTTPSocket. At least probably unrelated. It does happen at app startup, which also does an update check. But the stack trace doesn’t mention the socket. For example, here’s the full trace of one such exception:

`RuntimeStackCheck
REALbasic.Rect.Constructor%%o<REALbasic.Rect>i8i8i8i8
EmbeddedWindowControlFinalizer
EmbeddedWindowControlFinalizer
CanvasDoubleBufferGetter
HideMouseCursor`

None of my own code in the trace. It’s not consistent, and R3 doesn’t do it either. My point is I think something isn’t quite right with R4. I’ll be skipping this release, which is unfortunate because I was intending to give URLConnection some real-world usage and get reports filed so it can get some polish for the next release.

---

<div class="post-metadata">

**Author:** ![Paul\_Rodman](https://forum.xojo.com/user_avatar/forum.xojo.com/paul_rodman/32/349_2.png) [@Paul\_Rodman](https://forum.xojo.com/u/Paul_Rodman)\
**Post date:** [December 13, 2018, 5:47pm UTC](https://forum.xojo.com/t/xojo-net-httpsocket-broken-with-r4/46615/18 "2018-12-13T17:47:24Z")

</div>

[quote=417844:@Thom McGrath]For what it’s worth, I’m seeing lots of new Stack overflow exceptions with R4, though unrelated to Xojo.Net.HTTPSocket. At least probably unrelated. It does happen at app startup, which also does an update check. But the stack trace doesn’t mention the socket.

None of my own code in the trace. It’s not consistent, and R3 doesn’t do it either. My point is I think something isn’t quite right with R4. I’ll be skipping this release, which is unfortunate because I was intending to give URLConnection some real-world usage and get reports filed so it can get some polish for the next release.[/quote]

I think I might just do likewise.

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 7:29pm UTC](https://forum.xojo.com/t/xojo-net-httpsocket-broken-with-r4/46615/19 "2020-10-29T19:29:35Z")

</div>


