-
Content Count
181 -
Joined
-
Last visited
Everything posted by softtouch
-
Indy with macOS crash with socket error #53 and #61, unable to catch
softtouch posted a topic in Network, Cloud and Web
I use TIdHTTP to read some websites. The TIdHTTP.get is within a try/except block. I am not able to catch the 2 exceptions: Socket error # 53, Software cause connection abort and Socket error # 61, Connection refused. It does not happen on my machine, but on some client computer. It also does not happen when compiling the program for Windows. All I have is this in the stack trace: Idstack::TIdStack::RaiseLastSocketError() + 62 Idstack::TIdStack::CheckForSocketError(int) + 33 Idstackvclposix::TIdStackVCLPosix::Connect(int, System::UnicodeString, unsigned short, Idglobal::TIdIPVersion) + 233 Idsockethandle::TIdSocketHandle::Connect() + 44 Idiohandlerstack::TIdConnectThread::Execute() + 28 The exception is ok, but why cant I catch this so that the program can show an error and continue running instead of just crashing? The call to TIdHTTP.get is in try/except similar this: id:=TIdHttp.create(nil); try val:=id.get(url); except on e: Exception do begin end; end; id.free; -
Thats it! It works now! Thanks.
-
Should the 11.3 be compatible to macos sdk 13.1? I at least cant use that sdk, I get [dccosx64 Error] E2597 ld: file not found: /System/Library/PrivateFrameworks/AVFCapture.framework/Versions/A/AVFCapture for architecture x86_64 but it compiles and links fine with the 11.1 sdk
-
Thanks, so I am not alone with that.
-
With Windows 11 and Delphi dpi aware? I can reproduce that every time I want.
-
Why would I buy a new monitor? I have a 43" 4K monitor, which is new.
-
I tried that already, to no avail. But what works for now is to move all the toolbars to the main menu line.
-
I already did. But that wont help me now. I guess I have to go back to 11.2 for now.
-
DPI aware. With dpi unaware, they stay where they should be.
-
My toolbar problems (see 3 posts above) appear to exist only with a monitor scaling between 124% and 130%. Below or above its ok. Any suggestion hos this can be patched? Makes working a little hard.
-
Delphi 11.3 always rearrange its toolbars with every start. The first attached image shows how it should look after I move them to their positions, the second image shows what Delphi 11.3 makes out of it. With every restart of the IDE, I have to rearrange the top toolbars 😞 I am using a 4K monitor with a scaling of 125%. When I use Delphi DPI unaware, it stays always the same, when I use a monitor scaling of 100%, it always stays the same, but when I use a monitor scaling of 125% on my 4K display, it rearrange the toolbars. That did not happen in any version below 11.3 (11.0, 11.1, 11.2).
-
Is there a single function to retrieve the path to the Desktop which works on Windows and macOS?
-
Yes, that seems to be the only way at the moment. Thanks for that!
-
I am trying to figure out hot to make a screenshot via code of the own app when running on macOS, but could not find a solution. Does anybody here has a clue for me? Windows is no problem, just macOS cause headache.
-
I will play with it, thanks. Edit: Tested and works just fine 🙂
-
Thanks, I thought there might be a single function somewhere in IOUtils, but apparently not. All other path are available via IOUtils, just the desktop path not.
-
Is there any way to detect that the webview2 runtime is installed on the target system?
-
For macos, I tried Indy, which need openssl, and does not seem to work with newer openssl libs or tls 1.3, or even with the systems ssl implementation. I also tried using THttpClient, which works but crash on mac when trying to set a proxy. There is also stated that it will always use the system proxy. I need to use public and private proxies, multiple requests, each request has to use another proxy. Does anybody know any 3rd. party component that can use ssl without the need of openssl, and can set individual proxies for each request?
-
Cross platform HTTP client with proxy support?
softtouch replied to softtouch's topic in Network, Cloud and Web
I could provide a private proxy if needed. I can also provide the small test program. When I set the proxy with h.ProxySettings := TProxySettings.Create(<IP>,<PORT>,<USER>,<PASS>); it will call the procedure TMacHTTPClient.SetMacProxySettings in System.Net.HTTPClient.Mac, which calls various functions like "LDict.setValue(TNSNumber.OCClass.numberWithInt(1), kCFNetworkProxiesHTTPEnable);", but all the calls to kCFNetworkProxiesHTTPEnable and other "kCFNetworkProxies..." return always an empty string, causing somehow the app to crash. -
Cross platform HTTP client with proxy support?
softtouch replied to softtouch's topic in Network, Cloud and Web
I tried both variations, both crash at the same line. Even setting a proxy would not work on macOS, it still should not crash the program. I used this same code already on older macOS versions, and there was no crash. Possible macOS 13.x cause it, I have no clue and also cant spend much time to investigate this, I just need to find a working component which works under Windows and macOS target, not using openssl. -
Cross platform HTTP client with proxy support?
softtouch replied to softtouch's topic in Network, Cloud and Web
The example code is just the smallest possible code causing the crash. The moment I set a proxy, it crash in the code seen in the screenshot there in System.Net.HttpClient.Mac, thats why I cant use THttpClient, even I would like to (because of the ssl thing). -
Cross platform HTTP client with proxy support?
softtouch replied to softtouch's topic in Network, Cloud and Web
@esegece your post is unrelated to my request of a 3rd party component that works without openssl on macos. -
Cross platform HTTP client with proxy support?
softtouch replied to softtouch's topic in Network, Cloud and Web
Unfortunately, I cannot get that to work with macOS/Cross platform and it seems to use also openssl. -
The following code (compiled under Delphi 11.2, target macOS 64 bit, macOS is Ventura 13, sdk is 13.1) h:=THTTPClient.Create; h.ProxySettings.Create(<IP>,<PORT>,<USER>,<PASS>); h.Get(<URL>); h.Free; works fine on Windows 32 and 64 bit target, and it use the proxy. With macOS target, it trigger an exception class 6. The exception happen in System.Net.HTTPClient.Mac, see attached image. What am I doing wrong?
-
Delphi 11.2 - Unable to use proxy with macOS target
softtouch replied to softtouch's topic in Cross-platform
That sounds bad. I thought that was fixed in 10.4. At leat, it should not crash the app... Is there any other http client out there which works with Windows and macOS and does not relay openssl libs? I need to do GET, HEAD, POST, and all by using various proxies, multithreaded.