Search Unity

Standalone build error with bundle plugin - could not find plist

Discussion in 'macOS' started by mthamer, Mar 27, 2021.

  1. mthamer

    mthamer

    Joined:
    Oct 7, 2013
    Posts:
    3
    We recently upgraded from 2019.4.17 to 2020.3.0 and are now getting an error when building the Mac standalone version of our game. The game works fine in the editor (on Windows or Mac) and we have no problem building for Windows standalone.

    The error is:
    Could not find a plist file at 'FooProject\Temp\StagingArea\FooApp.app\Contents\PlugIns\AkSoundEngine.bundle\Contents\Info.plist'.

    This error occurs on bundle plugins (in this case it's a Wwise audio plugin). It's true those plugins do not have Info.plist files in the bundle contents, but we never had any problems building the app for Mac before upgrading to Unity2020. We typically build OSX standalone (mono) on a Windows PC, but this error occurs whether we try to build on Windows or Mac.

    The stack trace for this error message points to a CodeSigning operation (see below). Our game is not meant for the Mac App store and is not code signed, so I'm not sure why this is happening.

    UnityEngine.Debug:LogError (object)
    UnityEditor.OSXStandalone.CodeSigning.BundleSigner:LogSignErrorIfNeeded (UnityEditor.OSXStandalone.CodeSigning.SigningError) (at /Users/bokken/buildslave/unity/build/PlatformDependent/OSXPlayer/Extensions/Managed/CodeSigning/BundleSigner.cs:318)
    UnityEditor.OSXStandalone.CodeSigning.BundleSigner:SignBundleOrDirectory (UnityEditor.OSXStandalone.CodeSigning.BundleSigner/FileToSign) (at /Users/bokken/buildslave/unity/build/PlatformDependent/OSXPlayer/Extensions/Managed/CodeSigning/BundleSigner.cs:298)
    UnityEditor.OSXStandalone.CodeSigning.BundleSigner/<>c__DisplayClass7_0:<SignFilesWide>b__2 () (at /Users/bokken/buildslave/unity/build/PlatformDependent/OSXPlayer/Extensions/Managed/CodeSigning/BundleSigner.cs:196)


    I've tried lots of different things, like building for different CPUs and changing player settings, but nothing seems to work.

    If anyone can shed some light on this or provide a workaround, that would be great.
     
    Last edited: Mar 27, 2021
  2. mthamer

    mthamer

    Joined:
    Oct 7, 2013
    Posts:
    3
    Note - I was able to get around this problem by creating an Info.plist by hand and adding it to the plugin bundle.

     
  3. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,679
    Unity 2020.3 is built using Xcode 12, and Xcode 12 adds new signing requirements with the introduction of Apple silicon devices. Unity signs your built app so that macOS doesn't complain about invalid signatures.

    However, Unity shouldn't fail like this. Any chance you could file a bug report with a plugin that reproduces this issue attached?
     
  4. mthamer

    mthamer

    Joined:
    Oct 7, 2013
    Posts:
    3
    [QUOTE="However, Unity shouldn't fail like this. Any chance you could file a bug report with a plugin that reproduces this issue attached?[/QUOTE]

    Thanks for the reply. We set BuildOptions.StrictMode during our build process, so I wonder if that issue ('Could not find a plist file') is a non-fatal error (or warning), but StrictMode is elevating it to an error that stops the build.? I can't really tell if that's the case from the callstack or message. If you think it's not caused by StrictMode, I can try to put together a repro case for a bug report.
     
    Last edited: Mar 30, 2021
  5. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,679
    StrictMode definitely makes it into a fatal error. I am not exactly sure whether plugins without Info.plist files are valid, but I'm sure we could do something that would at least make this a non-error, perhaps only a warning.
     
  6. grahamjans_klei

    grahamjans_klei

    Joined:
    Jan 8, 2014
    Posts:
    1
    Hello @Tautvydas-Zilys. Was there ever a followup on this? We have just upgraded to 2020 and are now encountering this same issue with one of our plugins.
     
  7. idbrii

    idbrii

    Joined:
    Aug 18, 2014
    Posts:
    51
    I had the same "Could not find a plist file" error (but the callstack was a single line: "System.Threading._ThreadPoolWaitCallback: PerformWaitCallback()" and not coming from CodeSigning). The issue started after we upgraded from 2019 to 2020.3.5.

    Workaround is creating a simple plist file:

    Code (CSharp):
    1. <?xml version="1.0" encoding="UTF-8"?>
    2. <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    3. <plist version="1.0">
    4. <dict>
    5.     <key>CFBundleDevelopmentRegion</key>
    6.     <string>English</string>
    7.     <key>CFBundleDisplayName</key>
    8.     <string>BUNDLE_NAME</string>
    9.     <key>CFBundleExecutable</key>
    10.     <string>BUNDLE_NAME</string>
    11.     <key>CFBundleIdentifier</key>
    12.     <string>BUNDLE_NAME</string>
    13.     <key>CFBundleInfoDictionaryVersion</key>
    14.     <string>6.0</string>
    15.     <key>CFBundlePackageType</key>
    16.     <string>BNDL</string>
    17.     <key>CFBundleVersion</key>
    18.     <string>1.0</string>
    19. </dict>
    20. </plist>
    Replace BUNDLE_NAME with the name of your bundle (AkSoundEngine in OP's case).
    Put it inside your bundle in your Unity project (at BUNDLE_NAME.bundle/Contents/Info.plist) and it will get copied to your build.

    My guess is that Unity 2020 requires every bundle to have a plist where it was generated or unnecessary before?
     
    -chris likes this.
  8. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,679
    I thought we fixed this. If you are still running into this, could you by any chance file a bug report?