Skip to content

Installation fails on Apple M1 Big Sur: post-install #637

Closed
@ubidefeo

Description

@ubidefeo

Bug Report

Describe the bug

When installing Arduino Create Agent for Safari (requires Security Certificates to be added to the Keychain), the installation completes but one error is raised.
On Mac OS Big Sur/Monterey (M1, but could be the same on Intel) the user is requested to enter the password twice, but the second one raises a failure message

Problem running post-install step. Installation may not complete correctly
Error running osascript -e "do shell script \"security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain /Users/ubi/Applications/ArduinoCreateAgent/ArduinoCreateAgent.app/Contents/MacOS/ca.cert.pem\" with administrator privileges": 0:220: execution error: SecTrustSettingsSetTrustSettings: The authorization was denied since no user 

To Reproduce

Install Create Agent on (M1) Mac running Big Sur or Monterey

Expected behavior

No failure to add the certificate

Environment (please complete the following information):

  • OS [e.g. Windows]: Mac OS
  • OS version: Big Sur 11.3
  • Browser [e.g. chrome, safari]: n/a
  • Browser Version: n/a
  • Agent Version [e.g. 1.0.0]: 1.2.3
  • CPU architecture [e.g. amd64]: arm64 (Apple M1)

Additional context

I have manually ran the script and it fails unless I launch it with sudo, at which point I am prompted with the password dialog and it installs correctly

Fail

osascript -e "do shell script \"security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain /Users/ubi/Applications/ArduinoCreateAgent/ArduinoCreateAgent.app/Contents/MacOS/ca.cert.pem\""
0:190: execution error: SecCertificateAddToKeychain: Write permissions error. (1)

Success

sudo osascript -e "do shell script \"security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain /Users/ubi/Applications/ArduinoCreateAgent/ArduinoCreateAgent.app/Contents/MacOS/ca.cert.pem\""
Password:

Metadata

Metadata

Labels

os: macosSpecific to macOS operating systemtype: imperfectionPerceived defect in any part of project

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions