appleboy / gorush

A push notification server written in Go (Golang).
MIT License
7.84k stars 829 forks source link

Addressing FCM Credentials for the gorush v.1.18.1 #771

Closed obuzyig closed 2 weeks ago

obuzyig commented 2 weeks ago

Hello everyone,

While I am trying to start the new version of the application, I cannot provide the authorization between the application and the Firebase. I uploaded json files to the same main directory of the project.

Is there anyone experienced the same situation or is there any suggestion that I can apply? (About the directory, about the json data, etc.)

Kind regards.

appleboy commented 2 weeks ago

How do you run the gorush application? k8s or single binary? Any output log?

obuzyig commented 2 weeks ago

How do you run the gorush application? k8s or single binary? Any output log?

It does not work on Kubernetes.

logx.LogError.Error("It will go into the WithCredentialsFile Method : "+cfg.Android.KeyPath)
    if cfg.Android.KeyPath != "" && fileExists(cfg.Android.KeyPath) {
        logx.LogError.Error("It is in the WithCredentialsFile Method " + cfg.Android.KeyPath)
        opts = append(opts, fcm.WithCredentialsFile(cfg.Android.KeyPath))
    }
    logx.LogError.Error("It will go into the cfg.Android.Credential. : "+cfg.Android.Credential)
    if cfg.Android.Credential != "" {
        logx.LogError.Error("It is in the cfg.Android.Credential " + cfg.Android.Credential)
        opts = append(opts, fcm.WithCredentialsJSON([]byte(cfg.Android.Credential)))
    }
obuzyig commented 2 weeks ago

Hi, I accomplished to run it with the correction of the CI platform naming rules. Thank you.

appleboy commented 2 weeks ago

@obuzyig Has your problem been resolved?

obuzyig commented 2 weeks ago

@obuzyig Has your problem been resolved?

Yes, it seems like problem was about the platform which the app is integrated. It is still not possible to address the file path right now, however, it's possible to use the other option. Thank you for your kindness and interest.