unity-builder: Unity builds for StandaloneOSX are not runnable.

When building for StandaloneOSX, the resultant file uploaded to artifacts isn’t runnable.

If you add executable permissions to the artifact the project can then be run.

chmod +x [PATH-TO-ARTIFACT]/StandaloneOSX/StandaloneOSX.app/Contents/MacOS/*

I’m not entirely sure where this would be added in the build pipeline, but I imagine these permissions should be added prior to artifact upload.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 10
  • Comments: 21 (12 by maintainers)

Most upvoted comments

If anyone finds this on Google like I did, there’s a more up to date issue discussing this here: https://github.com/game-ci/documentation/issues/262

It sounds like distributing a macOS app pretty much now requires going through the codesign process. I believe the initial issue (builds not runnable without chmod +x path/to/executable) has been fixed, so maybe we should close this issue and open a new issue for documentation about macOS distribution? We may want to create a docs/github/deployment/macos page that goes into codesign, notarization, and maybe even fastlane for mac apps.

None of the above worked for me however I did notice with the downloaded application that it has extra attributes when running

ls -la
drwxr-xr-x@ 3 <Zetonia>  staff    96 11 Mar 01:26 zetonia.app
	com.apple.quarantine	  57 

If i run the following command on the file then it opens fine.

xattr -d com.apple.quarantine zetonia.app

Should this be fixed in webbertakken/unity-builder@v2.0-aplha-5?

I am seeing this issue as well.

Incase it’s useful, I ran into this issue today (The application “StandaloneOSX” can’t be opened) and doing chmod +x StandaloneOSX.app/Contents/MacOS/* in terminal solved the issue. Mac OS 10.15.7

I tried again with -nographics and @master (which uses unitybuilder@v1.4 right now) and I also reproduced LSOpenURLsWithRole() failed with error -10810 for the file /Downloads/Build/StandaloneOSX/StandaloneOSX.app. here: https://github.com/Unity-CI/unity-actions-example/tree/9f0672b9e4a79c738bcf2814c6a893cd66e196d5.

@webbertakken there seem to be a regression. I’ll spin a matrix with all unity-builder and try to locate the regression

@mastef I reproduced your exact same error.

I did reproduce the issue where StandaloneOSX’s executable needs to be chmod +x for the app to start. I wonder what’s going on. Tested with recent 2020.1.7f1 version on a very simple project here: https://github.com/Unity-CI/unity-actions-example

edit: oh, I used unity-ci.com docs and I was using older versions. I just saw related PR which was merged. Pushed https://github.com/Unity-CI/unity-actions-example/commit/e65839d130ec99fe251bc56cfc9cf809f50a9ea5 and I’ll see what happens