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

QGIS 3.34 macOS Code Signature Issue #55930

Open
2 tasks done
uurazzle opened this issue Jan 22, 2024 · 8 comments
Open
2 tasks done

QGIS 3.34 macOS Code Signature Issue #55930

uurazzle opened this issue Jan 22, 2024 · 8 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! macOS

Comments

@uurazzle
Copy link

uurazzle commented Jan 22, 2024

What is the bug or the crash?

Code Signature Issue

Steps to reproduce the issue

Run the following command to verify the QGIS 3.34. application code signature:

spctl -a -vv /Volumes/QGIS.app/QGIS.app 
/Volumes/QGIS.app/QGIS.app: rejected (invalid destination for symbolic link in bundle)
origin=Developer ID Application: Open Source Geospatial Foundation (4F7N4UDA22)

Versions

3.34

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

Additional context

Here is some interesting general information to checkout and share with your macOS developer on resolving Gatekeeper problems on macOS.

Resolving Gatekeeper Problems | Apple Developer Forums:

The post titled "Resolving Gatekeeper Problems" on the Apple Developer Forums, written by Quinn "The Eskimo!" from Developer Technical Support at Apple is a comprehensive guide addressing common issues related to Gatekeeper on macOS. Gatekeeper is a security feature designed to ensure that only trusted software runs on a user's Mac, and the post focuses on helping developers troubleshoot and resolve issues that may arise in this context.
The post identifies four common Gatekeeper problems that developers may encounter:

  1. App blocked by a dangling load command path.
  2. Broken code signature.
  3. Lack of notarization.
  4. Command-line tool blocked by Gatekeeper.

For each of these issues, the post provides detailed steps and guidance on how developers can resolve them. The emphasis is on the importance of passing Gatekeeper checks to maintain customer trust and avoid potential loss of customers.
Key points covered in the post include:

• Verification of Code Signature: Developers are advised to use the codesign tool to verify that their code is signed correctly. The post provides examples of command-line usage to check for issues such as missing or invalid sealed resources.
• Notarization Issues: Gatekeeper requires that apps be notarized, and the post guides developers on how to identify and resolve notarization problems. It includes information on checking system logs for specific entries related to notarization issues.
• Hash Mismatch: In cases where there's a hash mismatch, the post provides guidance based on the file type (e.g., zip archive, signed disk image, installer package) and recommends specific actions to address the problem.
• Command-line Tool Blocking Bug: A known bug in macOS is acknowledged, where double-clicking a command-line tool in Finder may lead to it being blocked by Gatekeeper. Workarounds, such as embedding the tool in an application or using an installer package, are suggested.

Throughout the post, there are references to Apple's documentation and resources related to code signing and notarization, providing developers with additional information for a deeper understanding.

https://forums.developer.apple.com/forums/thread/706379

@uurazzle uurazzle added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Jan 22, 2024
@kentr
Copy link

kentr commented Jul 9, 2024

I'm also getting this on 3.34 and 3.38. Both are installed with Homebrew.

Standard attempts to open in the Finder result in the well-known dialog warning that the developer can't be verified.

I searched for invalid symlinks with find /Applications/QGIS.app -type l -exec test ! -e {} \;. Nothing turned up.

@uurazzle
Copy link
Author

uurazzle commented Jul 9, 2024

I would recommend the QGIS developers check the Apple developer forum posts for best practices, etc:

https://forums.developer.apple.com/forums/thread/706379

Try the GUI utility called Apparency, which was written by a former Apple Engineer for reference/review.

https://mothersruin.com/software/Apparency/

For example, the QGIS version 3.38.0 has the following issues, "unnotarized developer", "no signature" on applications and components, etc.

image

@agiudiceandrea
Copy link
Contributor

Hi @jef-n, have you seen this issue report?

@jef-n
Copy link
Member

jef-n commented Jul 17, 2024

Hi @jef-n, have you seen this issue report?

No, I'm not in charge of mac packaging.

Might relate to the expired certificate - although according to https://download.qgis.org//downloads/macos/qgis-macos-pr.latest.log the signing did work.

I just try to keep the build afloat as nobody else seems to care - with next to no mac knowledge and marginal personal interest in the platform.

@uurazzle
Copy link
Author

uurazzle commented Aug 16, 2024

Hi:

Ok, understand if the developers don't think this is a priority, but In macOS Sequoia, users can no longer override Gatekeeper by Control-clicking to open unsigned or non-notarized software; instead, they must review and permit such software through System Settings > Privacy & Security. To ensure smooth distribution of software outside the Mac App Store, it's recommended to submit it for notarization, which involves Apple's security checks and helps users run the software with confidence.

developer.apple.com

Here is Apple Developer documentation on how to notarize software;
https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution

@nyalldawson
Copy link
Collaborator

@uurazzle

understand if the developers don't think this is a priority

That's not the case. It's definitely seen as a priority, but there's no one active in the qgis developer community who has the skills and knowledge necessary to resolve this. 🤷‍♂️

@marcelpogorzelski
Copy link

A workaround after moving QGIS to Applications folder:

  1. Open Terminal
  2. sudo xattr -r -d com.apple.quarantine "/Applications/QGIS.app"

This removes the quarantine flag and Gatekeeper no longer blocks QGIS.

@marcelpogorzelski
Copy link

Running the xattr command reveals two problematic symlink:
/Applications % sudo xattr -r -d com.apple.quarantine "/Applications/QGIS.app"
xattr: No such file: /Applications/QGIS.app/Contents/Resources/kb-layouts
xattr: No such file: /Applications/QGIS.app/Contents/Resources/color-schemes

Here are what the to point to:
color-schemes -> ./grass/qtermwidget/color-schemes
kb-layouts -> ./grass/qtermwidget/kb-layouts

Can you guys remove this to symlinks on Mac an see if that helps with Notorization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! macOS
Projects
None yet
Development

No branches or pull requests

6 participants