Xojo.Net.HTTPSocket broken with R4

  1. 3 months ago

    Stefan A

    is not verified Dec 11 Pre-Release Testers, Xojo Pro Austria, Tirol
    Edited 3 months ago

    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.

  2. Derk J

    Dec 11 Pre-Release Testers, Xojo Pro
    Edited 3 months ago

    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 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.

  3. Greg O

    Dec 12 Xojo Inc

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

  4. Derk J

    Dec 12 Pre-Release Testers, Xojo Pro

    @Greg OLone 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

  5. Emile S

    Dec 12 Europe (France, Strasbourg)

    Did you try to use URLConnection instead ?

  6. Greg O

    Dec 12 Xojo Inc

    @Derk J 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

    Right. On macOS you’ll need to use a secure connection or specifically add a plist entry declaring that insecure connections are okay.

  7. Stefan A

    is not verified Dec 12 Pre-Release Testers, Xojo Pro Austria, Tirol

    @Greg OLone 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.

    @Emile S Did you try to use URLConnection 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.

  8. Derk J

    Dec 12 Pre-Release Testers, Xojo Pro

    @StefanAdelsberger 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.

    Are you catching the error event ?

  9. Stefan A

    is not verified Dec 12 Pre-Release Testers, Xojo Pro Austria, Tirol

    @Derk J 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.

  10. Derk J

    Dec 12 Pre-Release Testers, Xojo Pro

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

    What url are you calling if i may ask?

  11. Emile S

    Dec 13 Europe (France, Strasbourg)

    @StefanAdelsberger 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://docs.xojo.com/Resources:2018r4_Release_Notes

    The new URLConnection class (part of API 2.0) is an updated version of HTTPSocket and Xojo.Net.HTTPSocket used for web communications
    https://docs.xojo.com/URLConnection

  12. Stefan A

    is not verified Dec 13 Pre-Release Testers, Xojo Pro Austria, Tirol

    @Emile S 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.

  13. Paul L

    Dec 13 Xojo Inc http://docs.xojo.com

    @StefanAdelsberger 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.

  14. Paul R

    Dec 13 Pre-Release Testers, Xojo Pro Kirkland, WA

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

  15. Ivan T

    Dec 13 Pre-Release Testers

    @Paul R 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?

  16. Paul R

    Dec 13 Pre-Release Testers, Xojo Pro Kirkland, WA

    @Pedro I;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.

  17. Thom M

    Dec 13 Pre-Release Testers Greater Hartford Area, CT

    @Paul R 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.

  18. Paul R

    Dec 13 Pre-Release Testers, Xojo Pro Kirkland, WA

    @Thom M 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.

    I think I might just do likewise.

or Sign Up to reply!