Search Unity

[Closed] Android: IAP error: Unable to cache IAP catalog

Discussion in 'Unity IAP' started by breban1, Oct 3, 2016.

Thread Status:
Not open for further replies.
  1. breban1

    breban1

    Joined:
    Jun 7, 2016
    Posts:
    194
    I'm receiving this error while initializing IAP on an Android device:
    Unable to cache IAP catalog: System.UnauthorizedAccessException: Acces to path "/Unity" is denied.

    At the bottom you can see that instantiating the catalog returns null... assuming that's the problem, by why?


    For the most part IAP is working properly, but I'd like to get this error resolved.

    Help!
     
  2. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    Hi @breban1,

    Would you be able to provide some more information about the code that is causing this error. Based on the error, it looks like a filesystem permission issue. In the debug log, what part of your script is causing this error specifically?

    Are you following the implementation guide in the Unity Manual?
    https://docs.unity3d.com/Manual/UnityIAP.html
     
  3. breban1

    breban1

    Joined:
    Jun 7, 2016
    Posts:
    194
    @ap-unity I haven't revisted this issue in a few days, but I don't see the error anymore. I will check periodically and reply back with more info if it happens again.
     
    ap-unity likes this.
  4. nubick

    nubick

    Joined:
    Nov 17, 2012
    Posts:
    30
    Seems when game on Android was moved to sdcard and game doesn't have write_external_permission following exception is occured:

    Unable to cache IAP catalog: System.UnauthorizedAccessException: Access to the path "/mnt/sdcard/Android/data/<i-hide-this-bundle-id>/files/Unity" is denied. at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00000] in <filename unknown>:0 at System.IO.Directory.CreateDirectory (System.String path) [0x00000] in <filename unknown>:0 at System.IO.DirectoryInfo.Create () [0x00000] in <filename unknown>:0 at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:Create () at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00000] in <filename unknown>:0 at System.IO.Directory.CreateDirectory (System.String path) [0x00000] in <filename unknown>:0 at System.IO.DirectoryInfo.Create () [0x00000] in <filename unknown>:0 at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:Create () at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00000] in <filename unknown>:0 at System.IO.Directory.CreateDirectory (System.String path) [0x00000] in <filename unknown>:0 at UnityEngine.Purchasing.UnityPurchasing.InstantiateCatalog (System.String storeName) [0x00000] in <filename unknown>:0
     
  5. Dost-IT

    Dost-IT

    Joined:
    May 26, 2016
    Posts:
    4
    I'm facing this issue now aswell. What can we do about it?
    I can reproduce this error, when I move the game manually to the sd card.
     
Thread Status:
Not open for further replies.