Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

Problem error Unity IAP 1.23

Discussion in 'Unity IAP' started by RainbowLab, Oct 19, 2019.

  1. RainbowLab

    RainbowLab

    Joined:
    May 20, 2019
    Posts:
    11
    I have just updated Unity IAP to the latest version released yesterday on the Unity Asset Store, but once the guided installation is complete I cannot install the IAP Catalog, and in the console I continuously receive the following error message:

    Code (CSharp):
    1. UnityException: get_unityVersion is not allowed to be called from a ScriptableObject constructor (or instance field initializer), call it in OnEnable instead. Called from ScriptableObject 'ProductCatalogEditor'.
    2. See "Script Serialization" page in the Unity Manual for further details.
    3. UnityEditor.Purchasing.UdpSynchronizationApi.CheckUdpAvailability () (at <8d2d05e7bd5745cca0a5537a3fd6f38c>:0)
    In addition, purchases in apps on iOS devices (version 13.1.3) do not work properly.


    I need help because I can't publish my game.
    I use the latest stable version of Unity 2019.2.9f.
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    6,094
    Please elaborate, "install the IAP catalog". Can you provide steps to reproduce?
     
  3. triple_why

    triple_why

    Joined:
    Jun 9, 2018
    Posts:
    10
    Hello,

    I'm experiencing the same situation. I updated IAP to 1.23.0 via services window. I observe these behaviors:

    * If I start game while iap catalog window is open, I get the error message* repetitively (~200 / sec). But game and iap system run fine. When I stop game error messages continues, and when I close iap catalog window error messages stop. Similar error messages are also issued 1 or 2 times, see attached screenshot.
    * If I start game while iap catalog window is closed, I don't get any error message and everything runs fine. Opening iap catalog window and/or stopping game don't cause any error message.

    I tried removing/reinstallig/reimporting UnityPurchasing and UDP plugins, disabling/enabling IAP via services window, uninstalling in app purchasing package (2.0.6) via package manager (but it got reinstalled by iap installer), several trial-errors over iap installer and iap updater.

    For now, I'm working without playing the game while iap catalog window open. Any help on finding a cause or a fix is appreciated.

    (Unity 2019.2.2, windows 10)

    * The error message:
    UnityException: get_unityVersion is not allowed to be called from a ScriptableObject constructor (or instance field initializer), call it in OnEnable instead. Called from ScriptableObject 'ProductCatalogEditor'.
    See "Script Serialization" page in the Unity Manual for further details.
    UnityEditor.Purchasing.UdpSynchronizationApi.CheckUdpAvailability () (at <97020ad831c24ecbaad86b2f4fbca9f8>:0)
    UnityEditor.Purchasing.ProductCatalogEditor..cctor () (at <97020ad831c24ecbaad86b2f4fbca9f8>:0)
    Rethrow as TypeInitializationException: The type initializer for 'UnityEditor.Purchasing.ProductCatalogEditor' threw an exception.
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0)
    UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:359)
    UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:353)
    UnityEditor.HostView.SendUpdate () (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:465)
    UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at C:/buildslave/unity/build/Editor/Mono/EditorApplication.cs:303)
     

    Attached Files:

  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    6,094
    Yes, I can reproduce and will let the team know. In the meantime, you can safely play your game with the catalog window closed.
     
    triple_why likes this.
  5. mariano_mediamonks

    mariano_mediamonks

    Joined:
    Jul 15, 2016
    Posts:
    1
    Hi jeff, I'm having the same issue, Did you find a solution?
    Thanksm,
     
  6. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    6,094
    For now, you would want to close the Catalog window before you play your game. You only need it open when you first enter your products. After that, you can keep it closed. It is not necessary to keep the Catalog window open while you run your game in the Editor. We will try to address this in an upcoming release.
     
  7. ngochoadev

    ngochoadev

    Joined:
    Nov 14, 2019
    Posts:
    2
    This problem still happen to my project @JeffD
     
  8. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    6,094
    You can use the workaround mentioned above.