Certificate error on Mac ARM (M1 chip)

What is the problem you are having with rclone?

Error getting certificate file in a new M1 Mac. It works fine in my old Intel Mac.
The procedure in "FAQ" does not work for the M1 Mac scenario.

What is your rclone version (output from rclone version)

rclone v1.55.0
- os/type: darwin
- os/arch: arm64
- go/version: go1.16.2
- go/linking: dynamic
- go/tags: cmount

Which OS you are using and how many bits (eg Windows 7, 64 bit)

MacOS 11.2.3, M1 chip

Which cloud storage system are you using? (eg Google Drive)

Hubic

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone -vv sync /Users/myuser/Documents/biz hubiC:default/Macbook/Documents/biz

The rclone config contents with secrets removed.

[hubiC]
type = hubic
client_id =
client_secret =
token = {"access_token”:”<“secret>,”token_type":"Bearer","refresh_token”:”<“secret>,”expiry":"2021-04-22T15:46:38.347148-03:00"}

A log from the command with the -vv flag

2021/04/22 11:31:41 DEBUG : Using config file from "/Users/myuser/.rclone.conf"
2021/04/22 11:31:41 DEBUG : rclone: Version "v1.55.0" starting with parameters ["/Users/myuser/bin/rclone-v1.55.0-osx-arm64/rclone" "-vv" "sync" "/Users/myuser/Documents/biz" "hubiC:default/Macbook/Documents/biz"]
2021/04/22 11:31:41 DEBUG : Creating backend with remote "/Users/myuser/Documents/biz"
2021/04/22 11:31:41 DEBUG : Creating backend with remote "hubiC:default/Macbook/Documents/biz"
2021/04/22 11:31:42 DEBUG : Hubic: retrying auth request 1/10: Get "https://api.hubic.com/1.0/account/credentials": x509: failed to load system roots and no roots provided; SecTrustSettingsCopyCertificates error: -25295
2021/04/22 11:31:43 DEBUG : Hubic: retrying auth request 2/10: Get "https://api.hubic.com/1.0/account/credentials": x509: failed to load system roots and no roots provided; SecTrustSettingsCopyCertificates error: -25295
2021/04/22 11:31:43 DEBUG : Hubic: retrying auth request 3/10: Get "https://api.hubic.com/1.0/account/credentials": x509: failed to load system roots and no roots provided; SecTrustSettingsCopyCertificates error: -25295
2021/04/22 11:31:44 DEBUG : Hubic: retrying auth request 4/10: Get "https://api.hubic.com/1.0/account/credentials": x509: failed to load system roots and no roots provided; SecTrustSettingsCopyCertificates error: -25295
2021/04/22 11:31:45 DEBUG : Hubic: retrying auth request 5/10: Get "https://api.hubic.com/1.0/account/credentials": x509: failed to load system roots and no roots provided; SecTrustSettingsCopyCertificates error: -25295
2021/04/22 11:31:45 DEBUG : Hubic: retrying auth request 6/10: Get "https://api.hubic.com/1.0/account/credentials": x509: failed to load system roots and no roots provided; SecTrustSettingsCopyCertificates error: -25295
2021/04/22 11:31:46 DEBUG : Hubic: retrying auth request 7/10: Get "https://api.hubic.com/1.0/account/credentials": x509: failed to load system roots and no roots provided; SecTrustSettingsCopyCertificates error: -25295
2021/04/22 11:31:46 DEBUG : Hubic: retrying auth request 8/10: Get "https://api.hubic.com/1.0/account/credentials": x509: failed to load system roots and no roots provided; SecTrustSettingsCopyCertificates error: -25295
2021/04/22 11:31:47 DEBUG : Hubic: retrying auth request 9/10: Get "https://api.hubic.com/1.0/account/credentials": x509: failed to load system roots and no roots provided; SecTrustSettingsCopyCertificates error: -25295
2021/04/22 11:31:48 DEBUG : Hubic: retrying auth request 10/10: Get "https://api.hubic.com/1.0/account/credentials": x509: failed to load system roots and no roots provided; SecTrustSettingsCopyCertificates error: -25295
2021/04/22 11:31:48 Failed to create file system for "hubiC:default/Macbook/Documents/biz": error authenticating swift connection: Get "https://api.hubic.com/1.0/account/credentials": x509: failed to load system roots and no roots provided; SecTrustSettingsCopyCertificates error: -25295

Are you running some kind of scanning firewall antivirus thing?

I haven't seen any other reports of this from M1 mac users.

I wonder if it is something about the https://api.hubic.com/1.0/account/credentials certificate - it looks like a pretty normal lets encrypt certificate.

What happens if you do

rclone lsf -vv :'http,url="https://downloads.rclone.org":'

Does that give you a directory listing or the same error?

Dear mr. Nick, thank you very much for your quick response.

After making many tests, I found that the problem I am facing is not chipset-related, but it seems to be a version break.

I am able to run the amd64 versions in my M1 Mac... I do not know how, but I am! Maybe Rosetta 2 is doing its job, but the fact is I am able to run all rclone versions in the M1 Mac.

I was able, also, to run the tests in both Macs: in the old Intel and in the new M1. The results in both were identical for each rclone version.

First, I tested the same version I was running successfully in my old MacBook - v1.52.3. In this version, the lsf command worked fine in both Macs.

Then, I tested the next version - v1.53.0. In this version, the x509 error raised, also in both MacBooks.

Finally, I tested the last version - v1.55.0. In this version, the x509 error also raised in all tests:

  • amd64 version, in both MacBooks;
  • arm64 version, only in the M1 MacBook.

Since the log generated by the M1 Mac in one version is identical to the log generated by the Intel Mac in the same version, I believe the problem is not related to the OS chipset.

Last, I was not able to use the command you suggested. It failed in all versions. So, I used another command, that retrieves the directory listing, anyway:
./rclone lsf -vv --http-url https://downloads.rclone.org :http:

I am sending the logs from both commands (yours and mine) in all tested versions.

If you need any further information, I can resume the tests for you.

Sincerely yours

============= Commands issued =============

Command 1: ./rclone lsf -vv --http-url https://downloads.rclone.org :http:
Command 2: ./rclone lsf -vv :'http,url="https://downloads.rclone.org":'

============= rclone-v1.52.3-osx-amd64.zip =============

Command 1:
% ./rclone lsf -vv --http-url https://downloads.rclone.org :http:
2021/04/22 23:04:42 DEBUG : rclone: Version "v1.52.3" starting with parameters ["./rclone" "lsf" "-vv" "--http-url" "https://downloads.rclone.org" ":http:"]
2021/04/22 23:04:42 NOTICE: Config file "/Users/myuser/.config/rclone/rclone.conf" not found - using defaults
...
<correct directory listing>
...
2021/04/22 23:04:45 DEBUG : 5 go routines active

Command 2:
% ./rclone lsf -vv :'http,url="https://downloads.rclone.org":'
2021/04/22 23:07:01 DEBUG : rclone: Version "v1.52.3" starting with parameters ["./rclone" "lsf" "-vv" ":http,url=\"https://downloads.rclone.org\":"]
2021/04/22 23:07:01 Failed to create file system for ":http,url=\"https://downloads.rclone.org\":": config name contains invalid characters - may only contain 0-9, A-Z ,a-z ,_ , - and space 

============= rclone-v1.53.0-osx-amd64.zip =============

Command 1:
% ./rclone lsf -vv --http-url https://downloads.rclone.org :http:
2021/04/22 23:08:30 DEBUG : rclone: Version "v1.53.0" starting with parameters ["./rclone" "lsf" "-vv" "--http-url" "https://downloads.rclone.org" ":http:"]
2021/04/22 23:08:30 DEBUG : Creating backend with remote ":http:"
2021/04/22 23:08:30 NOTICE: Config file "/Users/myuser/.config/rclone/rclone.conf" not found - using defaults
2021/04/22 23:08:31 ERROR : : error listing: error listing "": failed to readDir: Get "https://downloads.rclone.org/": x509: failed to load system roots and no roots provided; SecTrustSettingsCopyCertificates error: -25295
2021/04/22 23:08:31 DEBUG : 4 go routines active
2021/04/22 23:08:31 Failed to lsf with 2 errors: last error was: error in ListJSON: error listing "": failed to readDir: Get "https://downloads.rclone.org/": x509: failed to load system roots and no roots provided; SecTrustSettingsCopyCertificates error: -25295

Command 2:
% ./rclone lsf -vv :'http,url="https://downloads.rclone.org":'
2021/04/22 23:09:23 DEBUG : rclone: Version "v1.53.0" starting with parameters ["./rclone" "lsf" "-vv" ":http,url=\"https://downloads.rclone.org\":"]
2021/04/22 23:09:23 Failed to create file system for ":http,url=\"https://downloads.rclone.org\":": config name contains invalid characters - may only contain 0-9, A-Z ,a-z ,_ , - and space

============= rclone-v1.55.0-osx-amd64.zip =============

Command 1:
% ./rclone lsf -vv --http-url https://downloads.rclone.org :http:
2021/04/22 23:12:33 NOTICE: Config file "/Users/myuser/.config/rclone/rclone.conf" not found - using defaults
2021/04/22 23:12:33 DEBUG : rclone: Version "v1.55.0" starting with parameters ["./rclone" "lsf" "-vv" "--http-url" "https://downloads.rclone.org" ":http:"]
2021/04/22 23:12:33 DEBUG : Creating backend with remote ":http:"
2021/04/22 23:12:33 DEBUG : :http: detected overridden config - adding "{Zhl7M}" suffix to name
2021/04/22 23:12:33 DEBUG : fs cache: renaming cache item ":http:" to be canonical ":http{Zhl7M}:"
2021/04/22 23:12:34 ERROR : : error listing: error listing "": failed to readDir: Get "https://downloads.rclone.org/": x509: failed to load system roots and no roots provided; SecTrustSettingsCopyCertificates error: -25295
2021/04/22 23:12:34 DEBUG : 4 go routines active
2021/04/22 23:12:34 Failed to lsf with 2 errors: last error was: error in ListJSON: error listing "": failed to readDir: Get "https://downloads.rclone.org/": x509: failed to load system roots and no roots provided; SecTrustSettingsCopyCertificates error: -25295

Command 2:
% ./rclone lsf -vv :'http,url="https://downloads.rclone.org":'
2021/04/22 23:13:35 NOTICE: Config file "/Users/myuser/.config/rclone/rclone.conf" not found - using defaults
2021/04/22 23:13:35 DEBUG : rclone: Version "v1.55.0" starting with parameters ["./rclone" "lsf" "-vv" ":http,url=\"https://downloads.rclone.org\":"]
2021/04/22 23:13:35 DEBUG : Creating backend with remote ":http,url=\"https://downloads.rclone.org\":"
2021/04/22 23:13:35 DEBUG : :http: detected overridden config - adding "{Zhl7M}" suffix to name
2021/04/22 23:13:35 DEBUG : fs cache: renaming cache item ":http,url=\"https://downloads.rclone.org\":" to be canonical ":http{Zhl7M}:"
2021/04/22 23:13:36 ERROR : : error listing: error listing "": failed to readDir: Get "https://downloads.rclone.org/": x509: failed to load system roots and no roots provided; SecTrustSettingsCopyCertificates error: -25295
2021/04/22 23:13:36 DEBUG : 4 go routines active
2021/04/22 23:13:36 Failed to lsf with 2 errors: last error was: error in ListJSON: error listing "": failed to readDir: Get "https://downloads.rclone.org/": x509: failed to load system roots and no roots provided; SecTrustSettingsCopyCertificates error: -25295

============= rclone-v1.55.0-osx-arm64.zip =============

Command 1:
% ./rclone lsf -vv --http-url https://downloads.rclone.org :http:
2021/04/22 23:16:47 NOTICE: Config file "/Users/myuser/.config/rclone/rclone.conf" not found - using defaults
2021/04/22 23:16:47 DEBUG : rclone: Version "v1.55.0" starting with parameters ["./rclone" "lsf" "-vv" "--http-url" "https://downloads.rclone.org" ":http:"]
2021/04/22 23:16:47 DEBUG : Creating backend with remote ":http:"
2021/04/22 23:16:47 DEBUG : :http: detected overridden config - adding "{Zhl7M}" suffix to name
2021/04/22 23:16:47 DEBUG : fs cache: renaming cache item ":http:" to be canonical ":http{Zhl7M}:"
2021/04/22 23:16:48 ERROR : : error listing: error listing "": failed to readDir: Get "https://downloads.rclone.org/": x509: failed to load system roots and no roots provided; SecTrustSettingsCopyCertificates error: -25295
2021/04/22 23:16:48 DEBUG : 4 go routines active
2021/04/22 23:16:48 Failed to lsf with 2 errors: last error was: error in ListJSON: error listing "": failed to readDir: Get "https://downloads.rclone.org/": x509: failed to load system roots and no roots provided; SecTrustSettingsCopyCertificates error: -25295

Command 2:
% ./rclone lsf -vv :'http,url="https://downloads.rclone.org":'
2021/04/22 23:17:23 NOTICE: Config file "/Users/myuser/.config/rclone/rclone.conf" not found - using defaults
2021/04/22 23:17:23 DEBUG : rclone: Version "v1.55.0" starting with parameters ["./rclone" "lsf" "-vv" ":http,url=\"https://downloads.rclone.org\":"]
2021/04/22 23:17:23 DEBUG : Creating backend with remote ":http,url=\"https://downloads.rclone.org\":"
2021/04/22 23:17:23 DEBUG : :http: detected overridden config - adding "{Zhl7M}" suffix to name
2021/04/22 23:17:23 DEBUG : fs cache: renaming cache item ":http,url=\"https://downloads.rclone.org\":" to be canonical ":http{Zhl7M}:"
2021/04/22 23:17:23 ERROR : : error listing: error listing "": failed to readDir: Get "https://downloads.rclone.org/": x509: failed to load system roots and no roots provided; SecTrustSettingsCopyCertificates error: -25295
2021/04/22 23:17:23 DEBUG : 4 go routines active
2021/04/22 23:17:23 Failed to lsf with 2 errors: last error was: error in ListJSON: error listing "": failed to readDir: Get "https://downloads.rclone.org/": x509: failed to load system roots and no roots provided; SecTrustSettingsCopyCertificates error: -25295

Great testing thank you. So it looks like there is a problem with Let's Encrypt certificates for certain with your computer.

Can you try the latest beta and the latest stable beta just to see if updates to the go runtime have fixed this.

Does going to https://downloads.rclone.org work in your browser?

Hello again, sorry for the delay posting this reply. The output from the both versions are below:

rclone-v1.55.1-beta.5376.96cdbc5ea.v1.55-stable-osx-arm64:

% ./rclone lsf -vv --http-url https://downloads.rclone.org :http:
2021/04/29 11:51:41 DEBUG : Using config file from "/Users/josehime/.rclone.conf"
2021/04/29 11:51:41 DEBUG : rclone: Version "v1.55.1-beta.5376.96cdbc5ea.v1.55-stable" starting with parameters ["./rclone" "lsf" "-vv" "--http-url" "https://downloads.rclone.org" ":http:"]
2021/04/29 11:51:41 DEBUG : Creating backend with remote ":http:"
2021/04/29 11:51:41 DEBUG : :http: detected overridden config - adding "{Zhl7M}" suffix to name
2021/04/29 11:51:41 DEBUG : fs cache: renaming cache item ":http:" to be canonical ":http{Zhl7M}:"
2021/04/29 11:51:42 ERROR : : error listing: error listing "": failed to readDir: Get "https://downloads.rclone.org/": x509: failed to load system roots and no roots provided; SecTrustSettingsCopyCertificates error: -25295
2021/04/29 11:51:42 DEBUG : 4 go routines active
2021/04/29 11:51:42 Failed to lsf with 2 errors: last error was: error in ListJSON: error listing "": failed to readDir: Get "https://downloads.rclone.org/": x509: failed to load system roots and no roots provided; SecTrustSettingsCopyCertificates error: -25295

rclone-v1.56.0-beta.5469.9e8cd6bff-osx-arm64

% ./rclone lsf -vv --http-url https://downloads.rclone.org :http:
2021/04/29 11:52:37 DEBUG : rclone: Version "v1.56.0-beta.5469.9e8cd6bff" starting with parameters ["./rclone" "lsf" "-vv" "--http-url" "https://downloads.rclone.org" ":http:"]
2021/04/29 11:52:37 DEBUG : Creating backend with remote ":http:"
2021/04/29 11:52:37 DEBUG : :http: detected overridden config - adding "{Zhl7M}" suffix to name
2021/04/29 11:52:37 DEBUG : Using config file from "/Users/josehime/.rclone.conf"
2021/04/29 11:52:37 DEBUG : fs cache: renaming cache item ":http:" to be canonical ":http{Zhl7M}:"
2021/04/29 11:52:37 ERROR : : error listing: error listing "": failed to readDir: Get "https://downloads.rclone.org/": x509: failed to load system roots and no roots provided; SecTrustSettingsCopyCertificates error: -25295
2021/04/29 11:52:37 DEBUG : 4 go routines active
2021/04/29 11:52:37 Failed to lsf with 2 errors: last error was: error in ListJSON: error listing "": failed to readDir: Get "https://downloads.rclone.org/": x509: failed to load system roots and no roots provided; SecTrustSettingsCopyCertificates error: -25295

Yes, it does. Perfectly.

Regards!

This looks like the same issue

Can you try the solution there?