App Rejected - Intermittent App Store Connecitivity

My launch date for my latest game is next week, and I’ve run into a severe problem; hopefully someone on here can point me in the right direction. I submitted the app this morning, and received a rejection a few hours later.

Here is the rationale given by Apple:

We discovered one or more bugs in your app when reviewed on iPhone and iPad running iOS 11.2.6 on Wi-Fi connected to an IPv6 network.

Specifically, an error message appears when we try to make a purchase. 

Here is the text of the error message: “ERROR Cannot connect to iTunes store”

I was taken aback by this, because the in-app purchase functionality of the app had been thoroughly tested on Google and Apple months prior, so I assumed it must have been an anomaly. Beyond that, the code is taken almost directly from the Corona API’s store documentation. I wrote them to that effect before having tested it myself with a bit of polite incredulity :) . However upon subsequently testing it repeatedly on a consumable item of ours, I did notice that this error would indeed pop up roughly 50% of the time, with absolutely no correlation to any other factors I could determine after troubleshooting for about 18 hours straight. And when it does work, sometimes it takes a VERY long time to complete the transaction, other times relatively quickly. I would frankly prefer if it didn’t work at all, because that would point to it being something under my control; like a configuration/coding/build error on my part.

Troubleshooting steps I have taken:

-Tested on multiple device types from iOS 9.x to 11.x

-Tested on mobile 4G and 3 wifi networks with ipv6 and ipv4 connectivity

-Completely eliminated the appodeal plugin and implementation

-Recreated my provisioning profile

-Factory reset one of my test devices

-Used a different apple id on a previously unused device

-Scrutinized the transaction and loadproducts callbacks, purchase calls and compared it not only to the documentation, but to my previous Corona apps which have never had this issue

-Confirmed that store.purchase is never even called if we haven’t loaded the prices and confimed isActive

-Built with the most recent daily builds

-Confirmed network connectivity performs without issue when downloading content from my server.

-Confirmed that the prices always load immediately when loadproducts is called, no issues there.

-Poured over the console logs to no avail, no useful information or error code given beyond the text of the alert box.

Bizarrely, Apple decided to approve it in the meantime, but I rejected the build myself, despite my impending deadline, as this is obviously not acceptable for production. I do however need to figure this out ASAP.

TLDR: I am completely out of ideas, under a huge time crunch, and in desperate need of someone wiser than I! Rob, Brent, are you out there :ph34r: ?

There is a certain irony with that error - Apple cannot connect to to their own servers!

I see this error logged from jailbroken phones and when users internet is patchy.  I very much doubt you can do anything about it.

Try using the last public build in case something got broken in a daily build.

Dripping with irony :P . Unfortunately, I tried with a few daily builds; I have not, however, tried today’s build 2018.3240 that just came out while I was sleeping, so I will try that. In the mean time I did resubmit, on the hopes that Apple was just having temporary issues with their store servers; highly unlikely, but I need to get the thing approved! Are there any known issues with Corona’s store API? I don’t know what else it could be.

I am unaware of any issues with our store.* API’s and working with Apple. It sounds like you might have a repeatable test case. If you can narrow that down further to a demo app that our engineer’s could use, then you could file a bug report and we could look into it. 

Rob

@csavalas, sorry I meant - Try using the last public build in case something got broken in a daily build.

Good call Sphere. I’ll report back in a flash.

Well, I had high hopes Sphere, but the result was unfortunately the same. Rob, is there any other possibility I’m not considering? I’m putting together a stripped down project for you as we speak anyway, but I imagine that will take the engineers a while to look at, so I’m hoping for a forum miracle :rolleyes: .

Are you testing the next purchase before the previous one fully completes? When you say repeatedly testing, thats not likely something a user would do, but it’s weird that Apple would have issues on their own servers.  

Rob

Just to be sure… are you definitely calling store.finishTransaction() on all code paths?

Hi Rob,

No, I lock user input for a maximum of 15 seconds once purchase() is called or until the transaction callback completes. Google’s plugin does this automatically, which is a lot safer, but I digress! And as far as repeated testing, when I initially went to see if I could reproduce the error that caused the rejection, the very first purchase failed, so…

Hi Sphere,

Yes, indeed I am! And, like I said before, sometimes it works a few times in a row; albeit e-x-t-r-e-m-e-l-y slow a lot of the time.

gD.transactionCallback = function( event ) print("In transactionCallback", event.transaction.state) local transaction = event.transaction local tstate = event.transaction.state if gD.crosstimer~=nil and gD.BuyOrCount=="buy" then gD.stopcross() end if (tstate == "purchased" or tstate == "restored") then for k, v in pairs(gD.productArray) do if transaction.productIdentifier ==k then gD.handlePurchase(k) print("Successful Purchase") end end gD.store.finishTransaction( transaction ) elseif tstate == "refunded" then for k, v in pairs(gD.productArray) do if transaction.productIdentifier == k then --if gD.sD[k] == 1 then print("Successful Refund") --end end end gD.store.finishTransaction( transaction ) elseif tstate == "cancelled" then print("User cancelled transaction") gD.store.finishTransaction( transaction ) elseif tstate == "failed" then print("Transaction failed, type:", transaction.errorType, transaction.errorString) if transaction.errorType==7 then for k, v in pairs(gD.productArray) do --stupid workaround because the callback doesnt include the productidentifier :( if v.type=="multi" then if gD.store.consumePurchase~=nil then gD.store.consumePurchase( k, gD.transactionCallback) end end end native.showAlert( gD.lang[gD.sD.language]["oops"], gD.lang[gD.sD.language]["ownerror"], { gD.lang[gD.sD.language]["ok"] }, function() end ) elseif transaction.errorType~=-1005 and transaction.errorType~=6 then native.showAlert( gD.lang[gD.sD.language]["error"], transaction.errorString, { gD.lang[gD.sD.language]["ok"] }, function() end ) end gD.store.finishTransaction( transaction ) else print("unknown event", tstate) gD.store.finishTransaction( transaction ) end end

So when it failed, what was actually printed?

I attached the 30 seconds of console log while trying to make a purchase that fails. You can skip to the bottom few lines, but I don’t think it will yield any insight, ie “Unknown error” lol. And the rest of the items printed above that are messages regarding appodeal I believe, since the app is not live yet, but I could be wrong.

I redacted the app name, so this thread doesn’t come up in search engines for the game, but I’m happy to share it with you guys personally :slight_smile: It’s listed here as RedactedAppName

Mar 21 02:15:54 Babymou RedactedAppName![488] \<Error\>: Could not signal service com.apple.WebKit.WebContent: 154: Requestor is not a platform binary Mar 21 02:15:54 Babymou com.apple.xpc.launchd[1] (com.apple.xpc.launchd.domain.pid.RedactedAppName!.488) \<Error\>: Caller not allowed to perform action: RedactedAppName!.488, action = kill service, code = 154: Requestor is not a platform binary, uid = 501, euid = 501, gid = 501, egid = 501, asid = 0 Mar 21 02:15:54 Babymou com.apple.xpc.launchd[1] (com.apple.xpc.launchd.domain.pid.RedactedAppName!.488) \<Error\>: Caller not allowed to perform action: RedactedAppName!.488, action = kill service, code = 154: Requestor is not a platform binary, uid = 501, euid = 501, gid = 501, egid = 501, asid = 0 Mar 21 02:15:54 Babymou RedactedAppName![488] \<Error\>: Could not signal service com.apple.WebKit.Networking: 154: Requestor is not a platform binary Mar 21 02:15:55 Babymou RedactedAppName![488] \<Warning\>: banner displayed false Mar 21 02:16:01 Babymou RedactedAppName![488] \<Warning\>: \<Google\> Cannot find an ad network adapter with the name(s): com.google.DummyAdapter. Remember to link all required ad network adapters and SDKs, and set -ObjC in the 'Other Linker Flags' setting of your build target. Mar 21 02:16:02 Babymou RedactedAppName![488] \<Warning\>: \<Google:HTML\> You are currently using version 7.24.0 of the SDK. Please consider updating your SDK to the most recent SDK version to get the latest features and bug fixes. The latest SDK can be downloaded from https://goo.gl/UoiJ8F. A full list of release notes is available at https://developers.google.com/admob/ios/rel-notes. Mar 21 02:16:02 Babymou RedactedAppName![488] \<Warning\>: \<Google\> Cannot find an ad network adapter with the name(s): com.google.DummyAdapter. Remember to link all required ad network adapters and SDKs, and set -ObjC in the 'Other Linker Flags' setting of your build target. Mar 21 02:16:09 Babymou com.apple.xpc.launchd[1] \<Error\>: assertion failed: 13F69: launchd + 85529 [083E000D-4C31-3B98-A2C4-6FADB4D1940F]: 0x3 Mar 21 02:16:09 Babymou com.apple.xpc.launchd[1] \<Error\>: assertion failed: 13F69: launchd + 85529 [083E000D-4C31-3B98-A2C4-6FADB4D1940F]: 0x3 Mar 21 02:16:10 Babymou RedactedAppName![488] \<Warning\>: banner displayed false Mar 21 02:16:18 Babymou RedactedAppName![488] \<Warning\>: \<Google:HTML\> You are currently using version 7.24.0 of the SDK. Please consider updating your SDK to the most recent SDK version to get the latest features and bug fixes. The latest SDK can be downloaded from https://goo.gl/UoiJ8F. A full list of release notes is available at https://developers.google.com/admob/ios/rel-notes. Mar 21 02:16:18 Babymou RedactedAppName![488] \<Warning\>: \<Google\> Cannot find an ad network adapter with the name(s): com.google.DummyAdapter. Remember to link all required ad network adapters and SDKs, and set -ObjC in the 'Other Linker Flags' setting of your build target. Mar 21 02:16:19 Babymou RedactedAppName![488] \<Warning\>: \<Google\> Cannot find an ad network adapter with the name(s): com.google.DummyAdapter. Remember to link all required ad network adapters and SDKs, and set -ObjC in the 'Other Linker Flags' setting of your build target. Mar 21 02:16:21 Babymou com.apple.xpc.launchd[1] (com.apple.WebKit.WebContent.174B6340-AD47-4D37-AB39-D1BE93325408[719]) \<Warning\>: Service exited with abnormal code: 1 Mar 21 02:16:21 Babymou com.apple.xpc.launchd[1] (com.apple.WebKit.Networking.4E0BCBD0-9CDC-4C68-AB33-DE140B694C8C[718]) \<Warning\>: Service exited with abnormal code: 1 Mar 21 02:16:23 Babymou RedactedAppName![488] \<Warning\>: \<Google:HTML\> You are currently using version 7.24.0 of the SDK. Please consider updating your SDK to the most recent SDK version to get the latest features and bug fixes. The latest SDK can be downloaded from https://goo.gl/UoiJ8F. A full list of release notes is available at https://developers.google.com/admob/ios/rel-notes. Mar 21 02:16:24 Babymou com.apple.xpc.launchd[1] \<Error\>: assertion failed: 13F69: launchd + 85529 [083E000D-4C31-3B98-A2C4-6FADB4D1940F]: 0x3 Mar 21 02:16:24 Babymou com.apple.xpc.launchd[1] \<Error\>: assertion failed: 13F69: launchd + 85529 [083E000D-4C31-3B98-A2C4-6FADB4D1940F]: 0x3 Mar 21 02:16:25 Babymou RedactedAppName![488] \<Warning\>: banner displayed false Mar 21 02:16:36 Babymou com.apple.xpc.launchd[1] (com.apple.WebKit.Networking.62222E5E-626F-496E-8214-07FD1CD482F1[720]) \<Warning\>: Service exited with abnormal code: 1 Mar 21 02:16:36 Babymou com.apple.xpc.launchd[1] (com.apple.WebKit.WebContent.5BB5764E-F43F-4B6A-AD3D-BD8C0EF08C40[721]) \<Warning\>: Service exited with abnormal code: 1 Mar 21 02:16:37 Babymou RedactedAppName![488] \<Warning\>: \<Google\> Cannot find an ad network adapter with the name(s): com.google.DummyAdapter. Remember to link all required ad network adapters and SDKs, and set -ObjC in the 'Other Linker Flags' setting of your build target. Mar 21 02:16:39 Babymou RedactedAppName![488] \<Warning\>: \<Google:HTML\> You are currently using version 7.24.0 of the SDK. Please consider updating your SDK to the most recent SDK version to get the latest features and bug fixes. The latest SDK can be downloaded from https://goo.gl/UoiJ8F. A full list of release notes is available at https://developers.google.com/admob/ios/rel-notes. Mar 21 02:16:39 Babymou RedactedAppName![488] \<Error\>: Could not signal service com.apple.WebKit.WebContent: 154: Requestor is not a platform binary Mar 21 02:16:39 Babymou com.apple.xpc.launchd[1] (com.apple.xpc.launchd.domain.pid.RedactedAppName!.488) \<Error\>: Caller not allowed to perform action: RedactedAppName!.488, action = kill service, code = 154: Requestor is not a platform binary, uid = 501, euid = 501, gid = 501, egid = 501, asid = 0 Mar 21 02:16:39 Babymou com.apple.xpc.launchd[1] (com.apple.xpc.launchd.domain.pid.RedactedAppName!.488) \<Error\>: Caller not allowed to perform action: RedactedAppName!.488, action = kill service, code = 154: Requestor is not a platform binary, uid = 501, euid = 501, gid = 501, egid = 501, asid = 0 Mar 21 02:16:39 Babymou RedactedAppName![488] \<Error\>: Could not signal service com.apple.WebKit.Networking: 154: Requestor is not a platform binary Mar 21 02:16:40 Babymou com.apple.xpc.launchd[1] \<Error\>: assertion failed: 13F69: launchd + 85529 [083E000D-4C31-3B98-A2C4-6FADB4D1940F]: 0x3 Mar 21 02:16:40 Babymou com.apple.xpc.launchd[1] \<Error\>: assertion failed: 13F69: launchd + 85529 [083E000D-4C31-3B98-A2C4-6FADB4D1940F]: 0x3 Mar 21 02:16:51 Babymou RedactedAppName![488] \<Warning\>: In transactionCallback failed Mar 21 02:16:51 Babymou RedactedAppName![488] \<Warning\>: Transaction failed, type: unknown Cannot connect to iTunes Store

I see what looks like network errors in there.

Are you doing native builds or sim builds?

Yes, indeed network errors, and I’m assuming they are from appodeal, but I will confirm this. I’m furiously working on the bare bones project for the engineers with one button that simply purchases our consumable item, and will one by one add in the Game Center  plugin then appodeal.

Now for a major curve ball, The initial test of that one button app with no plugins purchased flawlessly 15+ times in a row, so I thought I was getting somewhere. Just to be sure, I uninstalled it and ran the real game build with all the plugins which is in Apple’s hands under review as we speak, and it TOO worked flawlessly several times in a row. I think this may drive me insane  :blink:

Can you post your build.settings?

Thanks

Rob

Sure, here you go Rob!

-- -- For more information on build.settings see the Corona SDK Build Guide at: -- http://docs.coronalabs.com/guide/distribution/buildSettings/index.html -- settings = { splashScreen = { enable = true, image = "graphic/splashsquare.jpg" }, plugins = { ["plugin.google.iap.v3"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, ["plugin.appodeal"] = { publisherId = "com.coronalabs" }, ["plugin.gpgs"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, ["CoronaProvider.gameNetwork.apple"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, ["iphone-sim"]=true } }, }, orientation = { -- Supported values for orientation: -- portrait, portraitUpsideDown, landscapeLeft, landscapeRight default = "portrait", supported = { "portrait", } }, excludeFiles = { -- Include only the necessary icon files on each platform iphone = { "Icon-\*dpi.png", }, android = { "Icon.png", "Icon-Small-\*.png", "Icon\*@2x.png","LaunchScreen.storyboardc", }, }, -- -- iOS Section -- iphone = { xcassets = "Images.xcassets", plist = { NSAppTransportSecurity = { NSAllowsArbitraryLoads=true, NSExceptionDomains = { ["redactedname.com"] = { NSIncludesSubdomains = true, NSThirdPartyExceptionAllowsInsecureHTTPLoads = true, }, ["google.com"] = { NSIncludesSubdomains = true, NSThirdPartyExceptionAllowsInsecureHTTPLoads = true, }, }, }, UILaunchStoryboardName = "LaunchScreen", UIStatusBarHidden = false, UIPrerenderedIcon = true, -- set to false for "shine" overlay --UIApplicationExitsOnSuspend = true, -- uncomment to quit app on suspend UIFileSystem = false, CFBundleLocalizations = { "en", --English "de", --German "zh", --Chinese "ja", --Japanese "ko", --Korean "fr", --French "it", --Italian "es", --Spanish "pt", --Portugese "ru", --Russian }, CFBundleDisplayName = "Redacted Name!", CFBundleName = "Redacted Name!", --[[-- iOS app URL schemes: FacebookAppID = "555461954831062", CFBundleURLTypes = { { CFBundleURLSchemes = { "fb555461954831062", -- replace XXXXXXXXX with your Facebook appId } } } --]] } }, -- -- Android Section -- android = { --facebookAppId = "555461954831062", usesPermissions = { "android.permission.INTERNET", "com.android.vending.BILLING", "android.permission.VIBRATE", "com.android.vending.CHECK\_LICENSE", "android.permission.WRITE\_EXTERNAL\_STORAGE", }, googlePlayGamesAppId = "792877554387", }, }

Sphere, I forgot to answer your other question; doing sim builds!

It all points to intermittent internet… Maybe Apple need Google’s help to build a flawless network!

Haha, exactly! I totally agree; I’ve just been hesitant to accept that conclusion with the assumption that such a massive company would not have such ridiculous network problems. Perhaps their sandbox environment is flakier than the real thing?

Update to anyone reading this thread; that issue went away on its own, so it would appear that the most unlikely option was indeed the problem (Apple server issues). And as an update to Rob, I did have a test app to give the engineers, but I didn’t want to waste their time, since it seems to have been a bizarre anomaly.