App crashes on closing Paywall
Describe the bug
App crashes on closing Paywall on physical Android 14 device. My RevenueCat version is 6.28.0.
D/RevenueCatUI(16103): Paywalls: Close paywall initiated
I/flutter (16103): Paywall asked to dismiss
F/OpenGLRenderer(16103): Trying to start new animators on 0x7f4890c400 (UnprojectedRipple) without an animation handle!
F/libc (16103): Fatal signal 6 (SIGABRT), code -6 in tid 16181 (RenderThread)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'xiaomi/ugglite/ugglite:7.1.2/N2G47H/V11.0.3.0.NDFMIXM:user/release-keys'
Revision: '0'
ABI: 'arm64'
pid: 16103, tid: 16181, name: RenderThread >>> app.univi.prod <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: 'Trying to start new animators on 0x7f4890c400 (UnprojectedRipple) without an animation handle!'
x0 0000000000000000 x1 0000000000003f35 x2 0000000000000006 x3 0000000000000008
x4 0000000000000000 x5 0000000000000000 x6 0000007f814c0000 x7 0000000000000000
x8 0000000000000083 x9 ffffffffffffffdf x10 0000000000000000 x11 0000000000000001
x12 ffffffffffffffff x13 0000000000000000 x14 0000000000000000 x15 002ae27b674fdab9
x16 0000007f7f1e8ec8 x17 0000007f7f196550 x18 6e398d52d1b23b78 x19 0000007f4be894f8
x20 0000000000000006 x21 0000007f4be89450 x22 0000000000000000 x23 0000007f2a2937f8
x24 0000007f2a293678 x25 0000000000000000 x26 6e398d52d1b23b78 x27 0000007f6ee537f0
x28 7fffffffffffffff x29 0000007f4be88880 x30 0000007f7f1939e0
sp 0000007f4be88860 pc 0000007f7f196558 pstate 0000000060000000
backtrace:
#00 pc 000000000006b558 /system/lib64/libc.so (tgkill+8)
#01 pc 00000000000689dc /system/lib64/libc.so (pthread_kill+64)
#02 pc 0000000000023f28 /system/lib64/libc.so (raise+24)
#03 pc 000000000001c9ac /system/lib64/libc.so (abort+52)
#04 pc 0000000000010e20 /system/lib64/libcutils.so (__android_log_assert+232)
#05 pc 00000000000429f8 /system/lib64/libhwui.so
#06 pc 00000000000763d8 /system/lib64/libhwui.so
#07 pc 0000000000075c48 /system/lib64/libhwui.so
#08 pc 00000000000766b0 /system/lib64/libhwui.so
#09 pc 0000000000075d00 /system/lib64/libhwui.so
#10 pc 00000000000766b0 /system/lib64/libhwui.so
#11 pc 0000000000075d00 /system/lib64/libhwui.so
#12 pc 00000000000766b0 /system/lib64/libhwui.so
#13 pc 0000000000075d00 /system/lib64/libhwui.so
#14 pc 00000000000766b0 /system/lib64/libhwui.so
#15 pc 0000000000075d00 /system/lib64/libhwui.so
#16 pc 00000000000766b0 /system/lib64/libhwui.so
#17 pc 0000000000075d00 /system/lib64/libhwui.so
#18 pc 0000000000075b64 /system/lib64/libhwui.so (_ZN7android10uirenderer10RenderNode11prepareTreeERNS0_8TreeInfoE+112)
#19 pc 0000000000032738 /system/lib64/libhwui.so
#20 pc 00000000000357e0 /system/lib64/libhwui.so
#21 pc 00000000000355c8 /system/lib64/libhwui.so
#22 pc 000000000003ae94 /system/lib64/libhwui.so (_ZN7android10uirenderer12renderthread12RenderThread10threadLoopEv+148)
#23 pc 0000000000012414 /system/lib64/libutils.so (_ZN7android6Thread11_threadLoopEPv+272)
#24 pc 00000000000a0318 /system/lib64/libandroid_runtime.so (_ZN7android14AndroidRuntime15javaThreadShellEPv+116)
#25 pc 00000000000681e4 /system/lib64/libc.so (_ZL15__pthread_startPv+196)
#26 pc 000000000001dbc0 /system/lib64/libc.so (__start_thread+16)
Here is my Widget:
class PaywallScreen extends StatefulWidget {
const PaywallScreen({Key? key}) : super(key: key);
@override
State<StatefulWidget> createState() => _PaywallScreenState();
}
class _PaywallScreenState extends State<PaywallScreen> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
body: SafeArea(
child: Center(
child: PaywallView(
displayCloseButton: true,
onPurchaseStarted: (Package rcPackage) {
print('Purchase started for package: ${rcPackage.identifier}');
},
onPurchaseCompleted:
(CustomerInfo customerInfo, StoreTransaction storeTransaction) {
print('Purchase completed for customerInfo:\n $customerInfo\n '
'and storeTransaction:\n $storeTransaction');
},
onPurchaseError: (PurchasesError error) {
print('Purchase error: $error');
},
onRestoreCompleted: (CustomerInfo customerInfo) {
print('Restore completed for customerInfo:\n $customerInfo');
},
onRestoreError: (PurchasesError error) {
print('Restore error: $error');
},
onDismiss: () {
print('Paywall asked to dismiss');
Navigator.pop(context);
},
),
),
),
);
}
}
Here is flutter doctor:
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.19.6, on macOS 14.4.1 23E224 darwin-arm64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] VS Code (version 1.88.1)
[✓] Connected device (6 available)
[✓] Network resources
• No issues found!
👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!
It looks like the issue is in Navigator.pop(context), I wonder if it's maybe getting called during an ongoing animation or state change, as the underlying widget is being removed from the tree. Can you try doing something like:
WidgetsBinding.instance.addPostFrameCallback((_) {
Navigator.pop(context);
});
Are you seeing this in the sample app in this repository?
Thanks for opening the issue!
Thanks for the prompt response. I tried to wrap it with addPostFrameCallback, but it didn't help. I didn't try to run a sample app. I'll give it a try in the upcoming days and will get back to you.
Same issue for me, When click on 'continue' purchase button on the revenue cat paywall, the app crash. So it seems an internal paywall issue. Platform - Android 8 purchases_flutter: ^8.1.6 purchases_ui_flutter: ^8.1.6
id: 9412, tid: 9543, name: RenderThread >>> com.app <<<
2024-10-31 08:45:51.419 9647-9647 DEBUG pid-9647 A signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
2024-10-31 08:45:51.424 9647-9647 DEBUG pid-9647 A Abort message: ‘Trying to start new animators on 0x724d3acc00 (UnprojectedRipple) without an animation handle!’
2024-10-31 08:45:51.424 9647-9647 DEBUG pid-9647 A x0 0000000000000000 x1 0000000000002547 x2 0000000000000006 x3 0000000000000008
2024-10-31 08:45:51.424 9647-9647 DEBUG pid-9647 A x4 0000000000000000 x5 0000000000000000 x6 0000000000000000 x7 7f7f7f7f7f7f7f7f
2024-10-31 08:45:51.424 9647-9647 DEBUG pid-9647 A x8 0000000000000083 x9 78f9869b3dbf33ea x10 0000000000000000 x11 0000000000000001
2024-10-31 08:45:51.424 9647-9647 DEBUG pid-9647 A x12 ffffffffffffffff x13 ffffffffffffffff x14 ff00000000000000 x15 ffffffffffffffff
2024-10-31 08:45:51.424 9647-9647 DEBUG pid-9647 A x16 00000072759202f8 x17 00000072758c1408 x18 0000000000000009 x19 00000000000024c4
2024-10-31 08:45:51.424 9647-9647 DEBUG pid-9647 A x20 0000000000002547 x21 0000007240f7d0c0 x22 000000722e566ae0 x23 0000000000000001
2024-10-31 08:45:51.424 9647-9647 DEBUG pid-9647 A x24 000000723c3e2430 x25 000000723c3e2438 x26 000000724d3acc00 x27 0000007262329178
2024-10-31 08:45:51.424 9647-9647 DEBUG pid-9647 A x28 7fffffffffffffff x29 0000007240f7c350 x30 0000007275873bd4
2024-10-31 08:45:51.424 9647-9647 DEBUG pid-9647 A sp 0000007240f7c310 pc 00000072758c1410 pstate 0000000060000000
2024-10-31 08:45:51.463 9647-9647 DEBUG pid-9647 A
backtrace: