Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Question "plugin.bundle is damaged and can't be opened." after latest MacOS update.

Discussion in 'Editor & General Support' started by Eric-van-Gastel, Jun 11, 2020.

  1. Eric-van-Gastel

    Eric-van-Gastel

    Joined:
    Jan 2, 2016
    Posts:
    21
    Using Unity 2019.3.15f1 on MacOS Catalina v10.15.5, I'm using a few plugins in my project to support certain features. The plugins are UniWebView (for showing web views) and NatCorder (to record video & audio during gameplay).

    Before the latest MacOS update, everything worked as expected. Without changes to Unity or my project, however, I now get the error '“UniWebView.bundle” is damaged and can’t be opened. You should move it to the Bin' whenever a method of the plugin is called. The editor pauses because of the error, but I can continue playing. While playing continues, none of the features of the plugins work, instead throwing the same error again.

    The same occurs for the NatCorder.bundle, and it occurs in other projects using the NatCorder plugin as well. So it doesn't seem to be a problem unique to a specific bundle or project.

    This only occurs during testing within the editor. In an Android build, everything works as expected, likely because compilation of the plugin makes it part of the build internally.

    To solve it, I've tried to:
    • Reinstall Unity
    • Redownload and install the plugins
    • Complete reimport of all project assets
    But nothing works. I'm stumped. Some research suggested it's a problem with MacOS GateKeeper no longer allowing files of unidentified developers to be opened, as the option to 'Allow from anywhere' has been removed from the settings. I don't know when this happened, but I worry it might have been in the latest MacOS update. Manually opening the UniWebView.bundle contents and trying to open a file did throw an unidentified developer warning.

    I've tried to use the command 'sudo spctl --master-disable' in terminal to reenable the 'Allow from anywhere' option. That works, the option reappears and seems selected. It does not solve my problem, however, and upon a reboot of the macbook, the setting vanishes once more.

    So... I'm out of leads, and nothing's changed. If anyone knows a lead to follow up on, please share. I suspect something changed in the MacOS update that prevents me from using the files in the Unity editor application, but I'm rather new to MacOS and don't know what it could be.

    I've posted the same question on StackOverFlow, for your preference. https://stackoverflow.com/questions...-plugin-bundle-is-damaged-and-can-t-be-opened
     
    timvanazon likes this.
  2. Eric-van-Gastel

    Eric-van-Gastel

    Joined:
    Jan 2, 2016
    Posts:
    21
    As always after literally a week of searching without results and finally deciding to ask for help, I've found the solution an hour after posting.

    Here's the solution:
    1. Open the MacOS terminal.
    2. Enter the command: xattr -d com.apple.quarantine /.../Assets/Plugins/Whatever.bundle
    3. Do this for every .bundle you have, and they once again work.

    See more information on the command here:
    https://www.unix.com/man-page/osx/1/xattr/

    I found the solution here at first: https://developer.maxst.com/BoardQuestions/Details/813, but this clears all attributes. It's probably better to only target the attribute that causes the problem, which I found with the base xattr command.
     
    Last edited: Jun 11, 2020
    mergix, tjPark, SebinLee and 6 others like this.
  3. jeffreylanters

    jeffreylanters

    Joined:
    May 8, 2013
    Posts:
    10
    Thank you so much, your solutions works for me on Unity 2020.1 on MacOS 10.15.6 (19G73).
     
  4. Fattie

    Fattie

    Joined:
    Jul 5, 2012
    Posts:
    476
    !!!!! THANK YOU SO MUCH !!!!!!
     
  5. HiziProjects

    HiziProjects

    Joined:
    Nov 29, 2013
    Posts:
    4
    Thank you so much !! :p
     
  6. usamasabir009009

    usamasabir009009

    Joined:
    Mar 20, 2018
    Posts:
    1







    can u please tell me the exact command 2. Enter the command: xattr -d com.apple.quarantine /.../Assets/Plugins/Whatever.bundle ????
     
  7. lostplesed

    lostplesed

    Joined:
    Mar 26, 2014
    Posts:
    25
    THANK YOU SO MUCH !!!!!!
     
  8. glasguy

    glasguy

    Joined:
    Jul 16, 2018
    Posts:
    2
    I've just discovered this thread as was having same problem. I had moved my Unity project folder from my MacBook Air to my Mac Mini. I resolved the problem by deleting the project solution file example ObstacleCourse.sln



    Screenshot 2023-01-12 at 16.16.21.png
     
  9. IMC-Lab

    IMC-Lab

    Joined:
    Mar 28, 2014
    Posts:
    4