Page 1 of 2

can't add,create volumes Mac OS Catalina

Posted: Sun Jul 07, 2019 5:49 am
by teelekkung
:?: SheepShaver[1380:44701] +[NSXPCSharedListener endpointForReply:withListenerName:]: an error occurred while attempting to obtain endpoint for listener 'com.apple.view-bridge': Connection interrupted
SheepShaver[1380:44570] +[NSXPCSharedListener endpointForReply:withListenerName:]: an error occurred while attempting to obtain endpoint for listener 'com.apple.view-bridge': Connection interrupted
SheepShaver[1380:45140] +[NSXPCSharedListener endpointForReply:withListenerName:]: an error occurred while attempting to obtain endpoint for listener 'com.apple.view-bridge': Connection interrupted
SheepShaver[1380:45034] +[NSXPCSharedListener endpointForReply:withListenerName:]: an error occurred while attempting to obtain endpoint for listener 'com.apple.view-bridge': Connection interrupted
SheepShaver[1380:45289] +[NSXPCSharedListener endpointForReply:withListenerName:]: an error occurred while attempting to obtain endpoint for listener 'com.apple.view-bridge': Connection interrupted
SheepShaver[1380:45321] +[NSXPCSharedListener endpointForReply:withListenerName:]: an error occurred while attempting to obtain endpoint for listener 'com.apple.view-bridge': Connection interrupted

I always get those messages when try to create and remove Volumes

Re: can't add create remove volumes Mac OS Catalina

Posted: Sun Jul 07, 2019 7:29 am
by Ronald P. Regensburg
Which SheepShaver build (date) do you use?

Adding, creating, and removing volumes are different operations. The only thing they have in common is, when you click the "Save and Quit" button, writing he change to the prefs file and asking SheepShaver to quit. Is that when the error occurs?
Does the same happen when you try to change and save other preferences settings?

Re: can't add create remove volumes Mac OS Catalina

Posted: Sun Jul 07, 2019 7:59 am
by teelekkung
Version 2.5, 4 May 2019

every thing is working fine only add and create is not working is always load beach balls

Re: can't add create remove volumes Mac OS Catalina

Posted: Sun Jul 07, 2019 8:12 am
by Ronald P. Regensburg
Also remove? That is strange, it does nothing but change a line in the prefs file.

You select the line with the image file to be removed from the list
Then you click Remove
Then you click Save and Quit

At which point does the problem occur?

Re: can't add create remove volumes Mac OS Catalina

Posted: Sun Jul 07, 2019 8:27 am
by teelekkung
Sorry only create and add volumes

Re: can't add,create volumes Mac OS Catalina

Posted: Sun Jul 07, 2019 3:52 pm
by Ronald P. Regensburg
So, at which point does Add give the problem?

Do you get the Open dialog when you click Add?
Can you navigate to the image file you want to add?
Can you select the file?
Can you click Open?

Re: can't add,create volumes Mac OS Catalina

Posted: Sun Jul 07, 2019 4:23 pm
by teelekkung
all answer is no
https://youtu.be/ILQ4aG9aric this is what happen
the video Quality is need to be hight but it upload at 360p so sorry for bad video

Re: can't add,create volumes Mac OS Catalina

Posted: Sun Jul 07, 2019 5:48 pm
by Ronald P. Regensburg
Apparently this is at the very start of the setup. We do not even know if there already is a ~/.sheepshaver_prefs file.

I will ask almeath to have a look at this thread and see if he can make changes to the volumes list while running SheepShaver in Catalina. He reported that SheepShaver has no issues in Catalina: viewtopic.php?f=20&t=10234

Re: can't add,create volumes Mac OS Catalina

Posted: Mon Jul 08, 2019 4:42 am
by Elyus
Add/Create both use the beginSheetForDirectory method to open a file browser. Apple deprecated that back in 10.6, and 10.15 may be officially dropping support. That looks to be the case in teelekkung's video since all browse modals fail to open.

Apple recommends moving to beginSheetModalForWindow. It may be a direct mapping, but I'm not sure yet.

Re: can't add,create volumes Mac OS Catalina

Posted: Mon Jul 08, 2019 6:18 pm
by guiltydoggy
I found this thread because I was having the same problem. For now, manually editing the ~/.sheepshaver_prefs file has worked as a workaround.

Added to the top of the .sheepshaver_prefs file:

Code: Select all

disk /Full/Path/To/Disk/File
cdrom /Full/Path/To/CD/Image

Re: can't add,create volumes Mac OS Catalina

Posted: Wed Jul 10, 2019 5:03 am
by Elyus
I've attempted to switch to the updated API. It seems to be working in 10.14, but I haven't installed the 10.15 beta yet.

The test build is here (source); can someone running Catalina check if the problem persists?

Re: can't add,create volumes Mac OS Catalina

Posted: Wed Jul 10, 2019 1:22 pm
by guiltydoggy
Elyus - I tested the new build, but it seems to still have the same issue.

Test video: https://youtu.be/c_lyXtxMh6Y

Re: can't add,create volumes Mac OS Catalina

Posted: Wed Jul 10, 2019 4:45 pm
by Elyus
Thank you for checking! Too bad it's not such a quick fix, but I guess this could be a number of different issues. Maybe it's a permissions problem? I'll download the Catalina beta to try tracing the error we're encountering.

Re: can't add,create volumes Mac OS Catalina

Posted: Thu Jul 11, 2019 9:22 pm
by Elyus
Found the problem: it's tied to permissions and the increasingly tight security settings in Mac OS.

Basically, Apple has changed the NS Open and Save panels to always behave as though an application is sandboxed. I take this as further evidence that Apple soon hopes to force all Mac app distribution through its store. The immediate impact is that SheepShaver must be sandboxed to use those native GUI elements.

Therein lies a conflict because SheepShaver's design relies on full disk access to read preferences and load volumes, rom files, etc. Apple still allows these exceptions for the moment, but it looks like they're giving developers a choice: either use Apple's native elements with sandboxing and hardened runtime (requirements for App Store distribution) or use none of them and continue to ask for exceptions from the user for disk and input access (with the risk that fewer and fewer features will function as they add more things like Gatekeeper, SIP, etc).

I favor making SheepShaver sandboxed for better future-proofing, but it means Mac builds will no longer be able to store preferences at ~/.sheepshaver_prefs, and all SheepShaver files will need to be stored in the provided ~/Library/Container location. SheepVM packages will also be an alternative since you could store all relevant files inside a .sheepvm. Outside of that, Apple doesn't provide much access.

The below screenshot is SheepShaver running in the latest developer beta with sandboxing and hardened runtime. To get the program to launch, I used a .sheepvm to hold prefs and nvram, and all the files were placed in Downloads (one of the few locations you can get an entitlement to access).

http://i67.tinypic.com/aucvti.jpg

Re: can't add,create volumes Mac OS Catalina

Posted: Thu Jul 11, 2019 10:38 pm
by adespoton
How much work would it take to store SheepShaver setups in a SheepVM by default? This would simplify things for many users, although it would mean that macOS would work differently than other OSes. And Basilisk II is going to have similar issues, and doesn't do VMs.

Re: can't add,create volumes Mac OS Catalina

Posted: Fri Jul 12, 2019 7:36 am
by Ronald P. Regensburg
A VM with preconfigured prefs file (just file names, no full paths) will use files added to the VM as configured. Multiple disk image names can be preconfigured as SheepShaver simply ignores image files not found.

Re: can't add,create volumes Mac OS Catalina

Posted: Fri Jul 12, 2019 7:55 am
by Ronald P. Regensburg
Elyus wrote:To get the program to launch, I used a .sheepvm to hold prefs and nvram, and all the files were placed in Downloads (one of the few locations you can get an entitlement to access).
Is that so? Is the Downloads folder in that respect different from other folders in the Home folder?
And why didn't you use the files inside the .sheepvm VM?

Re: can't add,create volumes Mac OS Catalina

Posted: Fri Jul 12, 2019 7:08 pm
by Elyus
@adespoton, in addition to Ronald's manual suggestion, we could make SheepShaver copy selected files to the current VM for those using the GUI. BasiliskII accepts a custom pref file at launch, so it could do something similar. Although, as you point out, defaulting to VMs would be very different than other versions; it may be equally confusing for some as it is easier for others.

Ronald P. Regensburg wrote:Is that so? Is the Downloads folder in that respect different from other folders in the Home folder?
And why didn't you use the files inside the .sheepvm VM?
Yes, Downloads and media (Pictures, Music, and Movies) are allowed by Apple through their own entitlements. That's partly why I didn't place the files in a SheepVM, to test the Downloads entitlement.

Looking at the sandbox documentation more, we could use Security-Scoped Bookmarks with user-selected files to partially restore current functionality. Theoretically, if the user approves the preference and nvram location on first launch, SheepShaver could continue to use the home directory, and then we obtain permission for persistent resource access as users build up their files in settings. However, adding volumes outside the GUI would no longer be supported as SheepShaver wouldn't obtain the correct permissions.

Re: can't add,create volumes Mac OS Catalina

Posted: Fri Jul 12, 2019 7:56 pm
by Ronald P. Regensburg
With "entitlements" do you mean what in English is usually called "permissions" and "privileges"?
In my Home folder on my Mojave system, the folders Documents, Pictures. Movies, Music, Desktop, and Downloads have identical permissions and privileges.

Re: can't add,create volumes Mac OS Catalina

Posted: Fri Jul 12, 2019 8:50 pm
by emendelson
"Entitlements" is Apple's English-language term for permissions to do certain actions. Here are the details:

https://developer.apple.com/library/arc ... ments.html

Re: can't add,create volumes Mac OS Catalina

Posted: Sat Jul 13, 2019 10:58 am
by Ronald P. Regensburg
OK. This is new to me. I will not even try to understand all of this. :sad:

Re: can't add,create volumes Mac OS Catalina

Posted: Sun Jul 14, 2019 7:17 pm
by Ronald P. Regensburg
Well, I will need to try and understand.

Which entitlements would SheepShaver need to have in order to run as it did in earlier macOS versions?
- Read/write access to files the user has selected using an Open or Save dialog
- Network access
- More?

Will read/write access to hidden "dot" files be at all possible?

Re: can't add,create volumes Mac OS Catalina

Posted: Sun Jul 14, 2019 7:24 pm
by emendelson
EDIT: I haven't experimented with the default SheepShaver build yet, but will do and report. It's easy to change the code so that the prefs and PRAM are ordinary, not hidden, files, and I've done that in my build, but it may not be necessary.

Also, I think it's impossible to notarize SheepShaver. When I build it with the Hardened Runtime option enabled (as it has to be for notarization), it runs correctly. But when I apply the command-line command that prepares the application for notarization, it does something (I don't know what) that causes SheepShaver to crash on launch.

The best that can be done with SheepShaver, I think, is codesign it.

I'll experiment later with the current build and report what happens.

Re: can't add,create volumes Mac OS Catalina

Posted: Sun Jul 14, 2019 10:38 pm
by emendelson
While I'm testing (full report later), here is a script that will open .sheepshaver_prefs in TextEdit, so that you can add an existing disk image to the prefs. This should make things easier until SheepShaver gets fixed.

Edit SheepShaver Prefs

My guess is that Adespoton or another expert here can write an AppleScript or application that will create a suitable disk image, to take the place of the existing "Create" option in the Preferences.

EDIT: The script is now added to the downloads in the wiki. I also changed the link above to point to the file in the wiki sheepshaver downloads.

Re: can't add,create volumes Mac OS Catalina

Posted: Mon Jul 15, 2019 1:29 am
by emendelson
So: under Catalina, everything seems to work in SheepShaver except in the Preferences, where "Add", "Create" and the "Browse" buttons don't work. If you add a disk to the prefs file by hand, then it will appear in the Preferences, and you can remove it, but you can't add a disk except by editing the file.