In-app subscription does not come to SKPaymentTransactionStatePurchasing state

While doing an in-app auto renewable subscription, and when observing its status, the status directly goes into SKPaymentTransactionStatePurchased state without going into SKPaymentTransactionStatePurchasing state. So that no dialog window is prompted to the user.

This does not happen all the time. After refreshing everything (Signing out and sign in again from sandbox account, rebuilding the app, etc) subscriptions work as expected. But after sometime above behaviour happens again. What caused this issue?

Also, when this happens, the receipt does not indicate anything about the subscription I tried to do last. It has the details of last subscription and indicates that it is expired.
In-app subscription does not come to SKPaymentTransactionStatePurchasing state
 
 
Q