URLConnection silent fail in app built with 2025r2

Before I raise a new issue on this, I just thought I’d check if I’m missing something here…

I have a console app which downloads a file asynchronously with a URLConnection object and waits until completion or an error before proceeding. It works fine in the last built version of the app which was done with Xojo 2024r2.

Testing the same code without any changes in the 2025r2 IDE works as expected. However, in the built app nothing happens when the download attempt is made. No events, no exceptions, it doesn’t even cancel after the timeout value is reached. As a result, the app waits indefinitely for something that never occurs and can’t proceed.

I can only assume something must have changed in the Xojo framework since 2024, however I’m at a loss to explain why it works in the IDE but not the built app? Also means the debugger is no help here

Anyone have any bright ideas to track down what might be causing this?

Try to download your file using the example shared with Xojo (Examples folder).

The URL’s are not static and are generated on-the-fly so not really something I can use the example to test. However, my code is pretty much doing the exact same thing as the example, it’s really just a simple GET call to download a file.

I have been doing some further testing and I managed to get it working, but only by going back to using the now deprecated HTTPSecureSocket. Not ideal for the future but at least it’s functioning.

If any of the Xojo devs happen to read this then I’d be interested to know if there were any changes to the underlying code of the URLConnection class between 2024r2 and 2025r2?

you do a loop with calling DoEvents?

Yes, it is a console app. I use a subclassed URLConnection and a DoEvents loop so I can print the progress of the download something like this…

dim u as New FileDownloader // this is a subclassed URLConnection
u.Send("GET",url,targetFile,10)
Do Until u.isFinished // custom property set in the ContentReceived or Error events
  App.DoEvents(100)
  Print "Download Progress "+u.percentComplete.ToString // percentComplete is set in the ReceivingProgressed event
Loop
// Continue here once finished