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

Unable to send Push #21

Open
boardmain opened this issue Feb 19, 2024 · 1 comment
Open

Unable to send Push #21

boardmain opened this issue Feb 19, 2024 · 1 comment

Comments

@boardmain
Copy link

i have several problem
firebase push is working ( if i try to send from firebase )
and service account json is saved:

FCM auth not valid if i try to send push directly from to fcm notifications collection

{
  "code": "messaging/authentication-error",
  "message": "An error occurred when trying to authenticate to the FCM servers. Make sure the credential used to authenticate this SDK has the proper permissions. See https://firebase.google.com/docs/admin/setup for setup instructions. Raw server response: \"<HTML>\n<HEAD>\n<TITLE>PROJECT_NOT_PERMITTED</TITLE>\n</HEAD>\n<BODY BGCOLOR=\"#FFFFFF\" TEXT=\"#000000\">\n<H1>PROJECT_NOT_PERMITTED</H1>\n<H2>Error 401</H2>\n</BODY>\n</HTML>\n\". Status code: 401."
}

and i. try to send a push from the ui i have this error:

Error

Failed to send to FCM. {"message":"Request failed with status code 500","name":"AxiosError","config":{"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false},"transformRequest":[null],"transformResponse":[null],"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"env":{"FormData":null},"headers":{"Authorization":"Bearer #####","Accept":"application/json","Content-Type":"application/json"},"baseURL":"/strapi-plugin-fcm","url":"/fcm-notifications","method":"post","data":"{\"data\":[{\"title\":\"TEST\",\"body\":\"TEST TEST\",\"image\":\"\",\"payload\":\"\",\"targetType\":\"topics\",\"target\":\"push\"}]}"},"code":"ERR_BAD_RESPONSE","status":500}~~~
@AlameenAzad
Copy link

This should help you out: Link

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

2 participants