CopyQ icon indicating copy to clipboard operation
CopyQ copied to clipboard

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

Open egel opened this issue 11 months ago • 8 comments

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 avatar Mar 23 '24 00:03 egel

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

Firstero avatar Mar 25 '24 15:03 Firstero

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

Firstero avatar Mar 25 '24 15:03 Firstero

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

Firstero avatar Mar 25 '24 15:03 Firstero

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

shouldn't brew add it to their debug messsage?

ssi-anik avatar Mar 28 '24 12:03 ssi-anik

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

aleksandrs-ledovskis avatar Mar 30 '24 14:03 aleksandrs-ledovskis

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

it works fine on m3 mac

Tance avatar Apr 29 '24 02:04 Tance

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

FullDataAlchemist avatar Jun 24 '24 05:06 FullDataAlchemist

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.

minhaj6 avatar Sep 19 '24 04:09 minhaj6