Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SANDBOX] StoreKit config not working when using Xcode 14/iOS 16 beta 3 #1765

Closed
5 tasks done
ZeeWanderer opened this issue Jul 18, 2022 · 13 comments
Closed
5 tasks done
Labels

Comments

@ZeeWanderer
Copy link

ZeeWanderer commented Jul 18, 2022

Describe the bug
StoreKit configuration file stopped working on XCode 14 beta 3 + iOS 16 beta 3, the same configuration works on XCode 13.4.1 + IOS 15.5. I tried resaving public testing certificate with beta xcode but it produces the same file. I also tried recreating Config file with Xcode 14. Logs attached, thou logs for ios15.5+Xcode13.4.1 are from a simulator as rn i don't have a real device with 15.X to produce the log.

  1. Environment
    1. Platform: iOS
    2. SDK version: 4.9.0
    3. StoreKit 2 (enabled with useStoreKit2IfEnabled) (Y/N): N
    4. OS version: 16 beta 3
    5. Xcode version: 14 beta 3
    6. How widespread is the issue. Percentage of devices affected.
  2. RC_ios15.5+Xcode13.4.1.log RC_ios16.b3+Xcode14.b3.log

Additional context
Add any other context about the problem here.

EDIT:
If StoreKit 2 is enabled the config works fine
log: RC_ios16.b3+Xcode14.b3+SK2.log

@beylmk
Copy link
Contributor

beylmk commented Jul 18, 2022

Hey @ZeeWanderer, thanks for the detailed issue. It's definitely possible this was broken in the latest xcode beta release. I'll try it out myself, but need to download beta 3 first 😅 will report back here once done!

@beylmk
Copy link
Contributor

beylmk commented Jul 19, 2022

Hey @ZeeWanderer, quick update -- we confirmed that StoreKit config files work for our sample app in Xcode 14 beta 3 +ios 16 beta 3. We did see the method SkTestSession.expireSubscription crash sometimes, but don't think that's related to your issue...

Looking at the logs, it appears that the successful ios16/xcode14 run didn't make an SKProductsRequest because our SDK already cached products on the device. The SKProductsRequest is the one that fails later on.

Can you please confirm whether the iOS 16/Xcode 14/useStoreKit2IfEnabled true combination still works after uninstalling and reinstalling the app?

@ZeeWanderer
Copy link
Author

ZeeWanderer commented Jul 25, 2022

Yes, iOS 16/Xcode 14/useStoreKit2IfEnabled true combination works with clean app install. Log still says cached thou.
log: RC_ios16.b3+Xcode14.b3+SK2+clean_install.log

@beylmk
Copy link
Contributor

beylmk commented Jul 28, 2022

Hey @ZeeWanderer actually don't worry about the caching thing. Turns out we are just missing a success log from the initial products request when SK2 is enabled.

I'm still unable to reproduce...perhaps you could Xcode beta 4?

@taquitos taquitos added the status: waiting-for-reply Issues that are waiting for a reply label Jul 29, 2022
@ZeeWanderer
Copy link
Author

On Xcode 14 beta 4 and iOS 16 beta 4 still the same thing. Without SK2 enabled using the StoreKit config results in fetching error.
Logs:
RC_ios16.b4+Xcode14.b4.log
RC_ios16.b4+Xcode14.b4+SK2+clean_install.log

@stale stale bot removed the status: waiting-for-reply Issues that are waiting for a reply label Aug 1, 2022
@taquitos
Copy link
Contributor

taquitos commented Aug 2, 2022

Heya, we've got a broader testing initiative for iOS 16 compatibility that we're going to be doing when the GM is available. Unfortunately, we haven't been able to reproduce this yet but we're going to keep trying. For now, I'd suggest using useStoreKit2IfAvailable: true for now. The default uses a mix of SK1 and SK2- SK2 where the API is more accurate/less error prone, but upon further testing, that's still problematic with iOS 16 beta 4.

NachoSoto added a commit that referenced this issue Aug 2, 2022
…turns an error

This will help figure out the reason behind #1765.
We were currently ignoring the error returned by `ProductsManager`.
@NachoSoto
Copy link
Contributor

Thanks a lot for attaching those logs. That made me realize that we were not exposing the underlying error returned by StoreKit, so I fixed that: #1792

NachoSoto added a commit that referenced this issue Aug 2, 2022
…turns an error (#1792)

This will help figure out the reason behind #1765.
We were currently ignoring the error returned by `ProductsManager`.

In the example below, we can see the underlying issue is `SKErrorDomain` code 5.

### Before:
> Error fetching offerings - The operation couldn’t be completed. (RevenueCat.OfferingsManager.Error error 1.)

### After:
> Error fetching offerings - The operation couldn’t be completed. (RevenueCat.OfferingsManager.Error error 1.)
_**Underlying error: The operation couldn’t be completed. (SKErrorDomain error 5.)**_
ERROR: 😿‼️ There is an issue with your configuration. Check the underlying error for more details. There's a problem with your configuration. None of the products registered in the RevenueCat dashboard could be fetched from App Store Connect (or the StoreKit Configuration file if one is being used). 
More information: https://rev.cat/why-are-offerings-empty
@NachoSoto
Copy link
Contributor

That PR was just merged. We're not sure when the next release will be out, but if you're able to test with main, we'd love to see exactly why your product request is failing 🙏🏻

@ZeeWanderer
Copy link
Author

ZeeWanderer commented Aug 3, 2022

Here is the log for main (9b5b3f2), no SK2 and clean install:
RC_ios-main+XCode14.b4+ios16.b4+no-SK2+clean_install.log
If it helps, here is the config file (with TXT ext instead of storekit because github):
Products.txt

@NachoSoto
Copy link
Contributor

@ZeeWanderer are you still seeing this issue on Xcode 14 RC?

@ZeeWanderer
Copy link
Author

@NachoSoto Yes, it still requires SK2 to work with store kit config.
XCode 14, iOS 16, SDK 4.12.0.

@NachoSoto
Copy link
Contributor

I recommend filing a Feedback with Apple if you're still seeing this issue, as it's likely an Xcode bug.

@NachoSoto NachoSoto closed this as not planned Won't fix, can't repro, duplicate, stale Dec 13, 2022
@NachoSoto NachoSoto removed the triaged label Dec 13, 2022
@github-actions
Copy link

This issue has been automatically locked due to no recent activity after it was closed. Please open a new issue for related reports.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants