hedera-hcs-chat-js
hedera-hcs-chat-js copied to clipboard
Messages sent don't show up
Description
I followed readme instructions and the demo didn't work. I can send messages in the bottom text field but nothing shows up in either client's incoming messages area. I want feedback about what's happening and help to debug.
First terminal:
init() using default .env config init() connecting to existing topic MirrorConsensusTopicQuery() 0.0.28583 TopicMessageSubmitTransaction() {"operatorAccount":"0.0.47502376","client":"0nBjh_DeGHjpoLVSAAAA","message":"Hola"} TopicMessageSubmitTransaction() {"operatorAccount":"0.0.47502376","client":"0nBjh_DeGHjpoLVSAAAA","message":"Hello?"}
Second terminal:
init() using default .env config init() connecting to existing topic MirrorConsensusTopicQuery() 0.0.28583 TopicMessageSubmitTransaction() {"operatorAccount":"0.0.47502376","client":"bbNExYrAOZzjmcuXAAAA","message":"xyz"}
Steps to reproduce
Follow instructions Run two instances in two term windows Try to send messages Receive nothing in either browser window
Additional context
No response
Hedera network
testnet
Version
7/4/22 master clone
Operating system
No response
hey @mowliv -- just set this up and it worked just fine. I was able to repro your issue only when not ever initiating a new topic.
ie the first time you run it, you do need to run "create new topic" rather than simply connecting to it. Could you try that?
Hi Helena - thanks for your message. Yes, if I create a new topic in one term and then reference that in the other terminal, it works! That's fun. But if I choose to connect to existing topic, and I hit enter to default to .env file (which shows TOPIC_ID=0.0.28583) then it fails. Perhaps instructions could be improved.