What could make CurlSMBS work in a debug build but stall in a real build?

For an app using kaju that’s also using CurlS(Multi)MBS for server access, I changed kaju to use curl too because it wasn’t reliable with URLConnection in the built app.
As it turns out now, it wasn’t URLConnection’s fault as I thought. The same happens with curl now too: If an update check is being run (using performMulti to be as fast as possible, but not in a thread), it will return within a zip.
In the built app, the last message I see is “Checking for updates” but no result nor error which should be checked for (I set a OptionTimeout of 60). Any ideas what could stall a transmission under these circumstances?

EDIT: Might be important to state that the app itself is not stuck. Just as if the rest of the update check method was skipped.

Well, our class has events for debug messages and progress events.
You could log these to a text file and watch messages while the transfer happens.

Thank you, and so I am doing. Forgot to say this is a Windows exclusive specialty. On macOS it’s working perfectly.
I routed the request now to the CurlSMultiMBS where all the debugging is done, and nothing happens in the build – no log. Other curls are working on the same Multi object.

And another fact I found it will work when the app is run with elevated user privileges. Otherwise the update check curl will not even be added to the curlSMultiMBS – no entry in log and no clue what’s happening to it.

Hier der stark gekürzte Debug-Verlauf im Debugbuild (oder Admin-mode):
Datum Ereignis Gerät Geräte-ID Ebene

“02.02.25, 16:18:19.770” “App Start” app 1.0b94 Debug
“02.02.25, 16:18:19.772” “Windows 32 Bit” System Architecture Debug
“02.02.25, 16:18:19.774” “Windows 10 (Build 19045)” System OS Debug
“02.02.25, 16:18:19.775” “4 cores” System CPUs Debug
“02.02.25, 16:18:19.775” “Intel(R) Core™ i7-4790K CPU @ 4.00GHz” System CPU manufacturer Debug
“02.02.25, 16:18:19.777” “4132 MB” System Available RAM Debug
“02.02.25, 16:18:19.777” “8173 MB” System Physical RAM Debug
“02.02.25, 16:18:19.778” “47 MB” App Used RAM Debug
“02.02.25, 16:18:19.778” “125” App Objects Debug
“02.02.25, 16:18:19.798” “Not in admin mode. Cannot run updater fully.” kaju kaju Warnung
“02.02.25, 16:18:20.271” “Verbinde mit lokaler Datenbank” db Debug
“02.02.25, 16:18:20.275” “Lokale Datenbank ist verbunden.” db Erfolg
“02.02.25, 16:18:20.278” “Decryption result: 0” db Erfolg
“02.02.25, 16:18:20.281” “Database Version” db 7 Debug
“02.02.25, 16:18:22.766” “MBS Xojo Plugins 25.0 with CURL 8.11.1 on Windows.” curl news Debug
“02.02.25, 16:18:22.767” “URL: https://api.xxx.com/admin/common/news” curl news Debug
“02.02.25, 16:18:22.767” “added to send queue” curl news Debug
“02.02.25, 16:18:22.768” “Checking for Updates” kaju kaju Debug
“02.02.25, 16:18:23.309” “MBS Xojo Plugins 25.0 with CURL 8.11.1 on Windows.” curl UpdateCheck Debug
“02.02.25, 16:18:23.309” “URL: https://api.xxx.com/json/halo_Updates/UpdateInformation.json” curl UpdateCheck Debug
“02.02.25, 16:18:23.310” “added to send queue” curl UpdateCheck Debug
“02.02.25, 16:18:24.581” “Curl progress: 0” HarmonyAPI news Debug
“02.02.25, 16:18:24.583” “Curl progress: 0” HarmonyAPI UpdateCheck

Du siehst, dass beide Curls laufen (und später mit Errorcode 0 enden)

Und daneben das Log im Build (user-Rechte):

Datum Ereignis Gerät Geräte-ID Ebene
02.02.25, 16:23:50.276 App Start app 1.0b95 Debug
02.02.25, 16:23:50.278 Windows 32 Bit System Architecture Debug
02.02.25, 16:23:50.278 Windows 10 (Build 19045) System OS Debug
02.02.25, 16:23:50.279 4 cores System CPUs Debug
02.02.25, 16:23:50.279 Intel(R) Core™ i7-4790K CPU @ 4.00GHz System CPU manufacturer Debug
02.02.25, 16:23:50.283 4060 MB System Available RAM Debug
02.02.25, 16:23:50.284 8173 MB System Physical RAM Debug
02.02.25, 16:23:50.286 45 MB App Used RAM Debug
02.02.25, 16:23:50.287 126 App Objects Debug
02.02.25, 16:23:50.351 Not in admin mode. Cannot run updater fully. kaju kaju Warnung
02.02.25, 16:23:50.995 Verbinde mit lokaler Datenbank db Debug
02.02.25, 16:23:50.998 Lokale Datenbank ist verbunden. db Erfolg
02.02.25, 16:23:50.999 Decryption result: 0 db Erfolg
02.02.25, 16:23:51.006 Database Version db 7 Debug
02.02.25, 16:23:53.826 MBS Xojo Plugins 25.0 with CURL 8.11.1 on Windows. curl news Debug
02.02.25, 16:23:53.826 URL: https://xxx.xxx.xxx/admin/common/news curl news Debug
02.02.25, 16:23:53.827 added to send queue curl news Debug
02.02.25, 16:23:53.828 Checking for Updates kaju kaju Debug
02.02.25, 16:23:55.318 Curl progress: 0 HarmonyAPI news Debug
02.02.25, 16:24:15.971 Host xxx.xxx.xxx:443 was resolved. curl news Debug
02.02.25, 16:24:15.971 IPv6: (none) curl news Debug
02.02.25, 16:24:15.972 IPv4: xxx.xxx.xxx curl news Debug
02.02.25, 16:24:15.972 Curl progress: 0 HarmonyAPI news Debug
02.02.25, 16:24:15.973 Trying xxx.xxx.xxx:443… curl news Debug
02.02.25, 16:24:16.035 ALPN: curl offers http/1.1 curl news Debug

Nur “News” wird als erfolgreich übergeben geloggt. “UpdateCheck” nicht, obwohl ich in dem Fall einen Fehler im Log finden müsste.

Argh! And ahh!
It is not curl, it is Kaju which will do a check for the target folder being writable, and when it is in a pure user account, it is not and kaju will not forward the curl anywhere. Therefore it’s functioning in Admin mode. And Kaju will not really throw an error in case it fails.
I removed that check now as I will elevate the install script when it is necessary.
Thanks for your help. Took me quite a while to figure out.

1 Like