Closed Hussain-Shahid closed 3 years ago
I'll take a look and publish a fix within 1-2 hours.
Please let me know if the issue goes away in version 1.8.1 thanks a bunch! 😄
if you dont mind can you tell me why this issue occur i tried to resolve this by myself but failed .
On 31 Mar 2021 9:31 p.m., "Adam La Morre" @.***> wrote:
Please let me know if the issue goes away in version 1.8.1 thanks a bunch! 😄
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/alamorre/react-chat-engine/issues/27#issuecomment-811215745, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALUWY52GIBHYYEBSNHFQAUDTGNE4JANCNFSM42E3J2VQ .
Basically there was a race condition with loading the connection object, so in 1.8.1 it waits until the connection object has fully loaded. Again, please let me know if there are other issues - happy to fix them 👍👍
same issue
On 31 Mar 2021 9:58 p.m., "Adam La Morre" @.***> wrote:
Basically there was a race condition with loading the connection object, so in 1.8.1 it waits until the connection object has fully loaded. Again, please let me know if there are other issues - happy to fix them 👍👍
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/alamorre/react-chat-engine/issues/27#issuecomment-811252283, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALUWY5ZFYFPRJFZZOXVTFY3TGNIELANCNFSM42E3J2VQ .
import React, { Component } from 'react';
import {ChatEngine} from 'react-chat-engine'
export default class DirectChatsPage extends Component {
render() {
return (
<ChatEngine
height="100vh"
projectID="1a346ac3-aa55-4f49-aab1-2ccfe04b0598"
userName="Hussainbutt"
userSecret="1234"
/>
);
}
}
This looks fine to me
use props username and enter the correct username then you will get the error
On 31 Mar 2021 10:36 p.m., "Adam La Morre" @.***> wrote:
[image: Screen Shot 2021-03-31 at 10 35 52 AM] https://user-images.githubusercontent.com/15023107/113186738-07ab2000-9226-11eb-918a-d3497c9e2813.png `import React, { Component } from 'react'; import {ChatEngine} from 'react-chat-engine'
export default class DirectChatsPage extends Component { render() { return (
); }
}`
This looks fine to me
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/alamorre/react-chat-engine/issues/27#issuecomment-811278430, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALUWY52CLFARRGVQLJAQOS3TGNMSJANCNFSM42E3J2VQ .
Lol I'm pushing out 1.8.2 which will handle Null and Undefined. Let me know if 1.8.2 works
1.8.X has a lot of powerful updates which will allow TONS of customizations. Please bare with me this will be worth it! 😁
still not fixed i update t0 1.8.2
I have tried version 1.8.2 and the userName error is gone, but now as i try to customize the chat feed with "renderChatFeed", i get this error
@ anybody who wants to try 1.8.3 please let me know if the issues are going away. I ran into some on my own and I think i got it...
yarn add react-chat-engine@1.8.3
It seems that this error message shown above only happens every once in a while for me.
On the other hand, I seem to have problems when entering new messages. on enter/submit (same handler), I get the TypeError above.
My console log seems to be showing it fine though..
My engine:
<ChatEngine
height="100vh"
userName="Tetris"
userSecret="XXXXXX"
projectID="3f78a1ff-b807-4a82-b8e1-aeab29b74a34"
renderChatFeed={(chatroomProps) => <ChatFeed {... chatroomProps} /> }
/>
My send message handler inside component (MessageForm):
const [value, setValue] = useState('');
const { creds, chatID } = props;
const handleSubmit = (event) => {
event.preventDefault();
const text = value.trim();
if (text.length > 0) {
sendMessage(creds, chatID, { text });
}
setValue('');
};
and my component:
<MessageForm {...props} chatID={activeChat} />
I hope this was enough info to find an answer! :) If not let me know, i am just a rookie!
It seems that this error message shown above only happens every once in a while for me.
EDIT: The above issue seems to have been fixed with the 1.8.3 version
On the other hand, I seem to have problems when entering new messages. on enter/submit (same handler), I get the TypeError above.
My console log seems to be showing it fine though..
My engine:
<ChatEngine height="100vh" userName="Tetris" userSecret="XXXXXX" projectID="3f78a1ff-b807-4a82-b8e1-aeab29b74a34" renderChatFeed={(chatroomProps) => <ChatFeed {... chatroomProps} /> } />
My send message handler inside component (MessageForm):
const [value, setValue] = useState(''); const { creds, chatID } = props; const handleSubmit = (event) => { event.preventDefault(); const text = value.trim(); if (text.length > 0) { sendMessage(creds, chatID, { text }); } setValue(''); };
and my component:
<MessageForm {...props} chatID={activeChat} />
I hope this was enough info to find an answer! :) If not let me know, i am just a rookie!
m facing the same issue
Closed due to inactivity
import {ChatEngine} from 'react-chat-engine' import './App.css';
function App() { return ( <ChatEngine height="100vh" projectID="1a346ac3-aa55-4f49-aab1-2ccfe04b0598" userName="Hussainbutt" userSecret="1234"
/> ); }
export default App;