Noted about the local variable. I just wanted to verify that the issue was from the api and not my own code.
In SketchUp 24.0.594 I also get an empty response body with the status_code of 0. I was hoping upgrading would fix the issue as OpenSSL was upgraded and found this issue.
The BugSplat crash likely points to a native-level failure in the underlying SSL library during the mTLS handshake. Since SketchUp wraps a C++ networking layer, unhandled certificate parameters can crash the whole app instead of throwing a Ruby exception. Have you tried testing outside SketchUp to isolate if it’s strictly a Ruby API limitation?
Weirdly, SketchUp 25.0.2 and SketchUp 26.2 have the same version (3.4.1) of OpenSSL.
So I am at a loss as to why the crashes happen in 26.2 and not 25.0.2.
You can expect an update to OpenSSL 3.5.6 in the next major release.
All that said, are there any HTTP headers that should be set prior to starting the request?
So after playing around a bit I found a possible workaround to this bug for Sketchup 24.
If I make a HTMLDialog and set_url to the same base url, it does return the correct response and any call from the Sketchup::Http::Request afterwards will return a correct response.
So SU 2024 no longer crashes? I still got a crash in SU 2026.2 (Crash #495238)
Gemini AI suggestions (... click to expand ...)
The following is suggested by Gemini AI:
The server requires a client SSL/TLS certificate (mutual TLS / mTLS) to complete the handshake, but Sketchup::Http::Request doesn’t support attaching client certificates.
To handle client certificates in SketchUp Ruby, use Ruby’s built-in net/http and openssl libraries instead of the API request object.
Chromium HTML Dialogs:UI::HtmlDialog uses embedded CEF (Chromium). Passing client certificates through UI::HtmlDialog requires installing the client certificate into the operating system’s trust store (Windows Certificate Store or macOS Keychain) so Chromium can select it during the mTLS handshake.
It has never crashed in su 24 or 25, you just get a status_code 0 rather than the 400.
Net http correctly returns a 400 but it’s not asynchronous.
We don’t need to pass a certificate as our server is set to optional but still that returns a 0 with Sketchup::Http::Request request rather than 200 so the workaround for us would be to call our server with the html dialog and then calls after that with Sketchup::Http::Requestafter that will work.