walterholohan / react-native-crisp-chat-sdk

React-Native bridge for Crisp Chat iOS and Android SDK's
MIT License
70 stars 26 forks source link

Chat not showing up on Android while working fine on iOS #125

Closed olaurendeau closed 2 months ago

olaurendeau commented 6 months ago

Hello,

Crisp Chat was working just fine on both android and iOS until recently (I can't precisely identify the moment where it stop working on Android, but my guess is that it relates to the upgrade of Expo I performed from 48 to 50 with many libraries upgrades). There is no errors, the chat is just not showing up.

Video of the issue in Simulators (same behaviour on real devices)

https://github.com/walterholohan/react-native-crisp-chat-sdk/assets/1516110/b3c4f700-88eb-4fc1-a33d-5665ca171406

My support page code :

...
import CrispChat, { show, setSessionString, setUserEmail, setUserNickname } from 'react-native-crisp-chat-sdk';
...
export default function Support({ navigation }: any) {

    const { t } = useTranslation();

    const { data, loading, error } = useQuery(CURRENT_USER, {
        onCompleted: (data) => {
            if (data.currentUser) {
                setUserEmail(data.currentUser.email);
                setUserNickname(data.currentUser.displayName);
                if (data.currentUser.currentGroupId) {
                    setSessionString('currentGroupId', data.currentUser.currentGroupId);
                }
                if (data.currentUser.currentGroupRole) {
                    setSessionString('currentGroupRole', data.currentUser.currentGroupRole);
                }
            }
        }
    });

    return (
        <View style={formStyles.container}>
            { !data ? (
                <ActivityIndicator animating={true} />
            ) : (
                <>
                    <Button mode="contained" onPress={() => navigation.goBack()}>{ t('support.back.button') }</Button>
                    <CrispChat />
                </>
            )}
        </View>
    )
}

My dependencies :

"dependencies": {
    "@apollo/client": "^3.6.5",
    "@expo/webpack-config": "~19.0.1",
    "@formatjs/intl-getcanonicallocales": "^2.3.0",
    "@formatjs/intl-listformat": "^7.5.5",
    "@formatjs/intl-locale": "^3.4.5",
    "@react-native-async-storage/async-storage": "1.21.0",
    "@react-native-community/masked-view": "^0.1.11",
    "@react-native-community/netinfo": "11.1.0",
    "@react-native-firebase/analytics": "^16.4.3",
    "@react-native-firebase/app": "^16.4.3",
    "@react-native-firebase/crashlytics": "^16.4.3",
    "@react-native-firebase/perf": "^16.4.3",
    "@react-native-google-signin/google-signin": "^10.1.1",
    "@react-native-picker/picker": "2.6.1",
    "@react-navigation/drawer": "^6.1.8",
    "@react-navigation/native": "^6.0.6",
    "@react-navigation/stack": "^6.0.11",
    "aws-sdk": "^2.1057.0",
    "expo": "^50.0.17",
    "expo-apple-authentication": "~6.3.0",
    "expo-blur": "~12.9.2",
    "expo-build-properties": "~0.11.1",
    "expo-dev-client": "~3.3.11",
    "expo-file-system": "~16.0.9",
    "expo-image-loader": "~4.6.0",
    "expo-image-picker": "~14.7.1",
    "expo-linking": "~6.2.2",
    "expo-localization": "~14.8.4",
    "expo-media-library": "~15.9.2",
    "expo-splash-screen": "~0.26.5",
    "expo-status-bar": "~1.11.1",
    "expo-store-review": "~6.8.3",
    "expo-updates": "~0.24.12",
    "graphql": "^16.0.1",
    "i18next": "^23.10.1",
    "imagekit-javascript": "^2.0.0",
    "intl": "^1.2.5",
    "joi": "^17.6.0",
    "lodash": "^4.17.21",
    "newrelic-react-native-agent": "^1.3.5",
    "react": "18.2.0",
    "react-async": "^10.0.1",
    "react-dom": "18.2.0",
    "react-i18next": "^14.1.0",
    "react-native": "0.73.6",
    "react-native-appsflyer": "^6.14.3",
    "react-native-crisp-chat-sdk": "^0.14.1",
    "react-native-dotenv": "^3.3.0",
    "react-native-expo-image-cache": "^4.1.0",
    "react-native-gesture-handler": "~2.14.0",
    "react-native-get-random-values": "~1.8.0",
    "react-native-image-zoom-viewer": "^3.0.1",
    "react-native-keyboard-aware-scroll-view": "^0.9.5",
    "react-native-multi-selectbox": "^1.5.0",
    "react-native-pager-view": "6.2.3",
    "react-native-paper": "^5.12.3",
    "react-native-paper-dates": "^0.22.3",
    "react-native-paper-tabs": "^0.10.4",
    "react-native-purchases": "^7.4.0",
    "react-native-reanimated": "~3.6.2",
    "react-native-safe-area-context": "4.8.2",
    "react-native-screens": "~3.29.0",
    "react-native-svg": "14.1.0",
    "react-native-url-polyfill": "^2.0.0",
    "react-native-vector-icons": "^9.1.0",
    "react-native-web": "~0.19.6",
    "react-native-webview": "13.6.4",
    "text-encoding-polyfill": "^0.6.7",
    "util": "^0.12.4",
    "uuid": "^8.3.2"
  },

Thank you.

jamiewilbraham commented 5 months ago

Having the same issue. Did you manage to resolve this?

rsereir commented 3 months ago

Hello all,

Same issue for me, someone have any idea ?

baptistejamin commented 2 months ago

Do you have any logs with ADB?

Side note: It could also be related to rate limiting. there a limit of sessions that can be created per period of 5 minutes

rsereir commented 2 months ago

@baptistejamin i just finish my investigations, i found a change on your documentation not applied in my crisp implementation:

+ implementation("im.crisp:crisp-sdk:2.0.2beta3")

It looks good with this change.

baptistejamin commented 2 months ago

Hello!

We just updated the SDK :)

olaurendeau commented 15 hours ago

Hi @baptistejamin, I've tried again with your new version but still got the same behavior, working fine on ios and nothing showing up on android.