Integrate Amity with Remix

I need to add a live chat to my web application, created with Remix. I’m trying to integrate it but I am not able to achieve it. I’ve seen few different ways to get started on the docs but it’s not working.

Depending on what I do I get different errors, but I think this may be the most relevant one: ReferenceError: WebSocket is not defined. I feel there is not enough documentation or examples to follow.

Does someone know how to get it to work?

Thanks in advance!

Hello, Let me pass this to our team and will stay in touch with you for updates.

1 Like

Hello @ldcc May I inquire about which SDK do you use and your current SDK version?

TypeScript SDK and ^6.14.0


From our examination, we recommend that you try the code below and check again if it works. If you still encounter issues, kindly provide us with a sample of your code for further inspection.

useEffect(() => {
    (async () => {
      const isConnected = await Client.login(
          userId: "Farrari_A_Remix",
          displayName: "Farrari_A_Remix",
  }, []);

  useEffect(() => {
    if (isLogin) {
      console.log("isLogin", isLogin);
  }, [isLogin]);

Best regard

Support Team