react-native-crisp-chat-sdk icon indicating copy to clipboard operation
react-native-crisp-chat-sdk copied to clipboard

Error starting chat on Android

Open izaanjahangir opened this issue 4 months ago • 7 comments

Crisp is not working on Android. Getting the following error on Android

Image

Below is my code

const websiteId = Config.CRISP_WEBSITE_ID;

export const configureCrisp = () => {
  // You must set your website ID before calling <CrispChat />
  configure(websiteId);
  show();
};

The same code works on IOS but not on Android.

I have also checked the chatbot settings and it looks fine

Image
React Native Version = 0.80.1
Crisp SDK Version = ^0.19.0

izaanjahangir avatar Sep 02 '25 10:09 izaanjahangir

Hi @izaanjahangir,

As another of our customers, you seems to have enabled Total Privacy which is preventing our chatbox to load. You can disable the option to let the chatbox loading :)

Doc1faux avatar Sep 04 '25 15:09 Doc1faux

@Doc1faux Thank you, i will try tomorrow and close this issue if this works. Surprising it was working on IOS. The issue is only happening to Android.

In the meantime can you please let me know what this Total Privacy means, does it introduce any security issues if disabled? since we are also using the web SDK and i don't want to mess with the settings without knowing about them

Thank you for your help

izaanjahangir avatar Sep 04 '25 18:09 izaanjahangir

I'm experiencing the same error on iOS with crisp sdk 0.19.0

alitsvin avatar Sep 13 '25 13:09 alitsvin

Hi, could you please share the exact code you’re using?

In the meantime, here’s a minimal working example I just tested, which works fine on Android. It shows how to configure Crisp and open the chat from a simple button:

import Button from "@/components/Button";
import { useEffect } from "react";
import { StyleSheet, View } from "react-native";
import { configure, show } from "react-native-crisp-chat-sdk";
import { useSafeAreaInsets } from "react-native-safe-area-context";

export default function Index() {
  const insets = useSafeAreaInsets();

  useEffect(() => {
    configure("xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"); // replace with your Crisp Website ID
  }, []);

  return (
    <View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
      <View style={[styles.container, { paddingBottom: insets.bottom }]}>
        <Button onPress={() => show()} />
      </View>
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    position: "absolute",
    bottom: 30,
    right: 30,
  },
});

Can you try comparing this with your setup and let us know if you still see the error?

VirtuozTM avatar Sep 18 '25 14:09 VirtuozTM

For a while I also have been facing this issue, but in my case it seems to be affecting only android devices. I wasn't able to make it run in neither a physical or emulator device, but since we didn't received complains about it I assume only a small part of our users are actually facing this issue.

Recently I updated the crisp sdk versions to 0.20.0 and the chat in the emulator device started working again, but the physical one I have still doesn't work. Its an older android model from 2019, so this issue might be happening with a specific group of devices/older models.

FYI, I double check my chatbox security configs and the total privacy is not enabled.

dutrasr avatar Oct 13 '25 14:10 dutrasr

Since the React Native SDK is a bridge that delegates to the native Crisp SDKs (Android and iOS), issues like this usually come from the native layer rather than the JavaScript code. The fact that it only happens on certain physical Android devices suggests that it might be related to WebView compatibility or an edge case specific to the device model.

Could you please share the exact Android device model and OS version where this happens? We’ll try to reproduce the issue on a similar configuration to identify what’s going wrong.

Also, if you have access to the Android logs (via adb logcat) when the chat fails to load, feel free to paste a snippet here. That would help a lot in narrowing it down.

VirtuozTM avatar Oct 17 '25 13:10 VirtuozTM

@VirtuozTM, apologies for the delayed response.

Here is what I could get for you:

  • The physical device I'm using is a Xiaomi MI9T (OS version: MIUI Global 12.0.7 Stable)
  • Logs from a fresh install in a physical device. This one has a couple of errors opening the chat until the last attemp where the chat open successfully. Logcat 1 - fresh install
  • Logs from a app restart. Similar to the previous one, where the first attempt to open the chat fails but the second one works. Logcat 2 - after app restart

I'm not sure if this is enough or you need a more complete log without filtering the logcat output. Let me know if you need anything else.

dutrasr avatar Nov 04 '25 12:11 dutrasr