appleboy / gorush

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

Getting error "project ID is required" #818

Open foobargeez opened 4 weeks ago

foobargeez commented 4 weeks ago

Hello @appleboy!

I am currently running gorush docker image and tried upgrading to v1.18.0 (and v1.18.8) but gorush is throwing "project ID is required to access Firebase Cloud Messaging client". Note that I already enabled Firebase Cloud Messaging API and configured GOOGLE_APPLICATION_CREDENTIALS to point to the json that I downloaded from Google.

Any ideas/pointers on what could be the issue would be appreciated.

Thanks!

sdogruyol commented 3 weeks ago

Getting the same error on v1.18.0 with a previously working config file. Any help is welcome 🙏

foobargeez commented 3 weeks ago

project_id is part of the file that GOOGLE_APPLICATION_CREDENTIALS points to but I don't see in the code it is being read or passed to go-fcm. I will try to dig the issue and open a PR in the next couple of days (hopefully).

appleboy commented 3 weeks ago

@foobargeez

Yes, the project_id is part of the GOOGLE_APPLICATION_CREDENTIALS content, so this error message is very strange to me. Thank you for your response.

sdogruyol commented 2 weeks ago

Ping 🏓 Any update on this?

appleboy commented 2 weeks ago

@sdogruyol I will try it this weekend.

foobargeez commented 1 week ago

Hello @appleboy, just checking if you got a chance to check this. Appreciate if you can release a fix. Thanks!

appleboy commented 23 hours ago

I try the latest code. See the following log output

$ ./release/gorush 
INFO[2024/10/27 - 22:31:06] Init App Status Engine as memory             
INFO[2024/10/27 - 22:31:06] gRPC server is disabled.                     
INFO[2024/10/27 - 22:31:06] HTTPD server is running on 8088 port.        
10:31PM INF Request body_size=37 ip=::1 latency=3.927 method=POST path=/api/push status=200 user_agent=curl/7.71.1
DEBU[2024/10/27 - 22:31:38] Start push notification for Android          
DEBU[2024/10/27 - 22:31:39] Android Success count: 1, Failure count: 0   
INFO[2024/10/27 - 22:31:39] | succeeded-push | android [**********_zfRyEIvs6gC:APA91bG6ihrTdEd77_dvLQWsVKi94zvg-SQDg_iizWUZ-MzzC_G1igZHVSI-ZMR8GIEmTAfJbcIhHLRpYk9QS3dS-62YlYf4J43NYRcR9Vpl6NVg3YQJGNZ4pV0PmqzBIu**********] Message of the notification

Can anybody provide your steps that I can reproduce the issue?