We have been using Firebase Cloud Messaging for several years, using the REST interface from both lua and go plugins in Nakama. We are now working through accommodating their v1 implementation as the legacy http version will be discontinued as of next year. The new V1 system requires temporary Oauth tokens to authenticate against the FCM service, and the only way it seems to get such a key is to utilize a firebase library (no REST implementation seems to exist). We have successfully implemented the use of the Firebase go sdk for this purpose as a standalone client, but when trying to fold in to our existing nakama plugin code, we can’t resolve dependency conflicts between packages used for nakama and firebase. We are testing this using the latest nakama version 3.17 and firebase.google.com/go v3.13.0+incompatible
- the latest firebase go package. Has anyone been able to get this working? Is this even possible?
Hello @oscargoldman,
This is a Go dependency pinning issue.
I was able to load firebase.google.com/go/v4 v4.12.0
in a plugin using Nakama 3.17.0
by adding the following to the plugin:
go.mod
firebase.google.com/go/v4 v4.12.0
golang.org/x/oauth2 v0.10.0
google.golang.org/grpc v1.56.2
main.go
"firebase.google.com/go/v4"
_ "golang.org/x/oauth2"
_ "google.golang.org/grpc/attributes"
This may work for you, but you may need to adjust depending on what other dependencies your plugin is using.
Best
thanks a bunch for the tip, we’ll give it a shot.
That worked Simon, thanks a lot!
1 Like