Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacOS arm64: Unable to open 5.4.9.0 wallet #2795

Open
ftneek opened this issue Feb 16, 2025 · 22 comments
Open

MacOS arm64: Unable to open 5.4.9.0 wallet #2795

ftneek opened this issue Feb 16, 2025 · 22 comments
Assignees
Milestone

Comments

@ftneek
Copy link

ftneek commented Feb 16, 2025

Bug Report

Current behavior
After updating, attempting to open the arm64 5.4.9.0 wallet results in a popup that displays the message: 'The application “Gridcoin” can’t be opened.', even after clicking Open Anyway in the MacOS privacy settings, and the wallet does not open.

Expected behavior
The wallet should launch without issue, as it did in the previous version (5.4.8.0).

Steps to reproduce:

  1. Install the 5.4.9.0 wallet (upgrading from 5.4.8.0).
  2. Open the Gridcoin wallet.
  3. Click Open Anyway in the MacOS privacy settings.
  4. Open the Gridcoin wallet.
    Observe: The described popup is displayed and the wallet does not open.

Screenshots
Image

Gridcoin version
5.4.9.0

Machine specs

  • OS: MacOS 15.3.1
  • CPU: Apple M1
  • RAM: 8 GB
  • Disk size: 256
  • Disk Type (HD/SSD): SSD

Extra information
I can't get a debug log from 5.4.9.0 since I can't open the application, but I downgraded and can get one from 5.4.8.0 if that would be helpful.

@ftneek ftneek added the bug label Feb 16, 2025
@div72
Copy link
Member

div72 commented Feb 16, 2025

@ftneek Can you try starting it from the Terminal and noting the output? (open /Applications/Gridcoin.app)

Also, disregard the spam above.

@ftneek
Copy link
Author

ftneek commented Feb 16, 2025

Here's the terminal output:

The application cannot be opened for an unexpected reason, error=Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x6000008840f0 {Error Domain=NSPOSIXErrorDomain Code=153 "Unknown error: 153" UserInfo={NSLocalizedDescription=Launchd job spawn failed}}}

@div72
Copy link
Member

div72 commented Feb 16, 2025

Same as #2789. See #2789 (comment).

@jamescowens
Copy link
Member

@div72 would you look into the most inexpensive and expeditious means to sign the release for the mac? We probably need to do this for Windows too.

@jamescowens
Copy link
Member

@ftneek did you try @melk's recommendation on discord...

sudo spctl --master-disable

Note that this may allow you to run anything, so you need to be aware that is a hammer.

@ftneek
Copy link
Author

ftneek commented Feb 17, 2025

@jamescowens I just had a chance to test it, the popup still appears and the application does not launch.

@jamescowens
Copy link
Member

@div72 You have an arm based mac. Can you replicate this issue?

@jamescowens
Copy link
Member

@ftneek What version of MacOS are you running?

@ftneek
Copy link
Author

ftneek commented Feb 17, 2025

@jamescowens macOS Sequoia Version 15.3.1 (24D70)

@div72
Copy link
Member

div72 commented Feb 17, 2025

@div72 You have an arm based mac. Can you replicate this issue?

Not on 14.3 on an M1. I'll update to see if it's still an issue on 15 or if it's something else. Do you know of any other Mac users having a problem?

@div72 would you look into the most inexpensive and expeditious means to sign the release for the mac?

AFAICT, unlike Windows it's meaningless unless you get a cert from Apple ($99/year for the developer program). Also it seems like code signing is not enough, there's also a notarization process where you upload your executable to Apple servers and after some time (less than 15 minutes but can take hours sometimes I read) you can download and apply a stamp to your executable. That finally gets GateKeeper of your back.

@ftneek
Copy link
Author

ftneek commented Feb 17, 2025

Is this really a code signing and notarization issue? I'm just curious because from my understanding 5.4.8.0 wasn't signed or notarized, but I'm able to run it without issue after giving security permissions.

@div72
Copy link
Member

div72 commented Feb 17, 2025

If 5.4.8 worked without an issue that changes things, builds prior to this were built by me on MacOS. Since #2775, we do a cross build from CI in Linux. Let me get a build from MacOS, if it works I can diff to see what's different.

@div72
Copy link
Member

div72 commented Feb 18, 2025

Gridcoin2.app.zip @ftneek Can you try this?

@ftneek
Copy link
Author

ftneek commented Feb 18, 2025

@div72 The described popup still came up and the wallet didn't launch. The normal macOS prompt to enable security permissions did not appear this time.

@div72
Copy link
Member

div72 commented Feb 18, 2025

What about this?

gridcoin-5.4.9-macos_arm64-min-11.0-native.dmg.zip

@ftneek
Copy link
Author

ftneek commented Feb 18, 2025

The wallet loaded up

@jamescowens
Copy link
Member

@div72 do we have a cross-build problem then?

@div72
Copy link
Member

div72 commented Feb 18, 2025

@jamescowens Maybe. One difference I noticed is that cross-builds are completely unsigned while native builds are signed with a self-signed adhoc certificate. Since the current build is unusable for most, can you replace the one on the release page with the one I posted?

@jamescowens
Copy link
Member

jamescowens commented Feb 19, 2025

Yes. Done. Can we get the cross-build to do a self-signed cert?

@jamescowens
Copy link
Member

jamescowens commented Feb 22, 2025

Ping @div72

@div72
Copy link
Member

div72 commented Feb 22, 2025

Can we get the cross-build to do a self-signed cert?

Possible but needs some work. Code signing on MacOS is done by a tool called codesign, a closed source MacOS-only tool part of XCode. (Coincidentally) Upstream has an equivalent tool called signapple which is designed to be a substitute for codesign. I tried to use signapple with an adhoc OpenSSL generated cert which signed the package but failed to create a valid checksum (according to pkg-util on MacOS) which rendered the package/executable dysfunctional. I think it should be possible to fix signapple (the docs references the opensource part of MacOS - libsecurity_utils which has code related to the signature / a special section on macho files) but I need to dive a bit more which is the "needs some work" part.

@jamescowens
Copy link
Member

Ah. Ok. I will assign this bug to you then.

@jamescowens jamescowens added this to the Natasha milestone Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@jamescowens @ftneek @div72 and others