Closed carter-0 closed 3 months ago
👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!
Hey @carter-0 !
Thanks for reaching out, this error usually happens when LocalViewModelStoreOwner.current is set to null. Can you please verify that this doesn't get set to null, it could be because of something like a rerender being triggered by your code. This could be the result of something in your switch case causing an issue or the state not being re-rendered properly.
Let me know if that helps!
@michaelAtRC Thanks for the response but I can't figure out how to check this. Is LocalViewModelStoreOwner not a Kotlin native component handled by react-native-purchases-ui? or is there a way to access this from react native?
Sorry for the ignorance, I'm pretty new to react native & app development😅
I'm experiencing this crash as well. Dismissing the paywall footer on Android causes the app to crash every time
For what it's worth, I'm not using any custom UI with my footer. I'm simply displaying it inside a BottomSheet. @carter-0 I was able to stop this crash from happening by commenting out this line:
This is fine for my use-case because my view isn't ever updating since I'm not using custom UI with my footer, which is the purpose of that call. The crash is 100% happening somewhere inside the onMeasure
call within PaywallFooterViewManager.kt
but I don't have time to track down the cause right now.
I think I'll just have to patch the library to comment that line to get my app working properly.
Thanks @Watersdr, I can confirm commenting that line out also fixes the crash for me, even with custom ui in the footer. I haven't noticed any other effects so far so I'm also going to patch the lib as a temporary fix.
Hey There,
Glad to see that this was fixed and things are now working as planned. On a side note, we have updated the SDK which has had more bug improvements since this, so I recommend updating to the latest version to ensure you have all the fixes that we have put out since this.
Hey There,
I switched to 7.28.1, the issue still persists, I had to change the paywallfootermanager.kt to fix the crash, is it fixed in version 8.0? Because it is a breaking change I don't want to switch for now.
The issue persist on 8.2.0 as well.
Still same +
Issue is still present in 8.2.1. Patching the PaywallFooterViewManager.kt (as described in https://github.com/RevenueCat/react-native-purchases/issues/994#issuecomment-2110607876) does fix the crash. So far haven't noticed any side-effects for my use case, however I am pretty sure that in some cases this is not a good way to fix this.
Hey There,
Glad to see that this was fixed and things are now working as planned. On a side note, we have updated the SDK which has had more bug improvements since this, so I recommend updating to the latest version to ensure you have all the fixes that we have put out since this.
Hey there the issue still persist, any official fix planning for this?
@michaelAtRC Hi Michael, As you can see to issue still persists and we are applying patching to the source code, any chance that it will be picked up and reopened?
Describe the bug
When unmounting the RevenueCatUI.PaywallFooterContainerView on Android devices,
java.lang.IllegalStateException: No ViewModelStoreOwner was provided via LocalViewModelStoreOwner
is thrown.export default function PaywallExample() { const [isOpen, setIsOpen] = useState(false);
}