Describe the bug
I am receiving this weird crash after launching the app while showing the paywall. It happens right after the paywall is seen.
- Environment
- Platform: iOS
- SDK version: (main branch from spm, commit: 348258a
- StoreKit version:
- OS version: 18 Beta 5
- Xcode version: Xcode 15.4, Xcode 16 Beta 4, Beta 5
- Device and/or simulator:
- Environment:
- How widespread is the issue. Percentage of devices affected.
- Debug logs that reproduce the issue. Complete logs with
Purchases.logLevel = .verbose will help us debug this issue.
Console prints this:
SwiftUICore/GraphHost.swift:215: Fatal error: no current graph host
Xcode says this:
PressReaderStaging`static PressReaderApp.$main():
0x100269614 <+0>: stp x20, x19, [sp, #-0x20]!
0x100269618 <+4>: stp x29, x30, [sp, #0x10]
0x10026961c <+8>: add x29, sp, #0x10
0x100269620 <+12>: mov x0, #0x0
0x100269624 <+16>: bl 0x1002676ac ; type metadata accessor for PressReaderStaging.PressReaderApp at <compiler-generated>
0x100269628 <+20>: mov x20, x0
0x10026962c <+24>: bl 0x100269648 ; lazy protocol witness table accessor for type PressReaderStaging.PressReaderApp and conformance PressReaderStaging.PressReaderApp : SwiftUI.App in PressReaderStaging at <compiler-generated>
0x100269630 <+28>: mov x1, x0
0x100269634 <+32>: mov x0, x20
0x100269638 <+36>: bl 0x1013ce4fc ; symbol stub for: static SwiftUI.App.main() -> ()
-> 0x10026963c <+40>: ldp x29, x30, [sp, #0x10]
0x100269640 <+44>: ldp x20, x19, [sp], #0x20
0x100269644 <+48>: ret
Verbose logs:
VERBOSE: DeviceCache.init: DeviceCache (0x0000000301391ce0)
VERBOSE: PurchasesOrchestrator.init: PurchasesOrchestrator (0x0000000105159a00)
DEBUG: ℹ️ Purchases is configured with response verification disabled
DEBUG: ℹ️ Purchases is configured with StoreKit version 2
VERBOSE: Purchases.init: created new Purchases instance: Purchases (0x0000000104010d00)
StoreKit Wrapper: right(<RevenueCat.PaymentQueueWrapper: 0x3038a0800>)
INFO: ℹ️ Purchases instance already set. Did you mean to configure two Purchases objects?
VERBOSE: DeviceCache.init: DeviceCache (0x00000003013bd3b0)
VERBOSE: PurchasesOrchestrator.init: PurchasesOrchestrator (0x00000001053da800)
DEBUG: ℹ️ Purchases is configured with response verification disabled
DEBUG: ℹ️ Purchases is configured with StoreKit version 2
VERBOSE: Purchases.init: created new Purchases instance: Purchases (0x0000000105242680)
StoreKit Wrapper: right(<RevenueCat.PaymentQueueWrapper: 0x3038e5d80>)
VERBOSE: Updating all caches
VERBOSE: Updating all caches
VERBOSE: Purchases.deinit: Purchases (0x0000000104010d00)
VERBOSE: PurchasesOrchestrator.deinit: PurchasesOrchestrator (0x0000000105159a00)
VERBOSE: PurchasesOrchestrator: caching presented paywall
-
Steps to reproduce, with a description of expected vs. actual behavior
I am presenting a sheet after launch my main view. Then I present paywall over this, the crash happens.
-
Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.)
-
Additional context
Crash probably happens here:
RevenutCatUI>Modifiers>ViewExtensions. Line 110
When I comment out ViewThatFits, it does not crash:
/// Equivalent to `scrollableIfNecessary` except that it's always scrollable on iOS 15
/// to work around issues with that iOS 15 implementation in some instances.
@ViewBuilder
func scrollableIfNecessaryWhenAvailable(_ axis: Axis = .vertical, enabled: Bool = true) -> some View {
if enabled {
if #available(iOS 16.0, macOS 13.0, tvOS 16.0, watchOS 9.0, *) {
// ViewThatFits(in: axis.scrollViewAxis) {
// self
ScrollView(axis.scrollViewAxis) {
self
}
// }
} else {
self
.centeredContent(axis)
.scrollable(if: enabled)
}
} else {
self
}
}
Describe the bug
I am receiving this weird crash after launching the app while showing the paywall. It happens right after the paywall is seen.
usesStoreKit2IfAvailable(true))Purchases.logLevel = .verbosewill help us debug this issue.Console prints this:
SwiftUICore/GraphHost.swift:215: Fatal error: no current graph hostXcode says this:
Verbose logs:
Steps to reproduce, with a description of expected vs. actual behavior
I am presenting a sheet after launch my main view. Then I present paywall over this, the crash happens.
Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.)
Additional context
Crash probably happens here:
RevenutCatUI>Modifiers>ViewExtensions. Line 110When I comment out ViewThatFits, it does not crash: