StoreKit1 does not work on older iOS versions

Dear Community, I am facing a strange issue with StoreKit in a project I am working on. We have a paywall in the app where we display the IAP options that we have configured in App Store Connect, iOS 16 and iOS 15 work fine with StoreKit1 and StoreKit2 APIs however on iOS 14(StoreKit1) the products fail to fetch with the following error:

Domain=SKErrorDomain Code=0 "An unknown error occurred" UserInfo={NSLocalizedDescription=An unknown error occurred, NSUnderlyingError=0x600003c95bf0 {Error Domain=ASDErrorDomain Code=507 "Error decoding object" UserInfo={NSLocalizedDescription=Error decoding object, NSLocalizedFailureReason=Attempted to decode store response}}}

I have integrated a little test paywall in the app to see if the behaviour would change, but it didn't. The code for it can be found here.

Replies

This behaviour occurs only in the sandbox environment e.g. testflight, ad-hoc, developer signed builds and it works correctly in the prod environment(app store build)