Could not open in editor: The application /Users/.../MGCB Editor.app cannot be opened for an unexpected reason

I always get the following error when I want to open the file Content.mgcb in Visual Studio Code on my iMac.

Could not open in editor: The application /Users/name/.nuget/packages/dotnet-mgcb-editor-mac/3.8.1.303/tools/net6.0/any/MGCB Editor.app cannot be opened for an unexpected reason, error=Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x7ff625719fa0 {Error Domain=NSPOSIXErrorDomain Code=111 "Unknown error: 111" UserInfo={NSLocalizedDescription=Launchd job spawn failed}}}


In addition, I have tried to open the file manually in Finder but then I get the message(in German) that the program cannot be opened:


Is it possible that I cannot open the program because it is related to a permission problem like in this thread: Big Sur Problem?: "You do not have… | Apple Developer Forums

How can I enable permission for this program if I cannot open the program because of a permission problem?

I use macOS Sonoma 14.2.

iMac 27″, macOS 14.2

Posted on Dec 17, 2023 5:53 AM

Reply

Similar questions

6 replies

Dec 17, 2023 10:53 AM in response to Flying_Red_Panda

Check for app updates, and also check the installation instructions, then check with the app developer:

https://monogame.net/articles/getting_started/1_setting_up_your_development_environment_unix.html


Cross-platform apps and tools provide their own unique platform and their own frameworks and tools, and are not really (from the cross-platform tool-user’s perspective) using the native platform. Accordingly, I’d suggest seeking info and asking for help in the app-related forums:

https://docs.monogame.net/articles/help_and_support.html


From over there:

https://community.monogame.net/t/how-can-i-open-the-mgcb-editor-on-macos-sonoma/19727

https://community.monogame.net/t/how-should-i-install-and-use-monogame-on-macos-is-it-better-not-to-use-visual-studio-for-mac-alternative-recommendations/19929


Based on those, some folks are having some issues with MonoGame running on macOS.

Jan 13, 2024 7:08 AM in response to MrHoffman

I have described my problem in the MonoGame Discord channel and I have recently created an issue on their github page. I have tried a newer MonoGame develop version but the problem with the newer version is still that it is not opening and I get no error message with the newer develop version.


With the public Monogame release 3.8.1.303 I get this in the macOS Terminal:

codesign -vvvv /Applications/bgedvree/bgedvree/Content/Content.mgcb

/Applications/bgedvree/bgedvree/Content/Content.mgcb: code object is not signed at all

sudo codesign --deep -fs cert_name /Applications/bgedvree/bgedvree/Content/Content.mgcb

Password:

error: The specified item could not be found in the keychain.


With the Monogame release 3.8.1.574-develop I get this in the macOS Terminal:

codesign -vvvv /Applications/MyGame5/MyGame5/Content/Content.mgcb

/Applications/MyGame5/MyGame5/Content/Content.mgcb: code object is not signed at all

sudo codesign --deep -fs cert_name /Applications/MyGame5/MyGame5/Content/Content.mgcb

Password:

error: The specified item could not be found in the keychain.


Is it not possible to open a file on macOS Sonoma if it says in Terminal "code object is not signed at all"?

Why is sudo codesign not working?

Dec 17, 2023 12:03 PM in response to Flying_Red_Panda

If the source code was built locally, it should already be signed implicitly.


I would again encourage discussing this with the folks that know the MonoGame apps best, as Mono is not a small environment and not a small dependency. It's basically a whole lot of Microsoft Windows, emulated.


If you want to wade into this yourself, start with that launchd operation that isn't succeeding.

Dec 17, 2023 11:23 AM in response to MrHoffman

I have tried the following in Terminal, but I get permission denied and I don't know why. In addition, I'm not sure if it is a permission problem, maybe the application is not working on macOS Sonoma.


codesign --force --deep --sign - /Users/name/.nuget/packages/dotnet-mgcb-editor-mac/3.8.1.303/tools/net6.0/any/MGCB\ Editor.app

/Users/name/.nuget/packages/dotnet-mgcb-editor-mac/3.8.1.303/tools/net6.0/any/MGCB Editor.app: replacing existing signature

/Users/name/.nuget/packages/dotnet-mgcb-editor-mac/3.8.1.303/tools/net6.0/any/MGCB Editor.app: Permission denied

In subcomponent: /Users/name/.nuget/packages/dotnet-mgcb-editor-mac/3.8.1.303/tools/net6.0/any/MGCB Editor.app/Contents/MacOS/CppNet.dll


Jan 13, 2024 7:56 AM in response to Flying_Red_Panda

You’re running a cross-platform framework, which means the framework folks are your platform, and not whatever platform the framework is running on. You’re asking the wrong crowd for help. In this case, the cross-platform framework seems to have some gaps in their platform support or their platform testing. You’ll want to continue to discuss your issues with the folks that know the cross-platform framework best. If you want to shift the priorities of the developers over there to better align with yours, maybe offer a bounty or reward or whatever the framework calls those.


If you want to try to pursue this yourself, did you specify the name of your Apple developer cert there?


Some links to the codesign tool, notarization and signing-related info:

Faster and simpler notarization for Mac apps - WWDC21 - Videos - Apple Developer

Creating Distribution-Signed Code … | Apple Developer Forums

Packaging Mac Software for Distrib… | Apple Developer Forums

Fetching the Notary Log | Apple Developer Forums





Jan 13, 2024 9:57 AM in response to Flying_Red_Panda

I have seen that I used the wrong command in Terminal. But even with this command the file is not opening. I will wait until they release a new version of MonoGame for macOS because it is not working as expected.


sudo codesign --force --deep --sign - /Applications/bgedvree/bgedvree/Content/Content.mgcb

Password:

codesign -vvvv /Applications/bgedvree/bgedvree/Content/Content.mgcb

/Applications/bgedvree/bgedvree/Content/Content.mgcb: valid on disk

/Applications/bgedvree/bgedvree/Content/Content.mgcb: satisfies its Designated Requirement

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Could not open in editor: The application /Users/.../MGCB Editor.app cannot be opened for an unexpected reason

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.