[SOLVED] Google Play IAB hasn't been initilized

[SOLVED] Google Play IAB hasn't been initilized
0.0 0

#21

Hello again, I think i finally solved the issue. I didn’t notice that there was no google account linked to the device. Once i added the account it worked. By the way, the bug of price, title, and description being empty is still precent. It happens if there is a line break in the description of ANY of the purchases (happens in both, iOS and Android).

I think i updated to the newest iap module using the sdkbox command line. I used the --forcedownload to get the newest, i think.

If this has already been fixed and i didn’t update correctly, would you mind being so kind to tell me how to update it? thanks.


#22

I’ll look into that bug, well get back to you tomorrow.


#23

I met the same issue… the log like this:

dump from: [string “app/scenes/Test.lua”]:168: in function <[string “app/scenes/SlotGameStartScene.lua”]:161>
D/cocos2d-x debug info( 4062): [LUA-print] - “onFailure:” = {
D/cocos2d-x debug info( 4062): [LUA-print] - “description” = “”
D/cocos2d-x debug info( 4062): [LUA-print] - “id” = “com.demo.coin1”
D/cocos2d-x debug info( 4062): [LUA-print] - “name” = “coin1”
D/cocos2d-x debug info( 4062): [LUA-print] - “price” = “”
D/cocos2d-x debug info( 4062): [LUA-print] - “title” = “”
D/cocos2d-x debug info( 4062): [LUA-print] - }
D/cocos2d-x debug info( 4062): [LUA-print] msg: Google Play IAB hasn’t been initilized.
E/BufferQueue( 103): [SurfaceView] dequeueBuffer: mMinUndequeuedBuffers=1 exceeded (dequeued=2)
E/BufferQueue( 103): [SurfaceView] dequeueBuffer: mMinUndequeuedBuffers=1 exceeded (dequeued=2)
E/BufferQueue( 103): [SurfaceView] dequeueBuffer: mMinUndequeuedBuffers=1 exceeded (dequeued=2)


#24

Hi I have a question I am getting this error message as are others in this forum:

INF: SDKBox IAP: Invalid name iap item name: removeAd

I am new to this and trying to figure this out but for the life of me can’t. My app is set to go to be submitted except my IAP aren’t working and i get this error message every time i click on it. If anyone could help me that would be great.

If you could list the possible errors and solutions that would be great.


#25

Do you have an item called this? What is in your sdkbox_config.json? What items are in your store?


#26

Ill try to be as detailed as possible to get a solution::

this is my sdkbox_config.json:

{
    "android": {
        "GoogleAnalytics": {
            "trackingCode": "UA-68528847-3"
        }, 
        "Chartboost": {
            "signature": "82274eef59c474de3bbcc34bcc1a048b9308ac22",
            "ads": {
                "Default": {
                    "type": "interstitial"
                },
                "Level Complete": {
                    "type": "rewarded_video"
                },
                "MoreApp": {
                    "type": "more_app"
                }
            },
            "id": "561ee7bcc909a64aff41025e"
        },
        "iap": {
            "items": {
                "Skip": {
                    "id": "com.Nick.AlienAttackPopLockHDIAP.Skipp"
                    "type": "consumable"
                    
                },
                "removeAds": {
                    "id": "com.Nick.AlienAttackPopLockHDIAP",
                    "type": "non_consumable"
                }
            },
            "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2a3NzvT7ON9mSKm5PjBl0I60C/YVEjcp8bwK3ZYhKzhnk8XNgvZ7d2EYBm1gsr4vKVggSzk+JGVhZBWZQjyFq570Ck43fqAAnRu6I72zsuoA+gi/OsKBdk1aSk7+gxYn1Cnzo2HiK5hhg6N5Nrlwtjp2z7VDH7D25VMq7k/jzN967T7ek3wj+LC+maMuRReGl4G3C7ZByuNf7ugdY8FA7/ux4Bb/KDyvzG27ySOmMbb9o1ZBK/oorqZT9+P6QsxYY9+mrQlwKWRvvVb0TVL5t9EbHotNY2ST2pAgjN4My4ditp6hOURdkYtBBbMatYgywtqDrYZ/+5V5WPgO/vJm7QIDAQAB"
        }
    },
    "ios": {
        "GoogleAnalytics": {
            "trackingCode": "UA-68528847-3"
        }, 
        "Chartboost": {
            "signature": "82274eef59c474de3bbcc34bcc1a048b9308ac22",
            "ads": {
                "Default": {
                    "type": "interstitial"
                }, 
                "Level Complete": {
                    "type": "rewarded_video"
                }, 
                "MoreApp": {
                    "type": "more_app"
                }
            }, 
            "id": "561ee7bcc909a64aff41025e"
        },
        "iap": {
            "items": {
                "Skip": {
                    "id": "com.Nick.AlienAttackPopLockHDIAP.Skipp"
                    "type": "consumable"
                },
                "removeAds": {
                    "id": "com.Nick.AlienAttackPopLockHDIAP",
                    "type": "non_consumable"
                }
            }
        }
    }
}

this is my iTunes connect for IAP:

Reference Name Type Product ID Status
removeAd Non-Consumable com.Nick.AlienAttackPopLockHDIAP Ready to Submit
Skip Consumable com.Nick.AlienAttackPopLockHDIAP.Skipp Ready to Submit


#27

You call it removeAds but you must be calling removeAd


#28

I made that change but on Skip IAP i get the following pop-up error:

Error!
Invalid name iap item name

OK

and on my Remove Ads button a pop-up doesn’t occur. no Message

on both iap i get the following error on Xcode when running:

INF: SDKBox IAP: Invalid name iap item name: removeAd
INF: SDKBox IAP: Invalid name iap item name: Skip

any where else I should check for errors?
Please provide your expertise on this issue, Im stuck.


#29

Your sdkbox_config.json contains invalid json format.

You can copy&paste it to a json validator and it will tells you where.


#30

These are the errors:

Error:Expecting comma, colon or }, not string.[Code 11, Structure 65]
Error:Expecting comma, colon or }, not string.[Code 11, Structure 76]
Error:Invalid comma, expecting }.[Code 141, Structure 79]
Error:Expecting string, not }.[Code 8, Structure 80]
Error:Expecting comma, colon or }, not string.[Code 11, Structure 151]
Error:Expecting comma, colon or }, not string.[Code 11, Structure 162]
Error:Expecting closing } at end[Code 22, Structure 169]

{
“android”:{
“GoogleAnalytics”:{
“trackingCode”:“UA-68528847-3”
},
“Chartboost”:{
“signature”:“82274eef59c474de3bbcc34bcc1a048b9308ac22”,
“ads”:{
“Default”:{
“type”:“interstitial”
},
“Level Complete”:{
“type”:“rewarded_video”
},
“MoreApp”:{
“type”:“more_app”
}
},
“id”:“561ee7bcc909a64aff41025e”
},
“iap”:{
“items”:{
“skip”:{
“id”:“com.Nick.AlienAttackPopLockHDIAP.Skipp” “type”:“consumable”
},
“removeAd”:{
“id”:“com.app.AlienAttackPopLockHD.RemoveAd” “type”:“non-consumable”,

        },
        "key":"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2a3NzvT7ON9mSKm5PjBl0I60C/YVEjcp8bwK3ZYhKzhnk8XNgvZ7d2EYBm1gsr4vKVggSzk+JGVhZBWZQjyFq570Ck43fqAAnRu6I72zsuoA+gi/OsKBdk1aSk7+gxYn1Cnzo2HiK5hhg6N5Nrlwtjp2z7VDH7D25VMq7k/jzN967T7ek3wj+LC+maMuRReGl4G3C7ZByuNf7ugdY8FA7/ux4Bb/KDyvzG27ySOmMbb9o1ZBK/oorqZT9+P6QsxYY9+mrQlwKWRvvVb0TVL5t9EbHotNY2ST2pAgjN4My4ditp6hOURdkYtBBbMatYgywtqDrYZ/+5V5WPgO/vJm7QIDAQAB"
     }
  },
  "ios":{  
     "GoogleAnalytics":{  
        "trackingCode":"UA-68528847-3"
     },
     "Chartboost":{  
        "signature":"82274eef59c474de3bbcc34bcc1a048b9308ac22",
        "ads":{  
           "Default":{  
              "type":"interstitial"
           },
           "Level Complete":{  
              "type":"rewarded_video"
           },
           "MoreApp":{  
              "type":"more_app"
           }
        },
        "id":"561ee7bcc909a64aff41025e"
     },
     "iap":{  
        "items":{  
           "skip":{  
              "id":"com.Nick.AlienAttackPopLockHDIAP.Skipp"                  "type":"consumable"
           },
           "removeAd":{  
              "id":"com.app.AlienAttackPopLockHD.RemoveAd"                  "type":"non-consumable"
           }
        }
     }
  }

}

Could you help me fix these errors.


#31

i took out the “type”:“consumable”
and the “type”:“non-consumable” and it turned Valid.

But even with these changes the IAP does not work… I am still getting the Error! Invalid name iap item name when I click on Skip.

Any suggestions?


#32

have you tried using skip instead of Skip?


#33

Yes i have tried that also.


#34

I deleted all attempts I made at the IAP and started from scratch. I plugged in my IAP IDs into the sdkbox_config.json and I’m getting this error now on my Xcode display for both Skip and RemoveAd buttons.

Error!

Invalid product please double check the product ID on iTunes connect.

My product ID is the same on the sdkbox_config.json as it is on my iTunes connect App Features.

Any ideas on why I’m experiencing this problem?
Does this seem like a problem I occurred from the iTunes side of things or Xcode ?

Perhaps I’m just setting up my IAPs incorrectly with iTunes.


#35

Show me your products in iTunes Connect and show me your sdkbox_config.json


#37

I sent them via Private Messages to you.


#38

Did you manage to get it working? I believe it’s mostly a config issue.


#39

I had the same warning and I changed the following to solve:

I had in my class init()
IAP::init();
IAP::refresh();
IAP::restore();

I removed the refresh() and restore() from there

and put them in:

void InApp::onInitialized(bool ok)
{
if( ok ) {
IAP::refresh();
IAP::restore();
}
}


#40

Interesting approach:) SKDBOX team is it good example to place refresh inside onitialized?


#41

Hi,

I had the same issue, after struggling for many hours, i found out my json file was incorrect. After validation i have been saved. (some commas, etc were missing)

I think you should strongly state that the json must be valid (In the integration guide of course)

Editing a json file by hand is a really tideous issue that’s why.