cometchat / cometchat-uikit-react-native

Ready-to-use Chat UI Components for React Native
https://www.cometchat.com
Other
40 stars 24 forks source link

Cannot read property 'BaseInputElement' of undefined #63

Closed devflorez closed 3 months ago

devflorez commented 5 months ago

Hello CometChat Team,

I am encountering an issue with the integration of your SDK. As soon as I execute the following initialization code in my React Native app:

CometChatUIKit.init({ appId: cometChatConfig.cometChatAppId, authKey: cometChatConfig.cometChatAuthKey, region: cometChatConfig.cometChatRegion, }); I receive the following error: TypeError: Cannot read property 'BaseInputElement' of undefined, js engine:

I'm trying to integrate the CometChat SDK at the startup of my app, and I am using the following dependencies:

"expo": "~50.0.14" "react": "18.2.0" "react-native": "0.73.6" "@cometchat/calls-sdk-react-native": "^4.0.4" "@cometchat/chat-sdk-react-native": "^4.0.5" "@cometchat/chat-uikit-react-native": "^4.2.2" "@react-native-community/clipboard": "^1.5.1" "@react-native-community/datetimepicker": "^7.6.3" "@react-native-community/netinfo": "11.1.0" "react-native-background-timer": "^2.4.1" "react-native-callstats": "^3.73.22" I want to emphasize that I am not using Expo Go for this setup.

Could you please assist me in resolving this error?

Best regards.

cometchat-helpcenter-bot commented 5 months ago

Keagan (CometChat Team) replied:

Hello,

Thank you for reaching out and sharing your concern with us.

Could you please share the exact steps you take before encountering this error? We would also need the complete error message you receive on your end.

Could you confirm and let us know if you are integrating using expo as well ?

Regards

Keagan Ellis CometChat

devflorez commented 5 months ago

Hello Keagan,

Thank you for your assistance.

I am integrating with Expo, but not using Expo Go. Here's the error I encounter:

ERROR TypeError: Cannot read property 'BaseInputElement' of undefined, js engine: hermes ERROR Invariant Violation: "main" has not been registered. This can happen if:

This issue occurs when I initialize with the following code:

import { CometChatUIKit, CometChatContextProvider, CometChatTheme } from "@cometchat/chat-uikit-react-native";

useEffect(() => { CometChatUIKit.init({ appId: cometChatConfig.cometChatAppId, authKey: cometChatConfig.cometChatAuthKey, region: cometChatConfig.cometChatRegion, }) .then(() => { console.log("CometChat UIKit initialized successfully"); }) .catch(() => { console.log("CometChat UIKit initialization failed"); }); }, []);

Removing this initialization, my app runs perfectly. However, adding it triggers the error. It's worth mentioning that I haven't imported any other UI component into any screen; just importing and initializing causes the error.

Regards.

Simulator Screenshot - iPhone SE (3rd generation) - 2024-03-20 at 17 06 02

cometchat-helpcenter-bot commented 5 months ago

Keagan (CometChat Team) replied:

Hello,

Thank you for sharing this Information with us.

Please allow us some time to Investigate into this Issue and circle back with more Information at the earliest.

Regards

Keagan Ellis CometChat

cometchat-helpcenter-bot commented 5 months ago

Prathmesh Parteki (CometChat Team) replied:

Hi,

We were able to reproduce the error on our end. Thank you for reporting this issue. We have sent the information to our product engineering team for more investigation. We will be in touch when we have more information.

Regards,

Prathmesh Parteki CometChat

coyksdev commented 4 months ago

It looks like there is no InteractiveData files in the /lib. Which are being called by CallingExtentionDecorator.tsx

/src

/lib

cometchat-helpcenter-bot commented 4 months ago

Prathmesh Parteki (CometChat Team) replied:

Hi,

Thank you for your input. Our team is currently looking into this and working towards a solution. We'll keep you updated on the progress.

Regards,

Prathmesh Parteki CometChat

cometchat-helpcenter-bot commented 3 months ago

Afroz Khan (CometChat Team) replied:

Hi,

I hope this message finds you well.

I wanted to provide you with an urgent status update regarding the issue you reported. After careful consideration of its impact on your operations, we have escalated it to P0 priority within our team.

We are fully committed to resolving the issue with the utmost urgency.

To ensure a thorough investigation and a comprehensive solution, we kindly request your patience and understanding.

We understand the importance of this matter to you and your business, and we are dedicated to delivering a resolution that meets your expectations. We will keep you updated on our progress throughout the process.

If you have any questions, concerns, or additional information that you believe may assist us in resolving the issue more efficiently, please do not hesitate to reach out to us.

Thank you for your understanding and cooperation.

Regards,

Afroz Khan CometChat

allenhark commented 3 months ago

Hello, any updates on fixing this issue. Am getting the same problem, thus our development has come to a halt.

jeliel-augusto20 commented 3 months ago

Hello, we also having the same issue

coyksdev commented 3 months ago

Same here. We are still waiting.

cometchat-helpcenter-bot commented 3 months ago

Afroz Khan (CometChat Team) replied:

Hello,

I wanted to provide you with an update. After a couple of days of intensive debugging, we have identified the root cause of the issue with our React Native UI Kit not working with Expo. We have made the necessary changes in our UI Kit to address this issue, which is currently in the internal testing phase. Please rest assured that we will keep you informed about the status of the bug fix.

Thank you for your patience.

Best Regards.

Afroz Khan CometChat

cometchat-helpcenter-bot commented 3 months ago

Aditya (CometChat Team) replied:

Hi there,

We're pleased to inform you that we have released a fix for the issue with Expo compatibility in our React Native UI Kit. Please upgrade to version 4.3.9 and let us know if everything works as expected.

We appreciate your patience and look forward to your feedback.

Thanks

Aditya Gokula CometChat

coyksdev commented 3 months ago

it is working now. thank you so much!

cometchat-helpcenter-bot commented 3 months ago

Aditya (CometChat Team) replied:

Thank you for the update. I will go ahead and mark this issue as solved. Please feel free to reach out in case you have any questions.

Thanks

Aditya Gokula CometChat