Writing error in log, but push send successful
heggi opened this issue · comments
Migrating to 1.18.2 version from 1.16
Send push as usually (via http), push received by device, but in log I got error with empty message error
1:46PM INF Request body_size=37 ip=172.20.0.4 latency=0.49496 method=POST path=/api/push status=200 user_agent=python-httpx/0.27.0
{"level":"debug","msg":"Start push notification for Android","time":"2024-06-14T13:46:20Z"}
{"level":"debug","msg":"Send Topic Message: xxxxxxxxx","time":"2024-06-14T13:46:21Z"}
{"level":"error","msg":"| failed-push | android [xxxxxxx] | aaaaaaaaaa | Error Message: ","time":"2024-06-14T13:46:21Z"}
{"notifications": [{"tokens": ["XXX_TOKEN_XXX"], "platform": 2, "title": "Title of message", "topic": "xxxxxxx", "message": "aaaaaaaaaa"}]}
@heggi You see the failed-push
form log and get the notification in the Android app. Right?
@appleboy
Yes, I get notification in Android app and see failed-push
in log
I think problem that tokens
and topic
exists at once in request, but IOS required topic
setup.
I'm remove topic
from request and no more errors in log.
I'm think gorush try send message to device by token and to topic at once. Sending to device was complete successful, but sending to topic return error (because topic not exists).
@heggi Yes, I encounter the same problem. I still think about how to handle both of topic and the token.