Skip to content

Sending to android via GRPC not work after update  #789

Description

@vanohaker

App version: 1.18.3, 1.18.4

Deploy environment: kubernetes

Config:

  android:
    enabled: true
    key_path: "/vault/secrets/fcmkey.json"
    max_retry: 0
  api:
    config_uri: /api/config
    health_uri: /healthz
    metric_uri: /metrics
    push_uri: /api/push
    stat_app_uri: /api/stat/app
    stat_go_uri: /api/stat/go
    sys_stat_uri: /sys/stats
  core:
    enabled: true
    max_notification: 100
    mode: release
    pid:
      enabled: false
      override: true
      path: gorush.pid
    port: "8088"
    queue_num: 0
    shutdown_timeout: 30
    worker_num: 0
  grpc:
    enabled: true
    port: 9000
  huawei:
    enabled: true
    appsecret: "*****159e1a78c**********"
    appid: "*************"
    max_retry: 0
  ios:
    enabled: false
  log:
    access_level: debug
    access_log: stdout
    error_level: error
    error_log: debug
    format: string
    hide_messages: true
    hide_token: true
  queue:
    engine: redis
    redis:
      addr: gorush-dev-redis-master:6379
      group: gorush
      consumer: gorush
      stream_name: gorush
  stat:
    engine: memory

Postman request:

{
    "platform": 2,
    "tokens": ["********_GdIgJYxXOcBd:APA91bFfWcR_RGaHavl1fdgeLJcvFPsPLEbH8jdgoJERpiKKO6yEttX-RNf2TLyo99CqvWZUK43jyCbmqfrbZOBS*********"],
    "data": {
        "fields": {
            "title": {
                "string_value": "123"
            }
        }
    }
}

Postman responde:

{
    "success": true,
    "counts": 1
}

Log:

{"level":"debug","msg":"Start push notification for Android","time":"2024-06-21T10:39:40Z"}
{"level":"debug","msg":"Android Success count: 0, Failure count: 1","time":"2024-06-21T10:39:40Z"}

If i rollback to 1.18.2 it work fine.

Activity

  1. appleboy commented on Jun 21, 2024

    @appleboy
    Owner

    #785 Maybe this Pull Request caused the issue.

  2. appleboy commented on Jun 21, 2024

    @appleboy
    Owner

    I will take a look.

  3. appleboy commented on Jun 23, 2024

    @appleboy
    Owner

    @vanohaker any error message?

  4. vanohaker commented on Jun 24, 2024

    @vanohaker
    Author

    @vanohaker any error message?

    No. No stacktrace, no any other error, except this in log.

    Postman request:

    {
        "platform": 2,
        "tokens": ["*********_GdIgJYxXOcBd:APA91bFfWcR_RGaHavl1fdgeLJcvFPsPLEbH8jdgoJERpiKKO6yEttX-RNf2TLyo99CqvWZUK43jyCbmqfrbZOBS*************"],
        "data": {
            "fields": {
                "title":{
                    "string_value": "push title"
                }
            }
        }
    }

    LOG Version 1.18.2 all ok!

    [gorush-dev-79ffff5667-kvgwb gorush] 7:44AM INF Request body_size=42 ip=10.10.0.209 latency=0.091254 method=GET path=/ status=200 user_agent=kube-probe/1.27
    [gorush-dev-79ffff5667-kvgwb gorush] {"level":"debug","msg":"Start push notification for Android","time":"2024-06-24T07:44:47Z"}
    [gorush-dev-79ffff5667-kvgwb gorush] {"level":"debug","msg":"Android Success count: 1, Failure count: 0","time":"2024-06-24T07:44:48Z"}
    [gorush-dev-79ffff5667-kvgwb gorush] {"level":"info","msg":"| succeeded-push | android [***********_RGaHavl1fdgeLJcvFPsPLEbH8jdgoJERpiKKO6yEttX-RNf2TLyo99CqvWZUK43jyCbmqfrbZOBS_************] (message redacted)","time":"2024-06-24T07:44:48Z"}
    [gorush-dev-79ffff5667-kvgwb gorush] 7:44AM INF Request body_size=42 ip=10.10.0.209 latency=0.072783 method=GET path=/ status=200 user_agent=kube-probe/1.27
    [gorush-dev-79ffff5667-kvgwb gorush] 7:44AM INF Request body_size=42 ip=10.10.0.209 latency=0.094101 method=GET path=/ status=200 user_agent=kube-probe/1.27
    

    LOG Version: 1.18.3

    [gorush-dev-7b8998768b-pwfft gorush] 7:19AM INF Request body_size=42 ip=10.10.0.14 latency=0.04733 method=GET path=/ status=200 user_agent=kube-probe/1.27
    [gorush-dev-7b8998768b-pwfft gorush] 7:19AM INF Request body_size=42 ip=10.10.0.14 latency=0.054803 method=GET path=/ status=200 user_agent=kube-probe/1.27
    [gorush-dev-7b8998768b-pwfft gorush] {"level":"debug","msg":"Start push notification for Android","time":"2024-06-24T07:19:21Z"}
    [gorush-dev-7b8998768b-pwfft gorush] {"level":"debug","msg":"Android Success count: 0, Failure count: 1","time":"2024-06-24T07:19:21Z"}
    [gorush-dev-7b8998768b-pwfft gorush] 7:19AM INF Request body_size=42 ip=10.10.0.14 latency=0.039803 method=GET path=/ status=200 user_agent=kube-probe/1.27
    [gorush-dev-7b8998768b-pwfft gorush] 7:19AM INF Request body_size=42 ip=10.10.0.14 latency=0.043115 method=GET path=/ status=200 user_agent=kube-probe/1.27
    

    LOG Version 1.18.4

    [gorush-dev-6fbd9f75b9-hbgwq gorush] 7:33AM INF Request body_size=42 ip=10.10.0.212 latency=0.083062 method=GET path=/ status=200 user_agent=kube-probe/1.27
    [gorush-dev-6fbd9f75b9-hbgwq gorush] 7:34AM INF Request body_size=42 ip=10.10.0.212 latency=0.131581 method=GET path=/ status=200 user_agent=kube-probe/1.27
    [gorush-dev-6fbd9f75b9-hbgwq gorush] 7:34AM INF Request body_size=42 ip=10.10.0.212 latency=0.086911 method=GET path=/ status=200 user_agent=kube-probe/1.27
    [gorush-dev-6fbd9f75b9-hbgwq gorush] {"level":"debug","msg":"Start push notification for Android","time":"2024-06-24T07:34:15Z"}
    [gorush-dev-6fbd9f75b9-hbgwq gorush] {"level":"debug","msg":"Android Success count: 0, Failure count: 1","time":"2024-06-24T07:34:15Z"}
    [gorush-dev-6fbd9f75b9-hbgwq gorush] 7:34AM INF Request body_size=42 ip=10.10.0.212 latency=0.117207 method=GET path=/ status=200 user_agent=kube-probe/1.27
    [gorush-dev-6fbd9f75b9-hbgwq gorush] 7:34AM INF Request body_size=42 ip=10.10.0.212 latency=0.084416 method=GET path=/ status=200 user_agent=kube-probe/1.27
    
  5. appleboy commented on Jul 18, 2024

    @appleboy
    Owner

    @vanohaker I can't use the following request in Postman on v1.18.2 version.

    {
        "platform": 2,
        "tokens": ["*********_GdIgJYxXOcBd:APA91bFfWcR_RGaHavl1fdgeLJcvFPsPLEbH8jdgoJERpiKKO6yEttX-RNf2TLyo99CqvWZUK43jyCbmqfrbZOBS*************"],
        "data": {
            "fields": {
                "title":{
                    "string_value": "push title"
                }
            }
        }
    }
    image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions