Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC]: FCM using OpenIM server with Docker #194

Open
buiphukhuyen opened this issue Oct 18, 2024 · 14 comments
Open

[DOC]: FCM using OpenIM server with Docker #194

buiphukhuyen opened this issue Oct 18, 2024 · 14 comments

Comments

@buiphukhuyen
Copy link

Hi team,

I’m using OpenIM server with Docker and would like to integrate Firebase Cloud Messaging (FCM) for push notifications. I’ve mapped the Firebase JSON file into the container, but I’m unsure of the next steps. Could you guide me on how to configure FCM within the OpenIM server?

Thank you!

@OpenIM-Robot
Copy link

Hello! Thank you for filing an issue.

If this is a bug report, please include relevant logs to help us debug the problem.

Join slack 🤖 to connect and communicate with our developers.

@skiffer-git
Copy link
Member

#136

@skiffer-git
Copy link
Member

Here's how you can set the relevant environment variables based on the file referenced from the link:

First, locate the corresponding configuration items in the file.
Then, follow the provided rules to set the environment variables appropriately.

@buiphukhuyen
Copy link
Author

Thank you!

Can you give me the document on how to test FCM function? Because I don't know where it is to test!

@buiphukhuyen

This comment was marked as resolved.

@buiphukhuyen
Copy link
Author

I have configured on flutter sdk to update FCM token to Server. And the server has recorded this Token (in redis). However, when I test, I don't see any notification and I don't know how to see if it is successful or not!
Screenshot 2024-10-18 at 17 19 34

@skiffer-git
Copy link
Member

In Docker, you should use the authURL field.

@buiphukhuyen

This comment was marked as resolved.

@skiffer-git
Copy link
Member

Instead of using the filePath field, you should use the authURL field.

@OpenIM-Robot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


openim-server: (docker-compose.yaml)

  • IMENV_OPENIM_PUSH_ENABLE=FCM
  • IMENV_OPENIM_PUSH_FCM_AUTHURL=${FCM_AUTHURL}

.env
FCM_AUTHURL="http://157.20.82.3/config/it-hutech-firebase-adminsdk-gvile-ee4bba1b64.json"

It still not working!

@skiffer-git
Copy link
Member

IMENV_OPENIM_PUSH_ENABLE=fcm

@buiphukhuyen
Copy link
Author

Thank you. When I change the value back to "fcm" and run docker again, sending offline message fails:

[push/push_handler.go:178] offlinePushMsg failed {"platform": "Web", "connID": "10b7c6222bed325b18d57e7996bd275c", "operationID": "3bba685b-e953-49de-88ba-4df28e96bc6f", "opUserID": "1113466438", "offlinePushUserID": ["2604"], "msg": "sendID:\"1113466438\" recvID:\"2604\" clientMsgID:\"a31286fd8e6d78c24c35e00301544824\" serverMsgID:\"ae85d38e13e17e1f99526e3e7f9b39cd\" senderPlatformID:5 senderNickname:\"khuyenpb\" sessionType:1 msgFrom:100 contentType:101 content:\"{\\\"content\\\":\\\"FA\\\"}\" seq:203 sendTime:1729753131857 createTime:1729753117294 status:1 offlinePushInfo:{title:\"You have a new message.\" iOSPushSound:\"+1\" iOSBadgeCount:true} attachedInfo:\"null\"", "error": "1 message send failed;send err:;message err:"}

I don't know how to configure or fix the next error!

@buiphukhuyen
Copy link
Author

buiphukhuyen commented Oct 24, 2024

I have referred to an article that is similar to mine but I don't know how this person fixed it!

openimsdk/open-im-server#2572

@buiphukhuyen
Copy link
Author

Can anyone help me with this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants