Search Unity

"AIP service is disabled" issue workaround

Discussion in 'Unity IAP' started by 2rusbekov, Nov 8, 2019.

  1. 2rusbekov

    2rusbekov

    Joined:
    Jul 12, 2013
    Posts:
    43
    Hi. Had a problem with IAP import process. Checked forum and answers, last post was with "I have no idea" answer.
    I was able to import IAP package from Services window after removing Immediate Window and Editor Coroutine packages from Package Manager. Going to send bug report

    UPDATE: Double cheked, and find out that problem is only Immediate Window
     
    Last edited: Nov 8, 2019
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Typically when you see IAP Service is disabled, it means that you likely removed the Purchasing package from Package Manager, I haven't heard of other packages causing IAP import issues. Can you provide steps to reproduce here on a new project? it might be faster than a bug report. What version of Unity?
     
  3. 2rusbekov

    2rusbekov

    Joined:
    Jul 12, 2013
    Posts:
    43
    Hi. I tested many variants of importing. For new empty project reproducion steps:
    1. Install Immediate Windows. IAP is installed by default, but you can try to reinstall, nothing changes.
    2. Link or create project in unity services through Services Window, enable analytics and iap services.
    3. Click import/reimport.
    4. Wait for Unity IAP installer promt, and click install now

    You will got error:

    Code (CSharp):
    1. ReflectionTypeLoadException: Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown.
    2. System.Reflection.Assembly.GetTypes () (at <567df3e0919241ba98db88bec4c6696f>:0)
    3. UnityEditor.Purchasing.UnityIAPInstaller+<>c.<DoesMethodExist>b__42_4 (System.Reflection.Assembly assembly) (at Assets/Plugins/UnityPurchasing/Editor/UnityIAPInstaller.cs:653)
    4. System.Linq.Enumerable+<SelectManyIterator>d__167`3[TSource,TCollection,TResult].MoveNext () (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
    5. System.Linq.Enumerable+WhereSelectEnumerableIterator`2[TSource,TResult].MoveNext () (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
    6. System.Linq.Enumerable.TryGetFirst[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Boolean& found) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
    7. System.Linq.Enumerable.FirstOrDefault[TSource] (System.Collections.Generic.IEnumerable`1[T] source) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
    8. UnityEditor.Purchasing.UnityIAPInstaller.DoesMethodExist (System.String namespaceName, System.String typeName, System.String methodName) (at Assets/Plugins/UnityPurchasing/Editor/UnityIAPInstaller.cs:658)
    9. UnityEditor.Purchasing.UnityIAPInstaller:Install() (at Assets/Plugins/UnityPurchasing/Editor/UnityIAPInstaller.cs:367)
    10.  
    Editor versions I've tested 2019.2.4 and 2019.2.11
     

    Attached Files:

  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Are saying that installing Immediate Window package automatically installs IAP? That would not be expected. Does IAP work as expected, without the package? And your steps you mentioned are contrary, you can't have IAP installed prior to enabling Analytics and then IAP.
     
  5. 2rusbekov

    2rusbekov

    Joined:
    Jul 12, 2013
    Posts:
    43
    Looks like You little bit missunderstood me.

    No. I mean IAP package (not service) is installed by default in package manager. I created new project and iap was already installed. I didn't touch it

    I enabled Analytics and IAP services (not package) at second step.

    IAP works as expected
     
  6. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Got it, you meant the Purchasing package, not IAP.
     
  7. 2rusbekov

    2rusbekov

    Joined:
    Jul 12, 2013
    Posts:
    43
    Yes, it's title is in-app purchasing package, I wrote it as IAP, sorry
     
  8. Revolter

    Revolter

    Joined:
    Mar 15, 2014
    Posts:
    216
    Oh god thank you! I spent a week trying to install IAPs in my project.

    All this time it was ImmediateWindow package that was the issue!
     
  9. Revolter

    Revolter

    Joined:
    Mar 15, 2014
    Posts:
    216
    Submitted an issue: Case 1266080
     
  10. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    May I ask, why did you install and remove the ImmediateWindow package? I've never had it or needed it in my working IAP project. Or is the problem ONLY when you install both together? If so, then you likely want to avoid it for now.
     
  11. Revolter

    Revolter

    Joined:
    Mar 15, 2014
    Posts:
    216
    The ImmediateWindow package was already in the project when I tried installing IAPs. I'm using it in all my projects by default
     
  12. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    I'm not finding the ImmediateWindow package in Package Manager or the Asset Store, do you have a link? Update - I was checking in Unity 2020.1, I do see the package in Unity 2019.4.1
     
    Last edited: Aug 4, 2020