chat21-ionic
chat21-ionic copied to clipboard
Message Not Sent
I have integrated all the things correctly the registration and login work perfectly but message not sending to another user. in the database table can't be created conversation table because no messages sent. Finally, can you send the database rules for security?
Did you follow all the configuration steps? In particular did you install Chat21 Firebase Cloud Functions as described here : https://github.com/chat21/chat21-cloud-functions
When you install Chat21 Firebase Cloud Functions the database rules are automatically installed. You can find database rules here : https://github.com/chat21/chat21-cloud-functions/blob/master/database.rules.json
Hai, now I have followed the cloud functions setup. I have integrated the functions in firebase. I am Having Following error in firebase function Request InserAndSendMessage Function. while sent a message.
TypeError: Cannot read property 'message_id' of undefined
at exports.insertAndSendMessage.functions.database.ref.onCreate.event (/user_code/index.js:33:36)
at Object.
Please Help me @alessandro-giovinazzo
Can you run "firebase --version" and confirm your firebase installation version is 3.16.0 ?As described on the Chat21 Cloud Functions REAME at the moment we don't support 3.18.0 and upper versions
my firebase version is 3.16.0 but the message can not be sent. in my console "OK MSG SENT WITH SUCCESS TO SERVER" but message not sent in my firebase functions dashboard the request has been called. with the following error above I have mentioned previous comment
ReferenceError: message_id is not defined
at exports.insertAndSendMessage.functions.database.ref.onCreate.event (/user_code/index.js:32:59)
at Object.
Firebase Functions errors createConversation -> gmp_databaseref.create/apps/{app_id}/users/{sender_id}/messages/{recipient_id}/{message_id}
insertAndSendMessage -> gmp_databaseref.create/apps/{app_id}/users/{sender_id}/messages/{recipient_id}/{message_id}
please help me @andrealeo83
Please uninstall firebase-tools and reinstall it with:
npm uninstall -g firebase-tools npm install -g [email protected]
Please also check your package.json contains following lines: "firebase-admin": "~5.5.0", "firebase-functions": "^0.7.1",
After that run:
- cd <project_dir>
- rm -rf node_modules
- npm install
- firebase deploy
The problem is caused by the new firebase-functions v1.0 as described here: https://firebase.google.com/docs/functions/beta-v1-diff