Server.callWithGET broken on Mac compiled plugins
-
@LeeC I tested in Logic Pro X, works!
Reaper v.5.9, both AUi and VST3 fails, I didn't compile any VST2 version
DSP-Quatro v.5.6, AUi worksI'm on Mac OS 10.14.6
-
@ulrik Ableton Live 10, both AUi & VST3 fails
-
@ulrik thanks for testing on your system.
It looks like we may have a problem and we might need to call Mr Hart!I know a few people are planning on adding server functionality to their released plugins for
Authentication, upgrades and other things so this seems important I think.What version of Logic Pro X did you check it on by the way?
-
Before I go into debugging this (which sounds annoying because it only happens in an optimised build if I understand this right), you might try a better test example that logs the response so you see what's happening
function logResponseCallback(status, obj) { obj.StatusCode = status; FileSystem.getFolder(FileSystem.Desktop).getChildFile("log.txt").writeObject(obj); }
-
@Christoph-Hart sure I'll give this a try but from monitoring outbound traffic on my Mac, it appears that no calls are being made from the compiled plugin.
ie. Nothing gets to the server in order to get backobj.StatusCode= status;
I'll try it out and see.
-
In this case you'll get a 404 response after the server timeout (I think it's 20 seconds by default). So just to recap:
- only macOS
- only compiled plugin - inside HISE it works
- only VST / AU plugins in any host
- only the release build
Because that's kind of the most annoying debug setup, like take the worst option from all of those and combine in into a debugging hell...
-
@Christoph-Hart yeah you're recap is spot on!
Sorry for adding this to your work load mate, I'll keep trying things my side to see if I can help get to the root cause.
Strange!
-
@LeeC I use Logic Pro X v.10.5.1
-
OK it fails here too, however it's nothing in the HISE code that's wrong - I am passing this through to the system URL calls. No idea why it works in HISE then.
If I look at the macOS system console I can see this output:
standard 10:39:01.700160 +0100 Demo Project 27366555: RECEIVED OUT-OF-SEQUENCE NOTIFICATION: 139 vs 180, 512, <private> standard 10:39:01.706930 +0100 Demo Project Task <8E5DEF9F-CA4D-4A51-8321-2C8ECE6A798D>.<0> {strength 1, tls 8, ct 0, sub 0, sig 0, ciphers 1, bundle 0, builtin 0} standard 10:39:01.707067 +0100 Demo Project TIC Enabling TLS [3:0x60000072d5c0] standard 10:39:01.707106 +0100 Demo Project TIC TCP Conn Start [3:0x60000072d5c0] standard 10:39:01.707191 +0100 Demo Project [C3 Hostname#d7b4c9cf:443 tcp, url hash: 1c409223, tls] start standard 10:39:01.707545 +0100 Demo Project nw_connection_report_state_with_handler_locked [C3] reporting state preparing standard 10:39:01.708224 +0100 Demo Project Task <8E5DEF9F-CA4D-4A51-8321-2C8ECE6A798D>.<0> setting up Connection 3 standard 10:39:01.755940 +0100 Demo Project nw_socket_handle_socket_event [C3.1:3] Socket received CONNECTED event standard 10:39:01.756014 +0100 Demo Project nw_endpoint_flow_protocol_connected [C3.1 IPv4#9956bdef:443 in_progress socket-flow (satisfied)] Transport protocol connected standard 10:39:01.757153 +0100 Demo Project TIC TLS Event [3:0x60000072d5c0]: 1, Pending(0) standard 10:39:01.792222 +0100 Demo Project TIC TLS Event [3:0x60000072d5c0]: 11, Pending(0) standard 10:39:01.792276 +0100 Demo Project TIC TLS Event [3:0x60000072d5c0]: 14, Pending(0) standard 10:39:01.803606 +0100 Demo Project System Trust Evaluation yielded status(0) standard 10:39:01.807335 +0100 Demo Project TIC TLS Trust Result [3:0x60000072d5c0]: 0 standard 10:39:01.807798 +0100 Demo Project TIC TLS Event [3:0x60000072d5c0]: 2, Pending(0) standard 10:39:01.832974 +0100 Demo Project nw_endpoint_flow_protocol_connected [C3.1 IPv4#9956bdef:443 in_progress socket-flow (satisfied)] Output protocol connected standard 10:39:01.833040 +0100 Demo Project nw_connection_report_state_with_handler_locked [C3] reporting state ready standard 10:39:01.833202 +0100 Demo Project TIC TLS Event [3:0x60000072d5c0]: 20, Pending(0) standard 10:39:01.833302 +0100 Demo Project TIC TCP Conn Connected [3:0x60000072d5c0]: Err(16) standard 10:39:01.833488 +0100 Demo Project TIC TCP Conn Event [3:0x60000072d5c0]: 1 standard 10:39:01.833504 +0100 Demo Project TIC TCP Conn Event [3:0x60000072d5c0]: 8 standard 10:39:01.833577 +0100 Demo Project TIC TLS Handshake Complete [3:0x60000072d5c0] standard 10:39:01.833684 +0100 Demo Project Task <8E5DEF9F-CA4D-4A51-8321-2C8ECE6A798D>.<0> now using Connection 3 standard 10:39:01.833853 +0100 Demo Project nw_endpoint_flow_protocol_connected [C3.1 IPv4#9956bdef:443 ready socket-flow (satisfied)] Output protocol connected standard 10:39:01.833940 +0100 Demo Project Task <8E5DEF9F-CA4D-4A51-8321-2C8ECE6A798D>.<0> sent request, body N standard 10:39:02.456669 +0100 Demo Project Task <8E5DEF9F-CA4D-4A51-8321-2C8ECE6A798D>.<0> received response, status 302 content C standard 10:39:02.457511 +0100 Demo Project Task <8E5DEF9F-CA4D-4A51-8321-2C8ECE6A798D>.<0> response ended standard 10:39:02.457551 +0100 Demo Project Task <8E5DEF9F-CA4D-4A51-8321-2C8ECE6A798D>.<0> done using Connection 3 standard 10:39:02.458344 +0100 Demo Project Task <8E5DEF9F-CA4D-4A51-8321-2C8ECE6A798D>.<0> {strength 1, tls 8, ct 0, sub 0, sig 0, ciphers 1, bundle 0, builtin 0} standard 10:39:02.458458 +0100 Demo Project TIC Enabling TLS [4:0x600000718f00] standard 10:39:02.458483 +0100 Demo Project TIC TCP Conn Start [4:0x600000718f00] standard 10:39:02.458548 +0100 Demo Project [C4 Hostname#0aed465d:443 tcp, url hash: 1d02324f, tls] start standard 10:39:02.458844 +0100 Demo Project nw_connection_report_state_with_handler_locked [C4] reporting state preparing standard 10:39:02.459336 +0100 Demo Project Task <8E5DEF9F-CA4D-4A51-8321-2C8ECE6A798D>.<0> setting up Connection 4 standard 10:39:02.605609 +0100 Demo Project nw_socket_handle_socket_event [C4.1:3] Socket received CONNECTED event standard 10:39:02.605679 +0100 Demo Project nw_endpoint_flow_protocol_connected [C4.1 IPv4#0ce3758c:443 in_progress socket-flow (satisfied)] Transport protocol connected standard 10:39:02.606580 +0100 Demo Project TIC TLS Event [4:0x600000718f00]: 1, Pending(0) fehler 10:39:02.785101 +0100 Demo Project boringssl_context_alert_callback_handler(3817) <private>[0x7fc65c5045d0] Alert level: fatal, description: handshake failure fehler 10:39:02.785165 +0100 Demo Project boringssl_session_errorlog(224) <private>[0x7fc65c5045d0] [boringssl_session_handshake_incomplete] SSL_ERROR_SSL(1): operation failed within the library fehler 10:39:02.785196 +0100 Demo Project boringssl_session_handshake_error_print(205) <private>[0x7fc65c5045d0] <private> fehler 10:39:02.785225 +0100 Demo Project boringssl_session_handshake_error_print(205) <private>[0x7fc65c5045d0] <private> fehler 10:39:02.785250 +0100 Demo Project boringssl_context_get_error_code(3638) <private>[0x7fc65c5045d0] SSL_AD_HANDSHAKE_FAILURE standard 10:39:02.786954 +0100 Demo Project nw_endpoint_flow_protocol_disconnected [C4.1 IPv4#0ce3758c:443 in_progress socket-flow (satisfied)] Output protocol disconnected standard 10:39:02.787012 +0100 Demo Project nw_socket_handle_socket_event [C4.1:3] Socket received READ_CLOSE event standard 10:39:02.787312 +0100 Demo Project nw_connection_report_state_with_handler_locked [C4] reporting state failed error handshake failure standard 10:39:02.787487 +0100 Demo Project TIC TCP Conn Event [4:0x600000718f00]: 3 fehler 10:39:02.787591 +0100 Demo Project TIC TCP Conn Failed [4:0x600000718f00]: 3:-9824 Err(-9824) standard 10:39:02.787669 +0100 Demo Project TIC TCP Conn Cancel [4:0x600000718f00] standard 10:39:02.787839 +0100 Demo Project [C4 Hostname#0aed465d:443 tcp, url hash: 1d02324f, tls] cancel standard 10:39:02.787977 +0100 Demo Project [C4 Hostname#0aed465d:443 tcp, url hash: 1d02324f, tls] cancelled standard 10:39:02.788054 +0100 Demo Project 0.000s [C4 <private> Hostname#0aed465d:443 resolver] path:start standard 10:39:02.788118 +0100 Demo Project 0.000s [C4 <private> Hostname#0aed465d:443 resolver] path:satisfied standard 10:39:02.788196 +0100 Demo Project 0.000s [C4 <private> Hostname#0aed465d:443 resolver] resolver:start_dns standard 10:39:02.788258 +0100 Demo Project 0.007s [C4 <private> Hostname#0aed465d:443 resolver] resolver:receive_dns standard 10:39:02.788341 +0100 Demo Project 0.007s [C4.1 <private> 192.168.178.16:49477<->IPv4#0ce3758c:443 socket-flow] path:start standard 10:39:02.788406 +0100 Demo Project 0.007s [C4.1 <private> 192.168.178.16:49477<->IPv4#0ce3758c:443 socket-flow] path:satisfied standard 10:39:02.788443 +0100 Demo Project 0.009s [C4.1 <private> 192.168.178.16:49477<->IPv4#0ce3758c:443 socket-flow] flow:start_connect standard 10:39:02.788484 +0100 Demo Project 0.147s [C4.1 <private> 192.168.178.16:49477<->IPv4#0ce3758c:443 socket-flow] flow:finish_transport standard 10:39:02.788536 +0100 Demo Project 0.147s [C4 <private> Hostname#0aed465d:443 resolver] flow:finish_transport standard 10:39:02.788646 +0100 Demo Project 0.328s [C4.1 <private> 192.168.178.16:49477<->IPv4#0ce3758c:443 socket-flow] flow:failed_connect handshake failure standard 10:39:02.788719 +0100 Demo Project 0.328s [C4 <private> Hostname#0aed465d:443 resolver] flow:failed_connect standard 10:39:02.788761 +0100 Demo Project 0.329s [C4] path:cancel standard 10:39:02.789105 +0100 Demo Project nw_connection_report_state_with_handler_locked [C4] reporting state cancelled error handshake failure standard 10:39:02.789208 +0100 Demo Project TIC TCP Conn Destroyed [4:0x600000718f00] standard 10:39:02.789259 +0100 Demo Project NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9824) fehler 10:39:02.789287 +0100 Demo Project Task <8E5DEF9F-CA4D-4A51-8321-2C8ECE6A798D>.<0> HTTP load failed (error code: -1200 [3:-9824]) fehler 10:39:02.789317 +0100 Demo Project NSURLConnection finished with error - code -1200 standard 10:39:32.823794 +0100 Demo Project TIC TCP Conn Cancel [3:0x60000072d5c0] standard 10:39:32.823847 +0100 Demo Project [C3 Hostname#d7b4c9cf:443 tcp, url hash: 1c409223, tls] cancel standard 10:39:32.823912 +0100 Demo Project [C3 Hostname#d7b4c9cf:443 tcp, url hash: 1c409223, tls] cancelled
There's a lot of things to check, but something that catches my eye is the HTTP status 302, and the
SSL_HANDSHAKE_FAILED
errors at the end. Have you tried another domain? I can imagine that the filehoster does a lot of redirecting and somehow this messes up with the system. -
Yes, kind of what I was expecting:
Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={_kCFStreamErrorCodeKey=-9824, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, NSUnderlyingError=0x600000c87ae0 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSErrorFailingURLStringKey=https://download1981.mediafire.com/ufgigkkchdag/brk7qgc382u8j64/HiseServerTest.json, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFNetworkCFStreamSSLErrorOriginalValue=-9824, _kCFStreamPropertySSLClientCertificateState=0, NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., _kCFStreamErrorDomainKey=3, NSErrorFailingURLKey=https://download1981.mediafire.com/ufgigkkchdag/brk7qgc382u8j64/HiseServerTest.json, _kCFStreamErrorCodeKey=-9824}}, NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., NSErrorFailingURLKey=https://download1981.mediafire.com/ufgigkkchdag/brk7qgc382u8j64/HiseServerTest.json, NSErrorFailingURLStringKey=https://download1981.mediafire.com/ufgigkkchdag/brk7qgc382u8j64/HiseServerTest.json, _kCFStreamErrorDomainKey=3}
Please try another server - it looks like this file-hosting site has some issues.
-
@Christoph-Hart thanks for looking into it.
I'll try another file-hosting site and see what we get. -
@Christoph-Hart I just tried using Dropbox and it fails with this also.
I'm keen to try with a few others hosts. If anybody else has any file hosting recommendations or can test things out at all please chime in -
There's a tool on macOS that you can run with any URL and it validates everything.
nscurl --ats-diagnostics https://download1981.mediafire.com/ufgigkkchdag/brk7qgc382u8j64/HiseServerTest.json
This spits out a lot of errors. Although
nscurl --ats-diagnostics https://forum.hise.audio/topic/3885/server-callwithget-broken-on-mac-compiled-plugins/33
also produces the error every time that
TLSv1.3
is being used (whatever this is lol). The TLS versions below 1.3 run fine though so maybe HISE is using an older version for whatever weird reason... -
@Christoph-Hart interesting...
I was actually literally in the process of testing using:
Server.setBaseURL("https://forum.hise.audio/");
Server.callWithGET("api/users?section=sort-posts", {}, function(status, response)
as I came across an example that you created in the 'Who is it?' post by @ulrik. Your example pulled back profile images for HISE users.
Compiling as I type and will feedback...
-
Yeah I did that already and it worked here :) So as it seems we don't need to care about the errors in TLS1.2, but the media fire URL threw these errors with all versions down to TLS1.0, so that's your answer.
-
@Christoph-Hart strange because this snippet (that's set to call hise.audio) didn't work on my machine testing in Logic X ️
Could it be something to do with the use of the timer to print the response in the example perhaps? I know I'm might be clutching at straws here!
HiseSnippet 1307.3ocsWsraabCEkiim.K051FftoqJgPWLFvQObdzhFDDEaKGXj3DgH6jrKgZFJIFOhb.IGmL0v.8mn+D8qnK699CzMceQ+Abujbd4D4TGilQ.Rl795bO7NWd8PoHjpTBIxqw9YITj2m6OJiqms0LBii1caj2W5OhJOhJ2mpzT4FnMyRHJEMB44ckGXTxqwxH6yeeuMIwDdHsZKD5YBVH8Qr4Lc0tC6+PVb7NjH59r40z9l82MTv2RDKRA.cE+tnDR3gjozGSLpsjOx6pChXZgbjlnoJj2xaJhxFMS7FtS+mwTrwwTyhdnQfibauiHNxfXytnslwhiFVj3JD3kgUzvUbzvW6uGKhUteEc7UVA3JKpyGdK8gfWu5vq6EGdd0f2xN3cM+QgRVhtRhAael+tb3LZBANBpCKmtnk9ik82R.Zv0smSNjtiDVTZQvs61cc7s51cs6rZSyG3nPowGQj3pB.7cwEdXJUukXdhfCKBZUoRKi8U19HxXZbuy0Nm3VEwz7oSm7.h2hDGWrKiGy3T7jTdnlI3XAuJjFWKEwAgE9ccHzwoz0Vs4wq1DCOtusdViiMwDqE3wP05gfmvwBRjIHNzzVQAjoouU2ZcbqRr0fMIv41iMNrgyu1ebPwX2lDE8fm9nfVyz5D0O1oyDgLcd6YLEsMIMhI5X8WciMXCPFE7PF1pNVwzTLSgIGQX.ZioXhB+zAi1Ge+g6hGmgecJPuIRZBkGw3SwupCIg8JSNomQwg.u0LGSl+94L8rGLX+fVfRcRUTo5dJpkFuKT5nudhPoUPtd7IqWRvAJnFNUsNVRU.opLjIPmETo6QRmhkvYagN24cEp.gNGcFQvAlRDSamHYPQfZsyHLqMXgTaZMHC1nqqfrP3IqcGLth8NY0lmXOd9uqJMmN4EJl5pwPmkfETDUbZCmHVDX3zXwTLgGgsvsLYsRLELm8kkLHkGvmBEqsCkTnOf0MOY7qAFOv38LCRraVhiRRuphcAkhk7j66cXwzQYPS44lr11CQFTaysopC0hj0rbhoohQVPKHYZqeqgPdiDJyxAVouMruHwQ9l8NwQH0du6wBvJ.pMOtYilmzD+thlLYgxx42XieWf37Hd9FFvSmOlJKd0tPQnk3Y645e98bqekPnqfolhB9tbl9IvqTmWmXTdUlombNp.U01NxeQdG4MS0ZAGwhrWkVVcgrnt9EinC1cahlT3KvsPnRnRMyjEdaSOBt3z0suge9YIjrkU2HuUbQd07HaqXrAdEeW0C5skA7meX+rxE3v9ugEomUAGU+YT1zYU2Q+mj9lpNfN89cX4D.giX+TUBz+f9nZPw+hQBU34UjZ342F0mo1SLGbEQlUv9W7Dci5I5yqmnGkmE87+HaQixIHeu+A7SA4368MvJiKKFRowUOE8WmZC1GAfuQM.i9tZ.FkkC3C7+eu+MFWkT+pW8j5aeujB8Km5Rp2ezCX.HQTZLQe1ohLiBlK.h9YF+vLhAGtRKq9nheRFU5hB2q4OjoCmsX7tzBvK7V5mZ7lO34p9ClLANbq.6x967hO8SYhdpHUCiRrGQKYP0o+iSmOBpFBo.R3bZro0p2Rl5b25tl0FlYDLChcwovStvdl0d4B6UHDMmDJEuLz05zLZ6J1c.LwsS32veOyZbuh1k99ca2EMGl39kggFp35.1WrMabIr4FWBat4kvlacIr41WBa99KgM+vGzFy+ry8S0h4tWSfMFNvdskm2.tYxTaEI5ewXpqqK
-
-
@LeeC dont know about the Get but the POST works fine for me in Reaper...
-
@Lindon Did the POST work for you in Reaper on a Mac?
I've created an API endpoint using Amazon AWS and can successfully POST to it in HISE using the snippet below.
When compiled it works in these DAWs on a Mac:
Studio One
Ableton LiveHowever, it fails in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