Mac OS builds and steamworks plugin not working after signing

We have a game on steam which was last updated on Steamworks in January (we used a CoronaSDK build from December 2019) for this and while we did not notarise that version, all things worked flawlessly-- the app would download correctly from Steam and connect to the Steam client to allow us to use profile features through the steamworks plugin.

Note that this build was not notarised but it was signed.

Now, I have been trying to get a new build uploaded (tried various versions of Corona-- mainly 3583, 3590 and some older ones too) and after I create the .app and sign it, the steamworks features don’t work and the app is unable to see the steam client.

This does not happen in the simulator-- everything works fine there and the steam client is connected and I can login without issues.

Further, after I download this new build from Steam and try running it, it won’t run at all. I have successfully notarised my builds too. I also don’t think this has to do with notarisation because if I set our older build from January as our live build, it downloads and works fine despite no notarisation and my mac running Catalina.

We only use the mixpanel plugin and Coronalabs’ steamworks plugin besides which there’s not much in out build file.

We have previously got enough builds up and running on steam and didn’t expect running into these issues and are kind of in a tough spot now because we need to update the app before the 25th. Any help will be appreciated!

@vlads
Could you please weigh in on this? We have tried again with the latest Solar 2d builds and the mac os steamworks plugin doesn’t work after the build is signed. We’ve tried signing through the simulator and terminal but as soon as it’s signed, it stops detecting the steam client.

When unsigned, it works fine in the simulator as well as after building.

Thanks in advance.

Try notarizing your app…

I did. We had actually stopped signing our Steam builds altogether but only started again for Catalina’s notarisation requirement.

I have a valid developer ID application certificate and signed the app and notarised it successfully. Have tried this a couple of times and it’s the same problem-- an unsigned build detects the Steam client running in the background while a signed/notarised build doesn’t.

With Mac, most users tend to upgrade sooner or later to the newer versions of the OS and therefore completely avoiding notarisation does not seem like a good option at all. Would really appreciate your help.

@vlads sorry I’m tagging you again… we’ve tried everything by now so it would be generally helpful for everyone if you might look into this:

  • The steamworks plugin does not work with signed builds (either through simulator or terminal).
  • Notarisation is working after the build is signed but like I said, the plugin doesn’t work and it doesn’t detect the steam client so the whole process becomes useless.
  • Only way we are able to, therefore, upload fully working builds to Steam is without signing and without notarising.
  • Signed builds used to work and the client is detected successfully if I use an old Corona build (3561) but notarisation fails using those builds so we’re stuck.

It does seem there’s some issue in the newer builds (including the Corona daily builds from 2020). It’d be quite helpful if you could look into this as support for Catalina and future versions is something that is an inevitability for the future of Solar2D on Mac. Thanks

This feels like entitlements issue.
To display entitlements, drag&drop your app onto Terminal app (or cd into it), then run

codesign --display --entitlements :- .

I believe for macOS to successfully work with steam plugin it should have quite a bit of entitlements. I think you can add them using build.settings, and the app must be signed & notarized.

osx = {
    entitlements = {
        ["com.apple.security.cs.allow-jit"] =  true,
        ["com.apple.security.cs.allow-unsigned-executable-memory"] =  true,
        ["com.apple.security.cs.allow-dyld-environment-variables"] =  true,
        ["com.apple.security.cs.disable-library-validation"] =  true,
        ["com.apple.security.cs.disable-executable-page-protection"] =  true,
        ["com.apple.security.cs.debugger"] =  true,
    },
},
1 Like

@vlads Appreciate the insight, Vlad. It did turn out to be an entitlements issue and just selecting all those entitlements in SD Notary before notarising did the trick. Very grateful for your help!

Vlad, I am having the same problem of the steam steamworks.isLoggedOn returns true while in the simulator on Mac but when I build the app it returns false. I have the app signed and I have tested it with and without notarized both locally and on steam. I have confirmed all of the entitlements you mentioned are in the app. Do you have any other ideas what would be causing it to fail within the built app?

I ran the Console app on Mac and I see these errors that I believe are related to trying to connect to the steam client. It appears to be a sandbox restriction, but I am not positive this is the case. I am looking for additional entitlements that might remove the sandbox restriction. Still researching. Does this give you any ideas?

error 11:41:37.038535-0700 Family Persistent store service connection invalidated: failed at lookup with error 159 - Sandbox restriction
error 11:41:37.038623-0700 Family Error communicating with persistent store service proxy: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.contactsd.persistence was invalidated: failed at lookup with error 159 - Sandbox restriction. UserInfo={NSDebugDescription=The connection to service named com.apple.contactsd.persistence was invalidated: failed at lookup with error 159 - Sandbox restriction.}
error 11:41:37.038726-0700 Family Error connecting to remote endpoint: (null)
error 11:41:37.038770-0700 Family fault: Unable to create token NSXPCConnection. NSXPCStoreServerEndpointFactory 0x13bf2a490 -newEndpoint returned nil
fault 11:41:37.038850-0700 Family CoreData: Unable to create token NSXPCConnection. NSXPCStoreServerEndpointFactory 0x13bf2a490 -newEndpoint returned nil
error 11:41:37.038918-0700 Family error: Failed to create NSXPCConnection

It seems it needs some additional sandbox entitlements. Not sure which ones.

Attempt some more logging around the place you are doing the call. Also try making some other calls