Closed soldatov-ss closed 7 months ago
Kritika (CometChat Team) replied:
Hello,
Thank you for sharing the query. Happy to help.
Can you please elaborate on your query and elaborate what you are trying to achieve so we can give you an appropriate solution for the same.
Thanks & Regards Kritika Rastogi CometChat
Kritika (CometChat Team) replied:
Hello,
Thank you for sharing the query. Happy to help.
Can you please elaborate on your query and elaborate what you are trying to achieve so we can give you an appropriate solution for the same.
Thanks & Regards Kritika Rastogi CometChat
the problem is in this part code:
const appSetting = new CometChat.AppSettingsBuilder()
.subscribePresenceForAllUsers()
.setRegion(region)
.autoEstablishSocketConnection(true)
.overrideAdminHost(`${appID}.api-${region}.cc-cluster-2.io/v3`)
.overrideClientHost(`${appID}.apiclient-${region}.cc-cluster-2.io/v3`)
.build();
Because if I comment out init func and rebuild the APK file, the problem disappears.
Cannot read property shouldAutoEstablishSocketConnection of undefined, js engine: hermes It's ok when I just run the application, but when I build it to apk file for android and then try to open the app it does not work.
related stack overflow issue
Environment
"react-native": "0.72.8", "@cometchat/chat-sdk-react-native": "^4.0.5",
App.tsx: