CopyQ icon indicating copy to clipboard operation
CopyQ copied to clipboard

'can't open application' error on macOS Big Sur

Open MemeFormer opened this issue 1 year ago • 5 comments

Describe the bug

when trying to open after fresh install with brew install --cask copyq I get this:

Screen Shot 2024-05-11 at 5 07 18 PM Screen Shot 2024-05-11 at 5 07 02 PM

Version, OS and Environment

Screen Shot 2024-05-11 at 5 08 02 PM

Application Version:

well, about that.. even if

Screen Shot 2024-05-11 at 5 18 27 PM

and

Screen Shot 2024-05-11 at 5 19 09 PM

there is

Screen Shot 2024-05-11 at 5 19 42 PM

???

MemeFormer avatar May 11 '24 15:05 MemeFormer

Me too.

zishuzy avatar May 12 '24 10:05 zishuzy

It looks broke on Sonoma as well.

I suspect this is related to https://github.com/hluk/CopyQ/issues/2710.

image

rsshilli avatar May 13 '24 19:05 rsshilli

Oh. From https://github.com/hluk/CopyQ/issues/1331 I learned this trick. It fixed it for me:

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

rsshilli avatar May 13 '24 19:05 rsshilli

Troubleshooting and Solution for CopyQ Installation Issue on macOS BigSur 11.7.10

Issue: Unable to run CopyQ after installation on macOS due to a specific Dyld Error Message indicating missing symbols related to Qt libraries.

Initial Steps and Encountered Issues:

  1. Confirmed Installation Location:

    • Verified the location of CopyQ installation using:
      ls /Applications | grep CopyQ
      mdfind "kMDItemDisplayName == 'CopyQ' && kMDItemKind == 'Application'"
      open -a CopyQ
      
  2. Encountered Error:

    • Dyld Error Message:
      Symbol not found: __ZNKSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE3strEv
      Referenced from: /Applications/CopyQ.app/Contents/MacOS/../Frameworks/QtWidgets.framework/Versions/A/QtWidgets (which was built for Mac OS X 12.0)
      Expected in: /usr/lib/libc++.1.dylib
      
  3. Initial Troubleshooting Steps:

    • Attempted to reinstall CopyQ via Homebrew:
      brew install --cask copyq
      
  4. Further Issues:

    • Homebrew upgrade process got stuck multiple times during llvm build.
    • Encountered errors when trying to install Qt due to missing full Xcode installation:
      brew install qt
      brew link --force qt
      

Final Solution:

  1. Resolution via .dmg Installer:

    • Decided to use an older version of CopyQ available as a .dmg file.
    • Downloaded and installed CopyQ 6.3.0-gbf2d498e-v6.3.0 from the CopyQ GitHub releases page.
    • The installation went smoothly with no issues.
  2. Clarification on Alternative Suggestion:

    • A commenter suggested dealing with macOS security prompts using command line, but this was unrelated to the underlying issue.
    • These security prompts can generally be bypassed by right-clicking (or Ctrl+clicking) the application and selecting "Open".

Additional Notes:

  • Homebrew Fix Not Possible:

    • Due to the extensive time and resource requirements for building llvm and installing Qt, updating Homebrew dependencies wasn't feasible in this case.
  • Specific Error Analysis:

    • The initial error was related to a mismatch or missing Qt library built for a different macOS version. This pointed us towards updating dependencies, which led to discovering the Xcode requirement.
  • Potential for Newer .dmg Versions:

    • While version 6.3.0 worked, other newer versions might also work. Users are encouraged to try different versions if necessary.

Conclusion

Using an older .dmg version of CopyQ proved to be a successful workaround, bypassing the complex dependency issues faced with Homebrew installations. This approach may save time and avoid the intricacies of manually resolving build errors for others encountering similar problems.

MemeFormer avatar May 22 '24 20:05 MemeFormer

I hope some of the issues are fixed in #2661. :crossed_fingers:

hluk avatar May 23 '24 08:05 hluk

Oh. From #1331 I learned this trick. It fixed it for me:

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

To make this more easily findable on google, this fixes the "copyq is damaged and can't be opened" error

joshpetit avatar Jun 19 '24 20:06 joshpetit

Closing as duplicate of #2652.

I'm updating installation steps in #2757.

hluk avatar Jun 25 '24 12:06 hluk