Search Unity

  1. We've closed the job boards. If you're looking for work, or looking to hire check out Unity Connect. You can see more information here.
    Dismiss Notice
  2. We're running great holiday deals on subscriptions, swag and Asset Store packages! Take a peek at this blog for more information!
    Dismiss Notice
  3. Check out our Unite Austin 2017 YouTube playlist to catch up on what you missed. More videos coming soon.
    Dismiss Notice
  4. Unity 2017.2 is now released.
    Dismiss Notice
  5. The Unity Gear Store is here to help you look great at your next meetup, user group or conference. With all new Unity apparel, stickers and more!
    Dismiss Notice
  6. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  7. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice
  8. Unity 2017.3 beta is now available for download.
    Dismiss Notice
Dismiss Notice
Get paid on mobile. As a mobile developer, get started with In-App Purchases and Ads on our new solution page! Check it out here.

[Solved] iOS Build failing: UnusedBytecodeStripper

Discussion in 'Unity IAP' started by mcjones9, Jun 19, 2017.

Thread Status:
Not open for further replies.
  1. mcjones9

    mcjones9

    Joined:
    May 4, 2017
    Posts:
    5
    • Description of your issue
      • After installing 1.11.2, building on iOS results in failure with the following error:
    Failed running /Applications/Unity/Unity.app/Contents/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe -out "/Users/mjones/Projects/iosStrippingIssue/Temp/StagingArea/Data/Managed/tempStrip" -l none -c link -b True -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Core.xml" -f "/Applications/Unity/Unity.app/Contents/il2cpp/LinkerDescriptors" -x "/Users/mjones/Projects/iosStrippingIssue/Temp/StagingArea/Data/Managed/../platform_native_link.xml" -x "/Users/mjones/Projects/iosStrippingIssue/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -x "/Users/mjones/Projects/iosStrippingIssue/Temp/StagingArea/Data/preserved_derived_types.xml" -d "/Users/mjones/Projects/iosStrippingIssue/Temp/StagingArea/Data/Managed" -a "/Users/mjones/Projects/iosStrippingIssue/Temp/StagingArea/Data/Managed/Assembly-CSharp-firstpass.dll" -a "/Users/mjones/Projects/iosStrippingIssue/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll" -a "/Users/mjones/Projects/iosStrippingIssue/Temp/StagingArea/Data/Managed/UnityEngine.Analytics.dll"

    stdout:
    Fatal error in Mono CIL Linker
    System.Exception: Error processing method: 'System.Void UnityEngine.Purchasing.AppleStoreImpl::OnProductsRetrieved(System.String)' in assembly: 'Stores.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve UnityEngine.Purchasing.ProductType UnityEngine.Purchasing.Extension.ProductDescription::type
    at Mono.Linker.Steps.MarkStep.MarkField (Mono.Cecil.FieldReference reference) [0x00000] in <filename unknown>:0
    at Mono.Linker.Steps.MarkStep.MarkInstruction (Mono.Cecil.Cil.Instruction instruction) [0x00000] in <filename unknown>:0
    at Mono.Linker.Steps.MarkStep.MarkMethodBody (Mono.Cecil.Cil.MethodBody body) [0x00000] in <filename unknown>:0
    at Mono.Linker.Steps.MarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x00000] in <filename unknown>:0
    at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00000] in <filename unknown>:0
    --- End of inner exception stack trace ---
    at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00000] in <filename unknown>:0
    at Mono.Linker.Steps.MarkStep.Process () [0x00000] in <filename unknown>:0
    at Mono.Linker.Steps.MarkStep.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0
    at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0
    at Mono.Linker.Driver.Run () [0x00000] in <filename unknown>:0
    at Mono.Linker.Driver.RunDriverWithErrorHandling (Mono.Linker.Driver driver) [0x00000] in <filename unknown>:0
    at Mono.Linker.Driver.RunDriver (Mono.Linker.Driver driver) [0x00000] in <filename unknown>:0
    • Unity Version
      • 5.3.7p2
    • Unity IAP version
      • 1.11.2
    • Platforms / Stores you are targeting
    • iOS

    I've attached a screen of the PlayerSettings of the blank test project showcasing this problem.
     

    Attached Files:

  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    2,756
    Can you submit a bug report with the blank test project that causes this issue? Thanks!
     
  3. mcjones9

    mcjones9

    Joined:
    May 4, 2017
    Posts:
    5
    Hi Josh,

    I've now submitted a bug report for this issue. (Case 922676)

    Thanks!
     
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    2,756
    Excellent! We will investigate this issue. Thanks!
     
  5. scottthoo13

    scottthoo13

    Joined:
    Sep 17, 2015
    Posts:
    1
    Our team out of sudden were facing this issue too. We have bi-daily build but its failed yesterday and we had to remove entire module and scripts that related with Unity Purchasing in order to have our release build.
    Please investigate asap.
     
  6. yongji16

    yongji16

    Joined:
    Apr 6, 2016
    Posts:
    1
    without Unity Purchase package(1.11.2), everything is ok. but after i import purchase package, when build android apk, there is an error.
    Code (CSharp):
    1. Unhandled Exception: Mono.Linker.ResolutionException: Can not resolve reference: UnityEngine.Purchasing.ProductType UnityEngine.Purchasing.Extension.ProductDescription::type
    2.  
    3.   at Mono.Linker.Steps.MarkStep.MarkField (Mono.Cecil.FieldReference reference, System.Object markedby) [0x00000] in <filename unknown>:0
    4.  
    5.   at Mono.Linker.Steps.MarkStep.MarkInstruction (Mono.Cecil.Cil.Instruction instruction, Mono.Cecil.MethodDefinition markedby) [0x00000] in <filename unknown>:0
    6.  
    7.   at Mono.Linker.Steps.MarkStep.MarkMethodBody (Mono.Cecil.Cil.MethodBody body) [0x00000] in <filename unknown>:0
    8.  
    9.   at Mono.Linker.Steps.MarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x00000] in <filename unknown>:0
    10.  
    11.   at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00000] in <filename unknown>:0
    12.  
    13.   at Mono.Linker.Steps.MarkStep.Process () [0x00000] in <filename unknown>:0
    14.  
    15.   at Mono.Linker.Steps.MarkStep.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0
    16.  
    17.   at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0
    18.  
    19.   at UnusedBytecodeStripper.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
     
  7. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    743
    @mcjones9, @scottthoo13, @yongji16

    The IAP team was able to get a potential fix for this issue. It will be available in 1.11.4 as soon as testing is finished. I apologize for any inconvenience this issue has caused.
     
  8. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    743
Thread Status:
Not open for further replies.