NSSavePanel and NSOpenPanel does not work on macOS 10.15 as its out of process like sandboxed app

763 views Asked by At

On Catalina using NSSavePanel constructor or static object gives error

eclipse +[NSXPCSharedListener endpointForReply:withListenerName:]: an error occurred while attempting to obtain endpoint for listener 'com.apple.view-bridge': Connection interrupted.

So what API/hack should be used so that NSPanel will properly in macOS Catalina 10.15?

2

There are 2 answers

0
Hendrik Ebbers On

I had the same problem today in an application that is based on Kickstart4J.

When Kickstart4J installs the JRE that should be used to start the application it changes the permissions of the java executable to rwxr--r--. This change always ended in the error.

By changing the permissions of the java executable later to rwxr-xr-x solved the problem. I still have no idea why this is working and an explanation of this behavior would be great.

0
musanim On

I've seen the same symptom in multiple third-party applications (Microsoft Word and Excel, Avid Sibelius, etc.) as well as my own. The problem is intermittent; it usually goes away if I close all open applications and try again, and (so far) it always goes away if I restart the system. In my app, I see the same error message as reported by the original poster here.