• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Mac OSX Can't build for Mac (from Windows) - Codesigning error

matharoo

manualman
GameMaker Dev.
The IDE is running from Windows, and I'm building for Mac. Testing works totally fine, I can play the game and everything, but when I try to make an executable (app.zip for Steam), I get this error:
System.Exception: Error codesigning .app (1):/Users/apple/GameMakerStudio2/Mac/GMS2MAC/Tubetastic_20/Tubetastic World Splashfest.app: replacing existing signature
Warning: unable to build chain to self-signed root for signer "Developer ID Application: {{NAME}} (XXXXXXXXX)"/Users/apple/GameMakerStudio2/Mac/GMS2MAC/Tubetastic_20/Tubetastic World Splashfest.app: errSecInternalComponent
In subcomponent: /Users/apple/GameMakerStudio2/Mac/GMS2MAC/Tubetastic_20/Tubetastic World Splashfest.app/Contents/Frameworks/libYoYoGamepad.dylib
I got the same error on a totally different project too. I guess something is wrong with how my Mac is set up, but I can't figure out what it is.

Any help is appreciated!

Edit: Happens with YYC too
 
Last edited:

matharoo

manualman
GameMaker Dev.
I had this same problem with a game I worked on last year.

I solved this issue by deleting my certificates, restarting Xcode, and redownloading them.

I hope you get this solved quickly!
Hi! From where exactly did you delete the certificates? Was it from the Keychain Access app or somewhere in Xcode itself?
 

matharoo

manualman
GameMaker Dev.
Sorry for not being clear! Yes, from Keychain Access.

EDIT: When I had the issue, I referenced this thread on the official Apple Developer forums https://forums.developer.apple.com/thread/86161
Okay so here is what I did (which did not work):

1) Removed all certs from Keychain Access and removed the developer account from Xcode Preferences
2) Redownloaded the intermediate certs and installed them
3) Added account to Xcode again and hit "Download Manual Profiles", but since that didn't automatically install my certs, I had to download them one by one from my account and install them

Now the "Warning: unable to build chain to self-signed root for signer" error is gone, so that part works. But I still get the "replacing existing signature" error, which is keeping me from creating the executable.

Any ideas?

Edit: The developer account has three Developer ID Application certificates, and only one them is in my Keychain. Could that be the issue? There's no option to revoke the old ones.
 

AnotherHero

Member
Okay so here is what I did (which did not work):

1) Removed all certs from Keychain Access and removed the developer account from Xcode Preferences
2) Redownloaded the intermediate certs and installed them
3) Added account to Xcode again and hit "Download Manual Profiles", but since that didn't automatically install my certs, I had to download them one by one from my account and install them

Now the "Warning: unable to build chain to self-signed root for signer" error is gone, so that part works. But I still get the "replacing existing signature" error, which is keeping me from creating the executable.

Any ideas?

Edit: The developer account has three Developer ID Application certificates, and only one them is in my Keychain. Could that be the issue? There's no option to revoke the old ones.
Hmmm... This is a weird one.

I remember running into this but I don't know exactly what I did to fix it. This issue comes from the compiler not being sure which certificate to read.
I would try:

  • Make sure in your macOS settings in GMS2 that your Signing Identifier is correct
  • Make sure your certificates are not expired
  • In Xcode, clear your Derived Data
Are there other users on the computer (possibly with other certificates)?
 
S

Sam (Deleted User)

Guest
Does this only happen with apps that use extensions? Also you mentioned this happens from the Windows IDE, does this also happen from the macOS IDE? These details might be good for people who'd potentially help if they knew it.
 

matharoo

manualman
GameMaker Dev.
• Signing Identifier is correct
• Certificates are not expired
• Cleared my Derived Data, still getting the same error
• There are no other users
@Samuel Venable I tested it with a project that has no extensions, and I got the same error

I'm now going to import the project on the Mac and compile it there.
 
S

Sam (Deleted User)

Guest
I see in the OP a mention of libYoYoGamepad.dylib. Perhaps this could be a bug with using gamepads which your game makes use of? My thought is it could be YoYo accidentally shipped an already codesigned gamepad dylib which would create a conflict of certificates and developer ID's, I am guessing.

They told me the runner used to launch from the IDE is codesigned, but exported games are not and that needs to be done by the end user of GMS. Perhaps it could be related and they are using the same gamepad dylib that is codesigned in the runner and they used it in exported games as well by mistake.
 

matharoo

manualman
GameMaker Dev.
I see in the OP a mention of libYoYoGamepad.dylib. Perhaps this could be a bug with using gamepads which your game makes use of? My thought is it could be YoYo accidentally shipped an already codesigned gamepad dylib which would create a conflict of certificates and developer ID's, I am guessing.
Interesting. I guess it doesn't have anything to do with whether the project uses gamepads or not, since two of the three projects that I tested have no gamepad code. But if what you say is true, then I really hope they fix it ASAP... Otherwise we might not be able to do a Mac release on launch day. :(

Of course, the first thing I did before making this thread was submitting a report to YoYo, so let's see how it goes...
 
S

Sam (Deleted User)

Guest
Well, I do believe if I remember correctly that dylib is included in the app bundle whether you actually use it or not, so it could be a problem for that reason regardless.
 

matharoo

manualman
GameMaker Dev.
Okay, I compiled the build on the Mac itself and that worked. I guess I'll just do this every time I want to make an updated executable. Considering that I can run the game from Windows into Mac whenever I want, it's not a big deal.
 
Top