Problem with transactionCallback when calling store.purchase in iOS

Today I encounter a strange problem with a new app using a proven InApp module calling store.purchase({"product1}) after the store init.

Instead getting the “purchased” state I only get a “failed” state back with the info the connection to the iTunes store is not possible. But it should be possible, because the store can be reached and only the purchase fails.

I’ve tested on an iPad 4th generation with iOS 8.1.2

Because this code works fine in my other (older) apps I now wonder if something has changed or if this is a timely problem which appeared today because of some reasons!?

Does anybody else encounter the problems with iOS in-app code today?

  • Chris

PS: Oh and I’ve used an older Corona build and the new one 2625

Was this a test purchase or a live customer purchase?

Rob

A sandboxed test purchase with a testuser account.

UPDATE:

I now have checked the code again, my iTunes Connect settings for the IAP and tested everything on three different devices with an older iOS and 8.2 … everything with the same result described above.

Is there anything being posted to your device’s console log?

Rob

Here is the part from the “trying to purchase” part of the device log:

(Warn ) mstreamd: mstreamd shutting down.
(Note ) mstreamd: mstreamd starting up.
(Note ) PS: Media stream daemon starting…

<Warning>: Using Apple’s in-app purchase system.
<Warning>: trying to purchase now…
<Warning>: transactionCallback: Received event storeTransaction
<Warning>: state: failed
<Warning>: errorType: unknown
<Warning>: errorString: Verbindung mit iTunes Store nicht möglich
<Warning>: Transaction Failed

with “Verbindung mit iTunes Store nicht möglich” meaning the connection to the iTunes store was not possible.

 

any news regarding this?

Here is another log from the console with a little more info:

<Warning>: [UPP-SBDDomainSyncedStorageController]  running synchronizeImmediatelyWithCompletionHandler: now
<Warning>: [StoreBookkeeper] -[SBKUniversalPlaybackPositionStore _onQueueRunTaskWithName:taskCompletionHandler:runTaskBlock:] _onQueueSync - beginning synchronize operation…
<Warning>: [StoreBookkeeper] -[SBKUniversalPlaybackPositionStore _onQueueLoadBagContextWithCompletionHandler:] _onQueueLoadBag - load bag operation beginning…
<Warning>: [StoreBookkeeper] __81-[SBKUniversalPlaybackPositionStore _onQueueLoadBagContextWithCompletionHandler:]_block_invoke411 _onQueueLoadBag - load bag completed.
<Warning>: [StoreBookkeeper] __89-[SBKUniversalPlaybackPositionStore _onQueueSynchronizeImmediatelyWithCompletionHandler:]_block_invoke _onQueueSync - synchronize operation beginning…
<Notice>: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0
<Notice>: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0
<Warning>: [StoreBookkeeper] [SBKTransactionController.m:447] Transaction Failed: <SBKSyncTransaction: 0x1784c6a0> domain = com.apple.upp, SYNC: anchor=0 – Error: <SBKStoreError:0x167293c0> “Error Code = SBKStoreErrorCodeStoreAccountSessionExpired (-1004)”
<Warning>: [StoreBookkeeper] __96-[SBKUniversalPlaybackPositionStore _onQueueRunTaskWithName:taskCompletionHandler:runTaskBlock:]_block_invoke279 _onQueueSync - synchronize completed.  ERROR = ‘Error Code = SBKStoreErrorCodeStoreAccountSessionExpired (-1004)’.
<Warning>: [UPP-SBDJobScheduler]  Could not synchronize domain ‘com.apple.upp’ (<SBKStoreError:0x167439f0> “Error Code = SBKStoreErrorCodeStoreAccountSessionExpired (-1004)”).  Synchronization will be re-attempted when the network connectivity, or account status has changed.
<Notice>: (Note ) mstreamd: Not monitoring for external power.
<Notice>: (Note ) PS: Media stream daemon stopping.
<Notice>: (Note ) AS: <MSIOSAlbumSharingDaemon: 0x17dc9270>: Shared Streams daemon has shut down.
<Notice>: (Warn ) mstreamd: mstreamd shutting down.
<Notice>: (Note ) mstreamd: mstreamd starting up.
<Notice>: (Note ) PS: Media stream daemon starting…
<Notice>: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0
<Notice>: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0
<Warning>: Lost connection from Limit Ad Tracking client.
<Warning>: Lost connection from Limit Ad Tracking client.
<Warning>: Application ‘UIKitApplication:com.apple.AdSheetPhone[0xdc40]’ exited voluntarily.
<Warning>: id=com.apple.AdSheetPhone pid=7345, state=0
<Notice>: (Note ) mstreamd: Not monitoring for external power.
<Notice>: (Note ) PS: Media stream daemon stopping.
<Notice>: (Note ) AS: <MSIOSAlbumSharingDaemon: 0x176c1340>: Shared Streams daemon has shut down.
<Notice>: (Warn ) mstreamd: mstreamd shutting down.
<Notice>: (Note ) mstreamd: mstreamd starting up.
<Notice>: (Note ) PS: Media stream daemon starting…
<Notice>: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0
<Warning>: Could not load library [21]
<Notice>: (Note ) MC: User has completed cloud configuration. Not showing UI again.
<Notice>: (Note ) MC: User has completed cloud configuration. Not showing UI again.
<Warning>: Updating media purchase history for initial load…

<Warning>: transactionCallback: Received event storeTransaction
<Warning>: state: failed
<Warning>: errorType: unknown
<Warning>: errorString: Verbindung mit iTunes Store nicht möglich
<Warning>: Transaction Failed

<Warning>: [Warning] Unhandled server key: alert
<Warning>: PKPassLibrary isn’t supported on iPads
<Warning>: AIDA Notification plugin running
<Warning>: PKPassLibrary isn’t supported on iPads
<Warning>: AIDA Notification plugin running
<Notice>: AppleKeyStore: operation failed ( ############ I cleared this out! ###########)
<Warning>: INFO: Account changed (############ I cleared this out! ###########)
<Notice>: AppleKeyStore: operation failed (############ I cleared this out! ###########)
<Warning>: INFO: Account changed (############ I cleared this out! ###########)
<Warning>: ============================== releasing power assertion: <CloudServerPowerAssertion: 0x156a1210>

Was this a test purchase or a live customer purchase?

Rob

A sandboxed test purchase with a testuser account.

UPDATE:

I now have checked the code again, my iTunes Connect settings for the IAP and tested everything on three different devices with an older iOS and 8.2 … everything with the same result described above.

Is there anything being posted to your device’s console log?

Rob

Here is the part from the “trying to purchase” part of the device log:

(Warn ) mstreamd: mstreamd shutting down.
(Note ) mstreamd: mstreamd starting up.
(Note ) PS: Media stream daemon starting…

<Warning>: Using Apple’s in-app purchase system.
<Warning>: trying to purchase now…
<Warning>: transactionCallback: Received event storeTransaction
<Warning>: state: failed
<Warning>: errorType: unknown
<Warning>: errorString: Verbindung mit iTunes Store nicht möglich
<Warning>: Transaction Failed

with “Verbindung mit iTunes Store nicht möglich” meaning the connection to the iTunes store was not possible.

 

any news regarding this?

Here is another log from the console with a little more info:

<Warning>: [UPP-SBDDomainSyncedStorageController]  running synchronizeImmediatelyWithCompletionHandler: now
<Warning>: [StoreBookkeeper] -[SBKUniversalPlaybackPositionStore _onQueueRunTaskWithName:taskCompletionHandler:runTaskBlock:] _onQueueSync - beginning synchronize operation…
<Warning>: [StoreBookkeeper] -[SBKUniversalPlaybackPositionStore _onQueueLoadBagContextWithCompletionHandler:] _onQueueLoadBag - load bag operation beginning…
<Warning>: [StoreBookkeeper] __81-[SBKUniversalPlaybackPositionStore _onQueueLoadBagContextWithCompletionHandler:]_block_invoke411 _onQueueLoadBag - load bag completed.
<Warning>: [StoreBookkeeper] __89-[SBKUniversalPlaybackPositionStore _onQueueSynchronizeImmediatelyWithCompletionHandler:]_block_invoke _onQueueSync - synchronize operation beginning…
<Notice>: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0
<Notice>: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0
<Warning>: [StoreBookkeeper] [SBKTransactionController.m:447] Transaction Failed: <SBKSyncTransaction: 0x1784c6a0> domain = com.apple.upp, SYNC: anchor=0 – Error: <SBKStoreError:0x167293c0> “Error Code = SBKStoreErrorCodeStoreAccountSessionExpired (-1004)”
<Warning>: [StoreBookkeeper] __96-[SBKUniversalPlaybackPositionStore _onQueueRunTaskWithName:taskCompletionHandler:runTaskBlock:]_block_invoke279 _onQueueSync - synchronize completed.  ERROR = ‘Error Code = SBKStoreErrorCodeStoreAccountSessionExpired (-1004)’.
<Warning>: [UPP-SBDJobScheduler]  Could not synchronize domain ‘com.apple.upp’ (<SBKStoreError:0x167439f0> “Error Code = SBKStoreErrorCodeStoreAccountSessionExpired (-1004)”).  Synchronization will be re-attempted when the network connectivity, or account status has changed.
<Notice>: (Note ) mstreamd: Not monitoring for external power.
<Notice>: (Note ) PS: Media stream daemon stopping.
<Notice>: (Note ) AS: <MSIOSAlbumSharingDaemon: 0x17dc9270>: Shared Streams daemon has shut down.
<Notice>: (Warn ) mstreamd: mstreamd shutting down.
<Notice>: (Note ) mstreamd: mstreamd starting up.
<Notice>: (Note ) PS: Media stream daemon starting…
<Notice>: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0
<Notice>: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0
<Warning>: Lost connection from Limit Ad Tracking client.
<Warning>: Lost connection from Limit Ad Tracking client.
<Warning>: Application ‘UIKitApplication:com.apple.AdSheetPhone[0xdc40]’ exited voluntarily.
<Warning>: id=com.apple.AdSheetPhone pid=7345, state=0
<Notice>: (Note ) mstreamd: Not monitoring for external power.
<Notice>: (Note ) PS: Media stream daemon stopping.
<Notice>: (Note ) AS: <MSIOSAlbumSharingDaemon: 0x176c1340>: Shared Streams daemon has shut down.
<Notice>: (Warn ) mstreamd: mstreamd shutting down.
<Notice>: (Note ) mstreamd: mstreamd starting up.
<Notice>: (Note ) PS: Media stream daemon starting…
<Notice>: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0
<Warning>: Could not load library [21]
<Notice>: (Note ) MC: User has completed cloud configuration. Not showing UI again.
<Notice>: (Note ) MC: User has completed cloud configuration. Not showing UI again.
<Warning>: Updating media purchase history for initial load…

<Warning>: transactionCallback: Received event storeTransaction
<Warning>: state: failed
<Warning>: errorType: unknown
<Warning>: errorString: Verbindung mit iTunes Store nicht möglich
<Warning>: Transaction Failed

<Warning>: [Warning] Unhandled server key: alert
<Warning>: PKPassLibrary isn’t supported on iPads
<Warning>: AIDA Notification plugin running
<Warning>: PKPassLibrary isn’t supported on iPads
<Warning>: AIDA Notification plugin running
<Notice>: AppleKeyStore: operation failed ( ############ I cleared this out! ###########)
<Warning>: INFO: Account changed (############ I cleared this out! ###########)
<Notice>: AppleKeyStore: operation failed (############ I cleared this out! ###########)
<Warning>: INFO: Account changed (############ I cleared this out! ###########)
<Warning>: ============================== releasing power assertion: <CloudServerPowerAssertion: 0x156a1210>

I am experiencing the same problem. Are there any news?

A quick google brought up a few things that might offer some suggestions. Most of the time these issues are not Corona’s but a setup problem with the Apple side. Try some of these things:

http://stackoverflow.com/questions/7402801/cannot-connect-to-itunes-store-in-app-purchases

https://discussions.apple.com/thread/3425191?start=15&tstart=0

https://developer.apple.com/library/prerelease/ios/technotes/tn2413/_index.html#//apple_ref/doc/uid/DTS40016228-CH1-ERROR_MESSAGES-CANNOT_CONNECT_TO_ITUNES_STORE

Rob

I am experiencing the same problem. Are there any news?

A quick google brought up a few things that might offer some suggestions. Most of the time these issues are not Corona’s but a setup problem with the Apple side. Try some of these things:

http://stackoverflow.com/questions/7402801/cannot-connect-to-itunes-store-in-app-purchases

https://discussions.apple.com/thread/3425191?start=15&tstart=0

https://developer.apple.com/library/prerelease/ios/technotes/tn2413/_index.html#//apple_ref/doc/uid/DTS40016228-CH1-ERROR_MESSAGES-CANNOT_CONNECT_TO_ITUNES_STORE

Rob