Search Unity

[Solved] Facebook Gameroom IAP - Null ref RetrieveProducts

Discussion in 'Unity IAP' started by esg-timothee, Jul 24, 2017.

Thread Status:
Not open for further replies.
  1. esg-timothee

    esg-timothee

    Joined:
    Jan 6, 2016
    Posts:
    1
    It seems that if I call FB.Init() and FB.LogWithPermission before initializing the store, when I am initializing the store, I get this error:

    UnityIAP FB: Facebook already Initialized, checking...
    UnityIAP FB: Init OK
    UnityIAP FB: AppId `1603407643081173`
    UnityIAP FB: already logged in
    UnityIAP FB: token UserId 1532245860148331
    UnityIAP FB: token ExpirationTime 9/22/2017 5:06:17 PM
    NullReferenceException: Object reference not set to an instance of an object
    at UnityEngine.Purchasing.FacebookStoreBindings.RetrieveProducts (System.String json) [0x00000] in <filename unknown>:0
    at UnityEngine.Purchasing.FacebookStoreBindings.InitComplete () [0x00000] in <filename unknown>:0
    at UnityEngine.Purchasing.FacebookStoreBindings.Init () [0x00000] in <filename unknown>:0
    at UnityEngine.Purchasing.FacebookStoreImpl.SetNativeStore (INativeFacebookStore facebook) [0x00000] in <filename unknown>:0
    at UnityEngine.Purchasing.StandardPurchasingModule.InstantiateFacebook () [0x00000] in <filename unknown>:0
    at UnityEngine.Purchasing.StandardPurchasingModule.InstantiateStore () [0x00000] in <filename unknown>:0
    at UnityEngine.Purchasing.StandardPurchasingModule.Configure () [0x00000] in <filename unknown>:0
    at UnityEngine.Purchasing.Extension.AbstractPurchasingModule.Configure (IPurchasingBinder binder) [0x00009] in C:\buildslave\unity\build\Extensions\UnityPurchasing\Runtime\Purchasing\Extension\AbstractPurchasingModule.cs:17
    at UnityEngine.Purchasing.PurchasingFactory..ctor (IPurchasingModule first, UnityEngine.Purchasing.Extension.IPurchasingModule[] remainingModules) [0x0001f] in C:\buildslave\unity\build\Extensions\UnityPurchasing\Runtime\Purchasing\PurchasingFactory.cs:18
    at UnityEngine.Purchasing.ConfigurationBuilder.Instance (IPurchasingModule first, UnityEngine.Purchasing.Extension.IPurchasingModule[] rest) [0x00003] in C:\buildslave\unity\build\Extensions\UnityPurchasing\Runtime\Purchasing\ConfigurationBuilder.cs:89
    at StoreService.Initialize () [0x0004c] in C:\Users\timot\Documents\East Side Games\Trailer Park Boys\trailerparkboys\client\Assets\Scripts\Services\Purchasing\StoreService.cs:60
    at ServiceManager+<InitializeCoroutine>c__Iterator0.MoveNext () [0x00084] in C:\Users\timot\Documents\East Side Games\Trailer Park Boys\trailerparkboys\client\Assets\Scripts\Services\ServiceManager.cs:44
    at UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) [0x00028] in C:\buildslave\unity\build\Runtime\Export\Coroutines.cs:17
    (Filename: C:/buildslave/unity/build/Extensions/UnityPurchasing/Runtime/Purchasing/Extension/AbstractPurchasingModule.cs Line: 17)

    which I don't have if I don't call FB.Init() and FB.LogWithPermission before. Though I need the user Facebook ID before I initialize the store.

    Thanks,
    -Tim
     
  2. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    @esg-timothee

    We have identified an initialization issue with the Facebook part of our plugin. We have a fix and it should be ready by the next version of the IAP plugin. (You should get an update notification in the Editor when this version is available.) The plugin is in QA right now and should be available very soon.

    I apologize for any inconvenience this has caused.
     
  3. ap-unity

    ap-unity

    Unity Technologies

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