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

RevenueCatUI.Paywall windowRecomposer error #1162

Open
EmreKorpe opened this issue Jan 21, 2025 · 14 comments
Open

RevenueCatUI.Paywall windowRecomposer error #1162

EmreKorpe opened this issue Jan 21, 2025 · 14 comments
Labels
bug Something isn't working

Comments

@EmreKorpe
Copy link

EmreKorpe commented Jan 21, 2025

Hi, In my application, I was showing RevenueCatUI.Paywall in the react navigation page. But I keep getting this error on Android.
This my code;

import React from 'react';
import { SafeAreaView, StatusBar, TouchableOpacity, View } from "react-native";
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import RevenueCatUI from "react-native-purchases-ui";
import { customColors } from '../../utils/Constant';
import Fonts from '../../../assets/fonts';

const Paywall = ({ navigation }: any) => {

return (
    <View style={{
        flex: 1
    }}>
        <RevenueCatUI.Paywall options={{ fontFamily: Fonts.Family.SemiBold }} />
        <TouchableOpacity activeOpacity={0.9} style={{ width: 50, height: 50, position: 'absolute', right: 10, top: 40, alignItems: 'center', justifyContent: 'center' }}
            onPress={() => navigation.goBack()}>
            <Icon name='window-close' size={25} color={customColors.btnColor} />
        </TouchableOpacity>
    </View>
)

}
export default Paywall;

The Paywall page works erratically and loads once and then gives this error.
cannot locate windowRecomposer;View com.revenuecat.purchases.ui.revenuecatui.views.PaywallView

"react-native-purchases": "^8.4.0",
"react-native-purchases-ui": "^8.4.0",

I'm having the same problem in 8.5.

Image

@EmreKorpe EmreKorpe added the bug Something isn't working label Jan 21, 2025
@RCGitBot
Copy link
Contributor

👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

@Jethro87
Copy link

Hi @EmreKorpe, thanks for reporting this. Happy to help here. I'm not sure that's necessarily on RC's side. I found the StackOverflow answers below, which may be worth testing here:

https://stackoverflow.com/a/67143211
https://stackoverflow.com/a/69220783

(i.e., this may be a package version issue)

@AntoninSorrento
Copy link

Same problem, any progress?

@MelihOzyurt
Copy link

MelihOzyurt commented Jan 27, 2025

Same problem, any progress?

@EmreKorpe were you able to find a solution?

Edit
I was getting the error because there was no play store on the simulator device. As a precaution, I added a check as follows.
if ( offerings.current !== null && offerings.current.availablePackages.length !== 0 ) { setOfferingStatus(true); }

@EmreKorpe
Copy link
Author

EmreKorpe commented Jan 27, 2025

Same problem, any progress?

@AntoninSorrento

unfortunately there is no progress

@EmreKorpe
Copy link
Author

Same problem, any progress?

@EmreKorpe were you able to find a solution?

Edit I was getting the error because there was no play store on the simulator device. As a precaution, I added a check as follows. if ( offerings.current !== null && offerings.current.availablePackages.length !== 0 ) { setOfferingStatus(true); }

@MelihOzyurt The emulator I use has play store. I'm still having the same problem. Also, when I create the apk and try it on the physical device, this problem occurs again.

@EmreKorpe
Copy link
Author

Hi @EmreKorpe, thanks for reporting this. Happy to help here. I'm not sure that's necessarily on RC's side. I found the StackOverflow answers below, which may be worth testing here:

https://stackoverflow.com/a/67143211 https://stackoverflow.com/a/69220783

(i.e., this may be a package version issue)

@Jethro87
unfortunately the problem could not be solved. <RevenueCatUI.Paywall options={{ fontFamily: Fonts.Family.SemiBold }} /> I keep getting errors using this. The problem is now const result = await RevenueCatUI.presentPaywall({
displayCloseButton: true,
fontFamily: 'OpenSans-Medium'//Fonts.Family.Medium
}); I ignored it using . Honestly I don't want to use this.

@Finteria
Copy link

Finteria commented Feb 4, 2025

up

@colaquecez
Copy link

If I try to use options with font family I get an error, if I comment that I get:

Cannot locate windowRecomposer; View com.revenuecat.purchases.ui.revenuecatui.view...

 "react-native-purchases": "^8.5.2",
  "react-native-purchases-ui": "^8.5.2",

@EmreKorpe
Copy link
Author

Hi @colaquecez
I don't think it's related to font family. Because (this my other project)
"react-native": "0.75.4",
"react-native-purchases": "^8.4.0",
"react-native-purchases-ui": "^8.4.0",

I have no problems with these versions and it works smoothly.

@colaquecez
Copy link

But are you using the newArchEnabled? Because I only have a problem when using it enabled on android.

@EmreKorpe
Copy link
Author

In my project, the react-native version is 0.76.0 and newArchEnabled=true. I am getting error.

Other my project
"react-native": "0.75.4",
"react-native-purchases": "^8.4.0",
"react-native-purchases-ui": "^8.4.0",

Bu versiyonlarda hiçbir sorun yaşamıyorum ve sorunsuz çalışıyor.

@Nick-Patrick
Copy link

Is there any update on this please? I am getting the same error without newArch enabled.

@EmreKorpe
Copy link
Author

@Nick-Patrick unfortunately there is no solution yet. But I'm looking forward to it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants