Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse quit Unexpectedly on MacOS

I have just installed Eclipse IDE for Enterprise Java and Web Developers on Mac OS Catalina Version 10.15.7, yesterday. I dragged the Eclipse.app from the Downloads folder to the Application folder. It was working just fine. I created a couple of servlets. But today when I clicked on the app to open it, I got a problem report (Error), and so it didn't open.

The error details are..

Time Awake Since Boot: 3300 seconds

System Integrity Protection: enabled

Crashed Thread: 0

Exception Type: EXC_CRASH (Code Signature Invalid) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note:
EXC_CORPSE_NOTIFY

Termination Reason: Namespace CODESIGNING, Code 0x1

kernel messages:

VM Regions Near 0 (cr2):

__TEXT                 000000000c447000-000000000c44b000 [   16K] r-x/r-x SM=COW  

Thread 0 Crashed: 0 ???
0x0000000015674000 _dyld_start + 0

Thread 0 crashed with X86 Thread State (64-bit): rax: 0x0000000000000000 rbx: 0x0000000000000000 rcx: 0x0000000000000000 rdx: 0x0000000000000000 rdi: 0x0000000000000000 rsi: 0x0000000000000000 rbp: 0x0000000000000000 rsp: 0x00007ffee37bcc60
r8: 0x0000000000000000 r9: 0x0000000000000000 r10: 0x0000000000000000 r11: 0x0000000000000000 r12: 0x0000000000000000 r13: 0x0000000000000000 r14: 0x0000000000000000 r15: 0x0000000000000000 rip: 0x0000000015674000 rfl: 0x0000000000000200 cr2: 0x0000000000000000 Logical CPU: 0 Error Code:
0x00000000 Trap Number: 0


In fact, I already googled the issue but the solutions that worked for others didn't work for me. For example, I tried the following solutions:

  • move the Eclipse.app from the Application folder
  • eclipse -clean
  • I double clicked the executable eclipse, which in /Applications/Eclipse.app/Contents/MacOS

I thought of re-installing Eclipse, but before that I want to know if there is a solution for this issue.

like image 486
Rawa Avatar asked Jul 17 '26 13:07

Rawa


1 Answers

Modern Eclipse (2021-09 and perhaps even before) has a major incompatibility with Gatekeeper which checks for CODESIGNING of the Eclipse.app bundle. Self-modification of bundles is not permitted by Apple as it undermines the security model of macOS -- as malware protection (Xprotect). See: https://eclecticlight.co/tag/gatekeeper/

I suspect the Info.plist changes after initial launch or when modifying some user preferences or IDE settings.

Workaround such as trying to codesign manually is cumbersome and didn't work for me on Catalina:

codesign -v -vvv --deep /Applications/Eclipse.app
/Applications/Eclipse.app: invalid Info.plist (plist or signature have been modified)
In architecture: x86_64

sudo codesign --force --sign -  /Applications/Eclipse.app
Password:
/Applications/Eclipse.app: replacing existing signature
/Applications/Eclipse.app: bundle format unrecognized, invalid, or unsuitable
In subcomponent: /Applications/Eclipse.app/Contents/MacOS/${user.home}

What did work for me was defining an exception for Gatekeeper's Xprotect by recursive removal specific extended attribute for quarantine. Use the following directly after installing Eclipse and before running it:

xattr -r -d com.apple.quarantine /Applications/Eclipse.app

See: https://eclecticlight.co/2019/06/17/what-to-do-when-you-cant-launch-an-app/

like image 121
Anthony Avatar answered Jul 19 '26 10:07

Anthony



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!