Search Unity

Stores.dll conflicts with UnityEngine.UI after it became a package.

Discussion in 'Unity IAP' started by JamesA24, Mar 23, 2020.

  1. JamesA24

    JamesA24

    Joined:
    Sep 6, 2018
    Posts:
    28
    Greetings everyone, I've encountered an issue that prevents cloud builds. I reported the issue in the Cloud Build forums, but i'm thinking it seems more relevant here.

    In an ongoing work related project, we use content provided by the Stores.dll.

    We recently upgraded from Unity 2019.1.14 to Unity 2019.3.6. Doing so means that we've jumped to a version where the UnityEngine.UI is now a package that we can remove or install through the package manager.

    I have also updated the Unity IAP package that is provided through the Services window for In App Purchasing. We were previously on IAP 1.22.0, and we are not on 1.23.1.

    I did the engine update first and that is when this error first appeared. In the editor, this doesn't stop us from doing any work, or compiling other scripts. However, when we do a cloud build an error occurs.

    Code (CSharp):
    1. [Unity] Error: Could not load signature of UnityEngine.Purchasing.UIFakeStore:GetOkayButton due to: Could not load file or assembly 'UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. assembly:UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null type:<unknown type> membernull) signature:<none>
    This error is reproducible in editor as well. To get the error you do the following steps...

    1. Have the package installed.
    2. Close the Unity Editor.
    3. Delete your library folder.
    4. Reopen that project in Unity.
    5. The error appears in the console log.

    To get deeper into this there's a file called UIFakeStore.cs in Stores.dll. It's trying to make use of the UI package for some of its methods. The error mentions GetOkayButton, but that's just the first method that returns a UI component. There are more that follow it.

    The problem i'm seeing here is that now that UI is in a package, it's compiling after the IAP Package, and therefore generating this error in editor and in cloud build. This is pretty serious for anyone wanting to use the Stores.dll, and it has stopped us from being able to build and release.

    I have submitted a bug report on this already. But with this being a forum post, I'm hoping anyone can provide more information or even a work around for this.

    Thank you.
     
    ibyte likes this.
  2. SamOYUnity3D

    SamOYUnity3D

    Unity Technologies

    Joined:
    May 12, 2019
    Posts:
    626
    Please try to re-import all the packages.
     

    Attached Files:

  3. JamesA24

    JamesA24

    Joined:
    Sep 6, 2018
    Posts:
    28
    @SamOYUnity3D

    Things that have been attempted have been:

    + Reimport All
    + Individually removing and readding each package
    + Removing the demo scripts from the IAP Package.

    None of these resolve the issue.

    We did however discover there were other build issues that weren't showing up in the logs. They were only appearing in the new Build Steps page for cloud build. We've addressed them and builds work again.
     
    nicholasr and SamOYUnity3D like this.
  4. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,048
    Having the same issue, this is blocking our cloud builds - local builds are fine.
     
  5. SamOYUnity3D

    SamOYUnity3D

    Unity Technologies

    Joined:
    May 12, 2019
    Posts:
    626
    Have you tried the workarounds mentioned above?