Can someone help me with my chat app?

I created a new React chat app following the instructions from this article. I used ChatGPT to help me rewrite the code in modern React syntax since the article was published in 2019 so the code was kind of outdated. The main login page is fine but it doesn’t seem to work when I try to login using one of the test usernames in my CometChat group. I’m also getting some errors in my console. Can anyone help me out?

Here’s the link to the source code: fantasy-thrill/new-chat-app (github.com)

Your id key in config.js doesn’t seem to match what you are using in chatdata.js

appId vs appID

Didn’t look at it more than that.

@lasjorg I went back and fixed that issue, but I’m still not able to login using one of my test usernames.

Try adding an await to the login method in the class and make the method async. Try using the callbacks onSuccess and onError to have some logging.

https://cometchat-docs.developerhub.io/docs/flutter-chat-sdk/authentication

Also, the login method takes a UID, not a name.

https://cometchat-docs.developerhub.io/docs/flutter-chat-sdk/users-user-management#user-class


I would need to know the lib/API, have an account and actually test the code. Which is just too much work honestly.

If you need more help we at least need the errors and you have to do some basic debugging yourself using logging.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.