Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

tvOS API updating error

Discussion in '2018.1 Beta' started by helios, Mar 26, 2018.

  1. helios

    helios

    Joined:
    Oct 5, 2009
    Posts:
    308
    Hello, I'm currently on b11 (macOS 10.13.3) and have tested upgrading my project from 2017. This is a universal app for iOS and tvOS. The iOS platform target upgrades completely fine and works great. When I try to switch platforms to tvOS, I eventually get this error:
    Code (CSharp):
    1. APIUpdater encountered some issues and was not able to finish.
    2.  
    3.    
    4.     System.ArgumentException: preprocessorSymbols
    5.       at Microsoft.CodeAnalysis.CSharp.CSharpParseOptions..ctor (Microsoft.CodeAnalysis.CSharp.LanguageVersion languageVersion, Microsoft.CodeAnalysis.DocumentationMode documentationMode, Microsoft.CodeAnalysis.SourceCodeKind kind, System.Collections.Generic.IEnumerable`1[T] preprocessorSymbols) [0x00051] in <8d5a2b6695c6475bb1cb5b9a9f9c8dd7>:0
    6.       at CSharpUpdater.CSharpUpdater.ParseSyntaxTrees (APIUpdater.Framework.Core.SourceFile[] inputs, APIUpdater.Framework.Core.UpdaterParameters parameters) [0x00018] in <a746af91eb4946abb01fd402ed659b74>:0
    7.       at CSharpUpdater.CSharpUpdater.RunUpdater (APIUpdater.Framework.Core.SourceFile[] inputs, APIUpdater.Framework.Core.UpdaterParameters parameters) [0x00013] in <a746af91eb4946abb01fd402ed659b74>:0
    8.       at APIUpdater.Framework.Core.APIUpdaterBase.Update (APIUpdater.Framework.Core.SourceFile[] inputs, APIUpdater.Framework.Core.UpdaterParameters parameters) [0x0002a] in <3aa0dc9631894fbf9d7fb1f0bec9753b>:0
    9.       at ScriptUpdater.Program.UpdateLanguage (APIUpdater.Framework.Core.IScriptUpdater updater, APIUpdater.Framework.Configuration.CompilerResponseFile responseFile, System.String unityDataPath, System.String outputPath) [0x00083] in <5fbd3d45536c4995a0f985f31cf4fb54>:0
    10.       at ScriptUpdater.Program.Main (System.String[] args) [0x000c4] in <5fbd3d45536c4995a0f985f31cf4fb54>:0
    11.  
    I have no idea what is causing this, as there is no other information given. No other errors in the console, just this one. Any ideas where to start looking? Thanks.
     
  2. AdrianoVerona_Unity

    AdrianoVerona_Unity

    Unity Technologies

    Joined:
    Apr 11, 2013
    Posts:
    317
    Hey Helios.

    Looks like some invalid preprocessor symbol has been passed to the updater.

    Can you share your editor.log when this happened ?

    Best

    Adriano
     
    Last edited: Mar 26, 2018
  3. helios

    helios

    Joined:
    Oct 5, 2009
    Posts:
    308
    Thanks for your reply. These are the moments before the error, from the log file:
    Code (CSharp):
    1. 'Assets/xARM/Classes/xARMClasses.cs'
    2. 'Assets/xARM/Components/xARMDelegatesExample.cs'
    3. 'Assets/xARM/Components/xARMDelegateUGUI.cs'
    4. 'Assets/xARM/Components/xARMProxy.cs'
    5. 'Assets/xARM/Managers/xARMConfig.cs'
    6. 'Assets/xARM/Managers/xARMManager.cs'
    7. 'Assets/xARM/Windows/xARMGalleryWindow.cs'
    8. 'Assets/xARM/Windows/xARMHotkeys.cs'
    9. 'Assets/xARM/Windows/xARMOptionsWindow.cs'
    10. 'Assets/xARM/Windows/xARMPreviewWindow.cs'
    11. -lib:'/Applications/Unity/Unity.app/Contents/MonoBleedingEdge/lib/mono/4.7.1-api'
    12.  
    13.  
    14. APIUpdater encountered some issues and was not able to finish.
    15.  
    16.    
    17.     System.ArgumentException: preprocessorSymbols
    18.       at Microsoft.CodeAnalysis.CSharp.CSharpParseOptions..ctor (Microsoft.CodeAnalysis.CSharp.LanguageVersion languageVersion, Microsoft.CodeAnalysis.DocumentationMode documentationMode, Microsoft.CodeAnalysis.SourceCodeKind kind, System.Collections.Generic.IEnumerable`1[T] preprocessorSymbols) [0x00051] in <8d5a2b6695c6475bb1cb5b9a9f9c8dd7>:0
    19.       at CSharpUpdater.CSharpUpdater.ParseSyntaxTrees (APIUpdater.Framework.Core.SourceFile[] inputs, APIUpdater.Framework.Core.UpdaterParameters parameters) [0x00018] in <a746af91eb4946abb01fd402ed659b74>:0
    20.       at CSharpUpdater.CSharpUpdater.RunUpdater (APIUpdater.Framework.Core.SourceFile[] inputs, APIUpdater.Framework.Core.UpdaterParameters parameters) [0x00013] in <a746af91eb4946abb01fd402ed659b74>:0
    21.       at APIUpdater.Framework.Core.APIUpdaterBase.Update (APIUpdater.Framework.Core.SourceFile[] inputs, APIUpdater.Framework.Core.UpdaterParameters parameters) [0x0002a] in <3aa0dc9631894fbf9d7fb1f0bec9753b>:0
    22.       at ScriptUpdater.Program.UpdateLanguage (APIUpdater.Framework.Core.IScriptUpdater updater, APIUpdater.Framework.Configuration.CompilerResponseFile responseFile, System.String unityDataPath, System.String outputPath) [0x00083] in <5fbd3d45536c4995a0f985f31cf4fb54>:0
    23.       at ScriptUpdater.Program.Main (System.String[] args) [0x000c4] in <5fbd3d45536c4995a0f985f31cf4fb54>:0
    24.  
    Let me know if this is insufficient and I can send you the entire log file.

    Thanks!
     
  4. AdrianoVerona_Unity

    AdrianoVerona_Unity

    Unity Technologies

    Joined:
    Apr 11, 2013
    Posts:
    317
    Hi Helios

    Please, send me the entire log (you can send to adriano at unity if you prefer).

    Also, if possible:
    • Make a copy of your project
    • Remove all non script related assets (i.e, keep only csharp, uintyscript and assembly files)
    • Zip it
    • Send it to me (it should not be to big)
    Best

    Adriano
     
  5. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Instead of doing all that manually you can also just remove the non essential assets with our project stripper tool and then submit a bug report through the editor. That will automatically attach a zipped version of the currently loaded project and attach all log files.

    Mention the case # here so we can find your report.

    You can find the mentioned tools and more information here:
    A guide to beta testing
     
  6. helios

    helios

    Joined:
    Oct 5, 2009
    Posts:
    308
    Hi guys, apologies for the delay in getting back. I've submitted it through the bug reporter, case # 1021350.

    Please let me know if there is anything else. Thanks.
     
    LeonhardP likes this.
  7. AdrianoVerona_Unity

    AdrianoVerona_Unity

    Unity Technologies

    Joined:
    Apr 11, 2013
    Posts:
    317
    Hi

    No problem and thanks. I'll take a look
     
  8. helios

    helios

    Joined:
    Oct 5, 2009
    Posts:
    308
    Hi, has there been any update on this? Thanks.
     
  9. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Turns out this is not a bug.

    The real problem is that for *tvOS* there was a symbol defined as *69* and that is not valid. You can see in the editor.log the output of the C# compiler:

    > warning CS2029: Invalid conditional define symbol `69'

    To fix this, simply go to Player Settings/tvOS and remove the offending symbol.

    The updater relies on a version of a library (Roslyn) that throws an exception instead of reporting an error.

    The newer versions of this library fixed this (and correctly report an error instead of throwing an exception).
     
  10. AdrianoVerona_Unity

    AdrianoVerona_Unity

    Unity Technologies

    Joined:
    Apr 11, 2013
    Posts:
    317
    BTW, In our main development repo we are already using the updated version of Roslyn.

    Adriano