Search Issue Tracker

Fixed in 2.1.0

Votes

44

Found in [Package]

2019.2

2019.3

2019.3.0b8

2019.4

2020.1

2020.2

Issue ID

1193773

Regression

No

Unity purchasing gives error on project upgrade due to failing to find UnityEngine.UI assembly

Package: Purchasing

-

Steps to reproduce:

The easiest way to reproduce this error is to do an upgrade from one version to another, so, to reproduce
1. Open attached project in 2019.3.0b7 (you might get error at this point too)
2. Close and reopen it with 2019.3.0b8 or later
3. Notice error in console:
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> member:(null) signature:<none>
also, inspecting Editor.log you can find that this error is followed by
Unloading broken assembly Assets/Plugins/UnityPurchasing/Bin/Stores.dll, this assembly can cause crashes in the runtime
(Filename: C:\buildslave\unity\build\Runtime/Mono/MonoManager.cpp Line: 1180)

Note: It is possible to clear the console log error and continue working, since the error is transitional (during project upgrade). Any future opening of the project will not yield any error or warning.

Reproduced with: 2020.2.0a20, 2020.1.3f1, 2020.1.0a9, 2019.4.8f1, 2019.3.0b8, 2019.2.9f1, 2018.3.0a10, 2018.2.6f1
Not reproducible: 2018.4.26f1, 2018.4.12f1

  1. Resolution Note (fix version 2.1.0):

    Fixed in com.unity.purchasing version 2.1.0, available now in the Package Manager, compatible with Unity Editor 2018.4.18f1 and up. Verified in 2019.4 and up.

Comments (9)

  1. Mishganches

    Sep 21, 2020 15:19

    We have the same problem for 2019.2.17 in Unity Cloud Build.

  2. kmedved

    Sep 21, 2020 09:09

    Same for 2019.4.10f1

  3. eragimov

    Aug 06, 2020 08:04

    Same for 2019.3.15f1

  4. BlackMax1980

    Jul 19, 2020 16:28

    Same for 2019.4.4f1

  5. ByteStormGmbH

    Apr 25, 2020 17:33

    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> member:(null) signature:<none>

    By me it has occurred with every version of 2019.3.*. Whenever you have installed a new version and the project switches to the new version, this message appears.
    When I click on Service->In-App Purchasing, I see that under Options, the Purchase API-Key is red and changes to green shortly after. I always click on Update and I don't have this message anymore. Currently I see it with the last version 2019.3.11.f1.

  6. Michieal

    Mar 25, 2020 04:11

    Interestingly enough, doing this - TDarby's suggestion helped me out with a lot of other issues, like Gradle out of date errors, AndroidX / version R errors... I was going round and round trying to fix things just to get it to build, and the root error was the silly FakeStore:GetButton error. Once I fixed that, everything built properly, and I was able to deploy my game to the Playstore.

    So, thank you!!!!

    Unity 2019.2.11f.

  7. sajjadgameactor

    Mar 12, 2020 16:27

    I had same error after update my unity version from 2019.2.15 to 2019.3.2
    The solution in my case was to comment this line in my IAP manager script
    "builder.Configure<IMicrosoftConfiguration>().useMockBillingSystem = false;"
    I also comment "using UnityEngine.UI;" in that script.

  8. tdarby

    Dec 14, 2019 17:16

    I encountered this issue with 2019.2.15f1. I was able to work around this issue with the following steps:

    1. Removed In App Purchasing package (from Window -> Package Manager)
    2. Deleted Plugins/UnityPurchasing from my project (from Project viewer)
    3. Quit and relaunched Unity
    4. Reinstalled In App Purchasing (from Window -> Package Manager)
    5. Imported In-App Purchasing (from Window -> General -> Services, In-App Purchasing)
    6. Quit and relaunched Unity
    7. (important!) Commented out all lines of IAP code that generate errors (advice from https://forum.unity.com/threads/purchasing-the-name-standardpurchasingmodule-does-not-exist-in-current-context.457131/#post-3674194)
    8. Followed all default prompts from Unity IAP installer
    9. Quit and relaunched Unity
    10. Restored commented lines from step 7

    Hope this helps!

  9. justtime

    Nov 25, 2019 13:49

    I faced with this in 2019.2.13f

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.