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

After installing CopyQ via brew results “CopyQ.app” is damaged and can’t be opened #2652

Open
egel opened this issue Mar 23, 2024 · 8 comments
Labels
bug help wanted Needs a volunteer to investigate/implement the issue macOS Relates to macOS

Comments

@egel
Copy link

egel commented Mar 23, 2024

Describe the bug
“CopyQ.app” is damaged and can’t be opened after installing CopyQ on macOS M1 Pro 14.4 via brew

To Reproduce
Steps to reproduce the behavior:

  1. install CopyQ via brew ``
  2. Open application
  3. See error (from screenshot)

Expected behavior
After installation application should be able to be opened.

Screenshots
image

Version, OS and Environment

  • Application Version 8.0.0
  • macOS Sonoma 14.4

Additional context
Install & also reisntall log was successful

→ brew reinstall --cask copyq
==> Caveats
copyq is not signed and requires Accessibility access,
so you will need to re-grant Accessibility access every time the app is updated.

Enable or re-enable it in:
  System Preferences → Security & Privacy → Privacy → Accessibility
To re-enable, untick and retick copyq.app.

==> Downloading https://github.com/hluk/CopyQ/releases/download/v8.0.0/CopyQ-macos-12-m1.dmg.zip
Already downloaded: /Users/johndoe/Library/Caches/Homebrew/downloads/256ef5fcd1e5d6254b9d55622f8659f472ea420a2b55ac117f54529f733d4e2a--CopyQ-macos-12-m1.dmg.zip
==> Uninstalling Cask copyq
==> Backing App 'CopyQ.app' up to '/opt/homebrew/Caskroom/copyq/8.0.0/CopyQ.app'
==> Removing App '/Applications/CopyQ.app'
==> Purging files for version 8.0.0 of Cask copyq
==> Installing Cask copyq
==> Moving App 'CopyQ.app' to '/Applications/CopyQ.app'
🍺  copyq was successfully installed!
@egel egel added the bug label Mar 23, 2024
@Firstero
Copy link

Emm, I encountered the same issue And it's also the same environment.

@Firstero
Copy link

@egel "Perhaps it's because the chip architecture is M2?"

@Firstero
Copy link

xattr -d com.apple.quarantine /Applications/CopyQ.app
codesign --force --deep --sign - /Applications/CopyQ.app

@ssi-anik
Copy link

xattr -d com.apple.quarantine /Applications/CopyQ.app codesign --force --deep --sign - /Applications/CopyQ.app

shouldn't brew add it to their debug messsage?

@aleksandrs-ledovskis
Copy link

YMMV, but the codesign trick works for me on an Apple Silicon machine without need to revert versions. 🤷‍♂️

@hluk hluk added macOS Relates to macOS help wanted Needs a volunteer to investigate/implement the issue labels Apr 14, 2024
@Tance
Copy link

Tance commented Apr 29, 2024

xattr -d com.apple.quarantine /Applications/CopyQ.app codesign --force --deep --sign - /Applications/CopyQ.app

it works fine on m3 mac

@FullDataAlchemist
Copy link

I have the same problem on m3 for version 9.0.0 and the previous version.
macOS 14.5 Sonoma

after using the codesign trick the app just closed immediately after oppening

@minhaj6
Copy link

minhaj6 commented Sep 19, 2024

Just leaving this here for someone ----

Here’s an explanation of each command:

xattr -d com.apple.quarantine /Applications/CopyQ.app:

xattr: Stands for "extended attributes." This command manages extended attributes of files in macOS.
-d: Deletes a specific attribute.
com.apple.quarantine: This is the quarantine attribute that macOS adds to files downloaded from the internet. It flags them as needing user approval to run (for security).
/Applications/CopyQ.app: This is the path to the app where you want to remove the quarantine attribute.
Purpose: This command removes the quarantine flag from the CopyQ.app, allowing it to run without macOS's security warnings.

codesign --force --deep --sign - /Applications/CopyQ.app:

codesign: Used to sign code on macOS, which ensures its integrity and authenticity.
--force: Forces the signing process to overwrite any existing signatures.
--deep: Ensures that all nested code, like frameworks or helper applications inside the app bundle, are also signed.
--sign -: The - indicates ad-hoc signing, meaning no certificate is used (it's unsigned in the traditional sense, but the OS sees it as being signed).
/Applications/CopyQ.app: This is the path to the app being signed.
Purpose: This command ad-hoc signs the CopyQ.app, ensuring macOS treats it as a valid application and can run it without any security blocks related to code signing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help wanted Needs a volunteer to investigate/implement the issue macOS Relates to macOS
Projects
None yet
Development

No branches or pull requests

8 participants