Trying to perform a simple GET request in Scilab

I’m trying to perform a simple GET request in Scilab using the http_get(url) function. This used to work in the past but now I’m getting the following error:

http_get: CURL execution failed.
Problem with the SSL CA cert (path? access rights?)

I’m using the new ARM64 build of Scilab 2024.0.0 in a Mac M1 Pro. If I make the request in the terminal with curl -X GET "url" it works fine.

Hi Tom,

Did you test with the Intel build? However, I don’t think that it will change anything. For example

str = http_get("https://www.mozilla.org");

is working fine on all Scilab builds. Your working curl command does not imply that it would work from within Scilab (where you cannot use “-X” to force the method). Moreover, using the “-X” flag is presumably useless and even harmful (see http method - curl -GET and -X GET - Stack Overflow).

S.

I tried the get request to the mozilla url and I’m getting the same error message:

I also tried the intel build, but it does not seem to work in Rosetta2 emulation, see error below:

Also, just to confirm, if I use curl directly (thanks for the pointer on the -X argument, I haven’t used curl in the past), I can make a successful GET request to the mozilla url

Hello,

For the Intel build see the update @ Scilab 2024.0.0 refuses to start up on my Intel iMac.

For the http_get problem, can you check your accessibility settings (see the following screenshot) and see if adding “sh” solves the problem ?

I checked and I already have sh listed under Automation (as per the screenshot).

I downloaded the new intel build and it now opens and the http_get command succeeds without that curl error. It seems I’m unblocked now, as I can continue my testing using the intel build.

That being said, I noticed how faster the arm build is, so it would be great if http_get would work on it. Is there any way I can generate some debug logs that may be helpful to identify what could be causing this issue?

Thanks for reporting.

Can you test the following on the arm64 build:

unix_g("curl https://www.mozilla.org")

Here you go:

The unix_g command works fine it seems.

Thanks.

I cannot reproduce the problem on my M1 mac with the current arm64 build but I will try to investigate this tomorrow.

S.

I have regenerated the arm64 image with the same settings as the Intel image (library validation disabled). Can you download and test the arm64 build again (as before refresh your browser cache before downloading) ?

S.

I’ve downloaded the updated arm64 build, but unfortunately it does not solve the issue. I’ll try on another Mac M1 later to confirm if it’s something that’s only affecting my system or if it’s a general issue.

Also the updated build does not contain the background image that was present on the previous one, see below:

The previous arm64 build had this background image in the package:

It’s a minor detail, but just wanted to share.

Yeah I just fixed it. Concerning the ssl problem, I was able to reproduce it with a fresh VM this morning and still have to test when disabling SIP. The only solution I can give you for the moment is to add an option disabling the certificate verification:

s=http_get("https://www.mozilla.org", cert="none")

Hello,

I have fixed the problem (it was a clash between a Scilab bundled library and a system library with the same name). Can you download and test the arm64 build again (as before refresh your browser cache before downloading) at https://www.utc.fr/~mottelet/scilab/download/2024.0.0/scilab-2024.0.0-arm64.dmg and tell me if httpd works fine your you? the https example:

s=http_get("https://www.mozilla.org")

now works on my two M1 VMs (Ventura and Sonoma).

S.

1 Like

Yes, I can confirm, it’s working perfectly fine now. Thanks for looking into it! :grinning: