The solution of “​<Error>: Could not successfully update network info during initialization.”

What happened

The error message like below happened on iOS when launching an app and crash immediately.

​<Error>: Could not successfully update network info during initialization.

Before this message happened, I purchased a lot of auto-renewal subscriptions, about 300 times, and restore over and over again for testing purchasing subscriptions.

The solution

Restore your device to factory settings. For me, the error solved by it.

Reproduce transactions as new transaction id when repurchasing an auto-renewable subscription

I was building an app which has auto-renewable subscriptions.
When I try to resubscribe the subscription I subscribed before, then iOS shows the dialog, “You’re currently subscribed to this.”, And enqueue all of the transactions I purchased in the past into a default transaction queue. The statuses of the transactions are SKPaymentTransactionStatePurchased. As a result of this behavior, I have to process vast of transactions. This happening was in the Sandbox environment.
I expected to enqueue only one transaction as SKPaymentTransactionStatePurchased.
The following list is my scenario that reproduces all transactions:
1. Subscribe a product
2. Subscribe the product purchased again
3. The dialog, “You’re currently subscribed to this.”, is popped up
4. Tap ok button
5. Press Home button then close my app
6. Tap and launch my app again

I tried to solve this problem throughout the day. Finally, I created a new sandbox user and just used it for purchasing subscription. Then this behavior has no longer occurred. I don’t know why such things happened.

The test cases for In-App Purchase on iOS

I came up to implement In-App Purchase on iOS with Unity.
I looked for the test cases for In-App Purchase, however, couldn’t find their cases. Therefore, I memorize the test cases I checked myself.

At first, please read In-App Purchase Best Practice. We should implement your In-App Purchase according to this document.

For instance, I implement below list:

  • Add a transaction queue observer at application launch
  • Query the App Store for product information before presenting your app’s store UI

Figure 1 shows the process, second of the list, from showing available products to purchasing them.

Figure 1.

  1. Retrieve product identifiers from a data store
  2. Request products from Apple Store
  3. Show available products on an app

Below, the test cases I checked. the left side of the table are test cases and the right side is expected results.

Purchasing and Subscribing test cases

Test case Expected result
Show a product list scene The product list scene shows buyable products
Buy products All products can buy
Close an app in the middle of a purchasing The item corresponds to the purchased product is given the user next launch
Disconnect internet connection in the middle of a purchasing The items correspond to the purchased are given the user next startup
Purchase a subscription product in advance. Switch an Apple account to another one on the same Device The purchased subscription product must get unbuyable
Purchase a subscription product by the same Apple account on deferent devices (purchase a product on Device-A, then purchase it on Device-B) Must purchase the product on Device-A and must not purchase it on Device-B
Purchase a subscription product with the same Apple account among two devices Must purchase the product on both devices
Purchase a subscription product in advance and close the app completely. Wait until the subscription is updated by Apple Store and launch the app Must give the user the items corresponding to the subscribed product


Implement a restoring product for subscription products.

Test case Expected result
Restore the subscription after the subscription product is renewed The app gives the items that corresponding to the subscription to the user | Buy a subscription product with the same Apple account. Restore Device-A, next Device-B
Buy a subscription product in advance. Use both of devices, Device-A and Device-B. Then restore Device-A next Device-B An app gives the items corresponding to the subscription to Device-A, although it doesn’t on Device-B
Launch an app after closing the app in the middle of Restoring Purchased Products Do not execute unprocessed transactions
Sign out from App Store, then launch an app The user is prompted to sign in App Store if unprocessed transactions are existed
Tap Buy a product button multiple times Show only one In-App Purchase dialog
Use unregistered product identifiers in iTunes connect that it’s in part of an app’s buyable item list Do not show the unregistered products in app’s item list