Hi Ji,
I was able to reproduce your error. Make sure the user role that you are allowing to send message has the "ChatUser" module role from the Chatter module.
Once I added that module role the error went away and I was able to send messages to other users that were logged in with this module role.
To test I opened the application in two incognito browser windows. I logged in with two different users that had user roles with the ChatUser module role, and I was able to send messages between the two users.
Also make sure your project security level is set to at least demo Prototype/demo.
Hope this helps!