Open yongjiabidot opened 4 months ago
Hi @yongjiabidot does the error still occurs? since we release a lot of updates before we check this issue
still getting this issue
Hi @Pushkar952 I run a test now but I can't replicate what you encounter about the $socket connection. In my test I use next js + react js 18 version.
I tried 2 approaches below but still encountered the same issue. May I know how to resolve this issue?
1) use @tawk.to/tawk-messenger-react, const onLoad = () => { console.log('Here', tawkMessengerRef); tawkMessengerRef.current.setAttributes({ name: 'test', email: 'test@gmail.com', }); };
2) useeffect to check if authenticated useEffect(() => { if (isLoggedIn && store.user) { // const hash = hashInBase64(store.user.email, window.TAWK_APIKEY); if (window.Tawk_API) { window.Tawk_API.setAttributes( { name: store.user.loginName ?? '', email: store.user.email ?? '', // hash: hash, }, function (error) { if (error) { console.error('Tawk update user information error:', error); } }, ); } } }, [store.user]);