Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

[Tizen] Unity IAP hangs touchscreen

Discussion in 'Unity IAP' started by Xaon, Feb 15, 2017.

  1. Xaon

    Xaon

    Joined:
    Feb 28, 2013
    Posts:
    62
    Hi!

    I'm trying to implement IAP on Tizen. I've tested Unity IAP in editor and on Android and it works great. But on Tizen I have some wierd behaviour.
    After the UnityPurchasing.Initialize(this, builder); the touch input stops working. The app itself is still working but it's ignoring input and neither OnInitialized nor OnInitializeFailed is called. If I switch scenes the touch input start to work again.
    If I push back button the touch input also start to work again and I get logs:

    Code (CSharp):
    1. I/Unity   ( 1867): [UnityIAP] ProcessMessage subject: OnSetupFailed payload: NoProductsAvailable receipt:  transactionId:
    2. I/Unity   ( 1867):
    3. I/Unity   ( 1867): (Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
    4. I/Unity   ( 1867):
    5. I/Unity   ( 1867): OnInitializeFailed InitializationFailureReason:NoProductsAvailable
    6. I/Unity   ( 1867):
    7. I/Unity   ( 1867): (Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
    8. I/Unity   ( 1867):
    The logs are the same no matter if I have a dummy products added in the app or not.

    It looks like UnityPurchasing.Initialize opens a fully transparent overlay that waits for something but never gets it :)

    The another wierd thing is that if I'm swyping and tapping the screen for couple of minutes while it's frozen, the input starts to work and outputs the log:

    Code (CSharp):
    1. I/Unity   ( 1678): BuyProductID FAIL. Not initialized.
    2. I/Unity   ( 1678):
    3. I/Unity   ( 1678): (Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
    My question is what the freak is happening here? :)

    P.S.
    I've tried Tizen IAP from Samsung Mobile but the sample code won't compile because Tizen namespace is not recognized.
    I've also read the https://forum.unity3d.com/threads/1-8-1-tizen-iaps.431246/ topic but my case seams different.
     
  2. Xaon

    Xaon

    Joined:
    Feb 28, 2013
    Posts:
    62
    I'm looking through logs extracted from the phone. I've found this part:

    Code (CSharp):
    1. 02-16 11:42:08.587+0100   759   759 I AUL_AMD : amd_status.c: _status_update_app_info_list(473) > pid(1773) appid(org.tizen.inapppurchase.iapservice) pkgid(org.tizen.inapppurchase) status(5)
    2. 02-16 11:42:08.587+0100  1638  1638 I CAPI_APPFW_APP_CONTROL: app_control.c: app_control_request_result_broker(203) > app_control_request_result_broker, result: 0
    3. 02-16 11:42:08.587+0100  1638  1638 I UnityIAP: IN: get_item_list_cb()
    4. 02-16 11:42:08.587+0100  1638  1638 W CAPI_APPFW_APP_CONTROL: app_control.c: app_control_error(152) > [app_control_get_extra_data] KEY_NOT_FOUND(0xffffff82)
    5. 02-16 11:42:08.587+0100  1638  1638 I UnityIAP: Tizen sendMessageToUnityUnibillManager(OnSetupFailed, ...)
    I cannot find anything about sendMessageToUnityUnibillManager and generaly I'm not sure what to look for to troubleshoot this "transparent overlay" thing.
     
    Last edited: Feb 16, 2017
  3. JayR

    JayR

    Unity Technologies

    Joined:
    Aug 2, 2016
    Posts:
    84
    Hi,

    This section of the log indicates that the underlying Tizen purchasing code is generating an error when requesting the available products ("item list") from the Tizen Seller Store. We would need to see more of the log to get a complete picture of what is happening here, but typically this is a result of the store setup being incomplete at seller.tizenstore.com, using an incorrect Item Group ID or having a version mismatch between the app on the device and the TPK live on the store.

    There is no overlay generated by Unity IAP: we rely on the services provided by Tizen but you shouldn't see any GUI elements from that at this point in the process. You should be seeing an OnInitializeFailed() as soon as Tizen returns an error, so a look at the full device log might be helpful (you can DM that to me if you'd like.) I have seen problems with very slow connections to the Tizen Store servers and it might appear to hang if there is no network connection. That would depend a bit more on your game implementation.

    -Jay
     
  4. Xaon

    Xaon

    Joined:
    Feb 28, 2013
    Posts:
    62
    Hi and thanks for reply :)

    This would be correct as we haven't set up our IAPs on the store side. Though this screen locking thing it's funny. I'll be able to send you more details next week.
     
  5. omechano

    omechano

    Joined:
    Sep 12, 2014
    Posts:
    24
    **Bump I have the same issue. The no touch no feel screen. @Xaon how ever did you fix this
     
  6. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    @omechano,

    As mentioned above, Unity IAP does not create any overlays, it simply calls the underlying purchasing system in the OS.

    It sounds like Xaon issue was his products were not configured in the Tizen store and this was causing errors on the device.
    • Are your products fully configured on the Tizen store side?
    • Do you have a device log when this happens? Does it show any errors?
     
  7. omechano

    omechano

    Joined:
    Sep 12, 2014
    Posts:
    24
    Hi @ap-unity

    These are my products. I am pretty sure my products are configured correctly.

    08-20 15:32:13.509 : INFO / UnityIAP ( 4930 : 4930 ) : Tizen sendMessageToUnityUnibillManager(OnSetupFailed, ...)
    08-20 15:32:13.519 : INFO / UXT ( 5017 : 5017 ) : Uxt_ObjectManager.cpp: Finalize(357) > delete event handler
    08-20 15:32:13.519 : INFO / Unity ( 4930 : 4930 ) : [UnityIAP] ProcessMessage subject: OnSetupFailed payload: NoProductsAvailable receipt: transactionId:
    08-20 15:32:13.519 : INFO / Unity ( 4930 : 4930 ) :
    08-20 15:32:13.519 : INFO / Unity ( 4930 : 4930 ) : (Filename: /home/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
    08-20 15:32:13.530 : INFO / Unity ( 4930 : 4930 ) : Billing failed to initialize!
    08-20 15:32:13.530 : INFO / Unity ( 4930 : 4930 ) :
    08-20 15:32:13.530 : INFO / Unity ( 4930 : 4930 ) : (Filename: /home/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
    08-20 15:32:13.530 : INFO / Unity ( 4930 : 4930 ) : No products available for purchase!
     
  8. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
  9. omechano

    omechano

    Joined:
    Sep 12, 2014
    Posts:
    24
    @ap-unity

    I have still not been able to figure this one out. The screen hangs does not take any touches. Here are my new logs :

    09-08 02:37:40.883 : INFO / Unity ( 11856 : 11856 ) : UnloadTime: 4.699000 ms
    09-08 02:37:41.023 : INFO / Unity ( 11856 : 11856 ) : UnityIAP StandardPurchasingModule Version: 1.13.1
    09-08 02:37:41.023 : INFO / Unity ( 11856 : 11856 ) :
    09-08 02:37:41.023 : INFO / Unity ( 11856 : 11856 ) : (Filename: /home/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
    09-08 02:37:41.113 : INFO / UnityIAP ( 11856 : 11856 ) : Setting Group ID to: 100000097601
    09-08 02:37:41.203 : INFO / UnityIAP ( 11856 : 11856 ) : IN: unityPurchasingRetrieveProducts([{"id":"coins","storeSpecificId":"coins","type":"Consumable","enabled":true,"payouts":[]},{"id":"coin_pack","storeSpecificId":"coin_pack","type":"Consumable","enabled":true,"payouts":[]},{"id":"big_coin_pack","storeSpecificId":"big_coin_pack","type":"Consumable","enabled":true,"payouts":[]},{"id":"no_ads","storeSpecificId":"no_ads","type":"NonConsumable","enabled":true,"payouts":[]},{"id":"huge_coin_pack","storeSpecificId":"huge_coin_pack","type":"Consumable","enabled":true,"payouts":[]},{"id":"abo_monthly","storeSpecificId":"abo_monthly","type":"Subscription","enabled":true,"payouts":[]}])
    09-08 02:37:41.203 : INFO / UnityIAP ( 11856 : 11856 ) : IN: create_search_parameter(0xBA49DA00)
    09-08 02:37:41.203 : INFO / Unity ( 11856 : 11856 ) : create_search_parameter:sItemGroupId: 100000097601
    09-08 02:37:41.203 : INFO / UnityIAP ( 11856 : 11856 ) : IN: get_item_list_operation_call()
    09-08 02:37:41.203 : INFO / Unity ( 11856 : 11856 ) : >>>>>>> IAP_SERVICE_APP_ID : org.tizen.inapppurchase.iapservice
    09-08 02:37:41.203 : INFO / Unity ( 11856 : 11856 ) : >>>>>>> GROUP ID : 100000097601
    09-08 02:37:41.203 : INFO / Unity ( 11856 : 11856 ) : >>>>>>> MODE : 0
    09-08 02:37:41.203 : INFO / Unity ( 11856 : 11856 ) : >>>>>>> TRANSACTION ID : 908642
    09-08 02:37:41.203 : INFO / Unity ( 11856 : 11856 ) : >>>>>>> START # : 1
    09-08 02:37:41.203 : INFO / Unity ( 11856 : 11856 ) : >>>>>>> END # : 1000
    09-08 02:37:41.373 : INFO / UnityIAP ( 11856 : 11856 ) : IN: free_search_parameter(0xBA49DA00)
    09-08 02:37:44.416 : INFO / UnityIAP ( 11856 : 11856 ) : IN: get_item_list_cb()
    09-08 02:37:44.416 : INFO / Unity ( 11856 : 11856 ) : get_item_list_cb itemId: 000000607523 itemGroupId: (null) itemName: 10000 Coins currencyUnit:$ itemPrice: 0.99
    09-08 02:37:44.416 : INFO / Unity ( 11856 : 11856 ) : get_item_list_cb itemId: 000000607524 itemGroupId: (null) itemName: 20000 Coins currencyUnit:$ itemPrice: 1.49
    09-08 02:37:44.416 : INFO / UnityIAP ( 11856 : 11856 ) : IN: unityPurchasingRetrievePurchases()
    09-08 02:37:44.416 : INFO / UnityIAP ( 11856 : 11856 ) : IN: create_search_parameter(0xB8FEDA98)
    09-08 02:37:44.416 : INFO / Unity ( 11856 : 11856 ) : create_search_parameter:sItemGroupId: 100000097601
    09-08 02:37:44.416 : INFO / UnityIAP ( 11856 : 11856 ) : IN: get_purchased_item_list_operation_call()
    09-08 02:37:44.566 : INFO / Unity ( 11856 : 11856 ) : Purchase list result: APP_CONTROL - No error
    09-08 02:37:44.566 : INFO / UnityIAP ( 11856 : 11856 ) : IN: free_search_parameter(0xB8FEDA98)

    And that is it , there is no call back to unity for OnInitialized(). The screen stop getting touches and when ever I touch the screen this shows in the console :

    09-08 02:47:18.406 : ERROR / EFL ( 631 : 631 ) : ecore_x<631> lib/ecore_x/xlib/ecore_x_events.c:765 _ecore_x_event_handle_button_release() ButtonEvent:release time=14218188

    Please help me I am so frustrated with this, I even bought the Simple IAP System to perhaps address this issue but that does the same damn thing.
     
  10. omechano

    omechano

    Joined:
    Sep 12, 2014
    Posts:
    24
  11. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    @omechano What country are you testing in (the user device)?
     
  12. omechano

    omechano

    Joined:
    Sep 12, 2014
    Posts:
    24
  13. omechano

    omechano

    Joined:
    Sep 12, 2014
    Posts:
    24
    ** Bump
     
  14. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    I'll check to see if the team here has a Tizen for testing, or we would obtain one. So likely depends on how fast we can get one for testing.
     
  15. Grizmu

    Grizmu

    Joined:
    Aug 27, 2013
    Posts:
    131
    Got the exact same problem like Xaon. UnityPurchasing.Initialize(this, builder) breaks the touch input until back or home button are pressed. Neither OnInitialize or OnInitializeFailed are ever called.

    UnityIAP version: 1.13.1
    Unity version: 5.6.3p3
    Test device : Samsung Z1 (SM-Z130H)
    Location: Poland
    Tizen version: TIZEN 2.4.0.3 (Z130HDDU0CPI1)
     
  16. omechano

    omechano

    Joined:
    Sep 12, 2014
    Posts:
    24
    @Griz Unity does not care. I have been stuck at this for over a month.
     
  17. Xaon

    Xaon

    Joined:
    Feb 28, 2013
    Posts:
    62
    @Griz @omechano
    Honestly I don't think anybody cares. Tizen is a joke. Inmobi ads won't work (tested over VPN using both app build in Unity and build natively), registering a company so one can use IAPs is a pain, they require PEGI official certificate for a freak'n mobile app or you end with a kids game rated as over 18 only. Also Remote Test Lab from India doesn't work so you have to test your app over paid VPN and you have to import the device yourself because Samsung won't distribute it even they officially promised it. The contest itself wasn't curated (if not a scam) with apps having almost as many 5 star ratings as downloads (still best apps had maybe 10000 downloads). When you access store on the device it showed only few hundred best selling apps so one of our apps wasn't avaible at all.
     
  18. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    @Xaon We are testing Tizen again with the latest IAP release, and hope to have an answer within a couple of days. Yes, the platform in interesting.
     
    Grizmu likes this.
  19. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    We have tested this with IAP 1.13.3 and a beta test application on a Tizen device and didn't see this issue. I did notice that initialization can take an unusually long time (30 seconds in a few of my tests) and touch was not responsive during this time.
     
  20. omechano

    omechano

    Joined:
    Sep 12, 2014
    Posts:
    24
    @JeffDUnity3D I just get no products available to purchase. Even though they are added on the Tizen website. The funny thing is If I don't add the products to my application on the website this all goes through fine but when purchasing it says process error. This is so bloody strange.
     
  21. Xaon

    Xaon

    Joined:
    Feb 28, 2013
    Posts:
    62
    Glad to hear that the platform isn't abandoned ;) Honestly we gave up on it quite some time ago. We deployed our app in March and after two months it was clear it wasn't going anywhere. Sorry for the rant. If it became better since then I'm glad, but if not then I don't care.
     
  22. Grizmu

    Grizmu

    Joined:
    Aug 27, 2013
    Posts:
    131
    @JeffDUnity3D
    Thank You for the tests. Would it be possible to make the touch work durning the initialization? We haven't tested the new IAP package yet, but 30 seconds wait time sounds problematic. We would prefer to just lock the shop button until purchasing is initalized, instead of displaying a loading screen to the user.
     
  23. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    @Griz I think it was actually due to the fact that I was using a much older and slower device.