AmarnathCJD / gogram

Full-native implementation of MTProto protocol on Golang.
GNU General Public License v3.0
207 stars 41 forks source link

decoding unknown object #80

Closed wind-hx closed 7 months ago

wind-hx commented 8 months ago

Sorry, one more question. This session works fine but an error occurs while getting my own user.

    session := redis.RedisGet("telegram:client:" + phone)
    client, err := telegram.NewClient(telegram.ClientConfig{
        AppID:         int32(telegramConfig.AppId),
        AppHash:       telegramConfig.AppHash,
        AppVersion:    telegramConfig.AppVersion,
        DeviceModel:   telegramConfig.DeviceModel,
        SystemVersion: telegramConfig.SystemVersion,
        LogLevel:      telegram.LogDebug,
        LangCode:      "en",
        StringSession: session,
    })
    client.Connect()
    user, err := client.GetMe()
2024/03/13 22:29:21 gogram - cache - debug - initialized cache (gogram_KVwV.db) successfully
2024/03/13 22:29:21 gogram - mtproto - debug - importing Auth from stringSession...
2024/03/13 22:29:21 gogram - mtproto - info - Connecting to [91.108.56.151:443] - <TCPFull> ...
2024/03/13 22:29:21 gogram - mtproto - info - Connection to [91.108.56.151:443] - <TCPFull> established
2024/03/13 22:29:21 gogram - client - debug - sending initial invokeWithLayer request
2024/03/13 22:29:21 gogram - mtproto - debug - session configs changed, resending request
2024/03/13 22:29:25 gogram - mtproto - debug - RPC response: *telegram.Config
2024/03/13 22:29:25 gogram - mtproto - debug - RPC response: *telegram.UpdatesState
2024/03/13 22:29:25 gogram - mtproto - info - Connecting to [91.108.56.151:443] - <TCPFull> ...
2024/03/13 22:29:25 gogram - mtproto - info - Connection to [91.108.56.151:443] - <TCPFull> established
2024/03/13 22:29:25 gogram - client - debug - sending initial invokeWithLayer request
2024/03/13 22:29:25 gogram - mtproto - debug - RPC response: *telegram.Config
2024/03/13 22:29:25 gogram - mtproto - error - decoding unknown object: decoding predicted object: decode registered object *objects.RpcResult: decode field 'Obj': decode interface: decode registered object *telegram.UsersUserFull: decode field 'FullUser': decode field 'Settings': invalid crc code: 0x0, want: 0xa518110d
2024/03/13 22:29:25 gogram - mtproto - error - decoding unknown object: decoding predicted object: decode registered object *objects.RpcResult: decode field 'Obj': decode interface: decode registered object *telegram.UsersUserFull: decode field 'FullUser': decode field 'Settings': invalid crc code: 0x0, want: 0xa518110d
2024/03/13 22:29:26 gogram - mtproto - error - decoding unknown object: decoding predicted object: decode registered object *objects.RpcResult: decode field 'Obj': decode interface: decode registered object *telegram.UsersUserFull: decode field 'FullUser': decode field 'Settings': invalid crc code: 0x0, want: 0xa518110d
2024/03/13 22:29:26 gogram - mtproto - error - decoding unknown object: decoding predicted object: decode registered object *objects.RpcResult: decode field 'Obj': decode interface: decode registered object *telegram.UsersUserFull: decode field 'FullUser': decode field 'Settings': invalid crc code: 0x0, want: 0xa518110d
2024/03/13 22:29:26 gogram - mtproto - error - decoding unknown object: decoding predicted object: decode registered object *objects.RpcResult: decode field 'Obj': decode interface: decode registered object *telegram.UsersUserFull: decode field 'FullUser': decode field 'Settings': invalid crc code: 0x0, want: 0xa518110d
2024/03/13 22:29:26 gogram - mtproto - error - decoding unknown object: decoding predicted object: decode registered object *objects.RpcResult: decode field 'Obj': decode interface: decode registered object *telegram.UsersUserFull: decode field 'FullUser': decode field 'Settings': invalid crc code: 0x0, want: 0xa518110d
2024/03/13 22:29:26 gogram - mtproto - error - decoding unknown object: decoding predicted object: decode registered object *objects.RpcResult: decode field 'Obj': decode interface: decode registered object *telegram.UsersUserFull: decode field 'FullUser': decode field 'Settings': invalid crc code: 0x0, want: 0xa518110d
2024/03/13 22:29:28 gogram - mtproto - error - decoding unknown object: decoding predicted object: decode registered object *objects.RpcResult: decode field 'Obj': decode interface: decode registered object *telegram.UsersUserFull: decode field 'FullUser': decode field 'Settings': invalid crc code: 0x0, want: 0xa518110d
2024/03/13 22:29:28 gogram - mtproto - error - decoding unknown object: decoding predicted object: decode registered object *objects.RpcResult: decode field 'Obj': decode interface: decode registered object *telegram.UsersUserFull: decode field 'FullUser': decode field 'Settings': invalid crc code: 0x0, want: 0xa518110d
2024/03/13 22:29:28 gogram - mtproto - error - decoding unknown object: decoding predicted object: decode registered object *objects.RpcResult: decode field 'Obj': decode interface: decode registered object *telegram.UsersUserFull: decode field 'FullUser': decode field 'Settings': invalid crc code: 0x0, want: 0xa518110d
2024/03/13 22:29:28 gogram - mtproto - error - decoding unknown object: decoding predicted object: decode registered object *objects.RpcResult: decode field 'Obj': decode interface: decode registered object *telegram.UsersUserFull: decode field 'FullUser': decode field 'Settings': invalid crc code: 0x0, want: 0xa518110d
2024/03/13 22:29:29 gogram - mtproto - error - decoding unknown object: decoding predicted object: decode registered object *objects.RpcResult: decode field 'Obj': decode interface: decode registered object *telegram.UsersUserFull: decode field 'FullUser': decode field 'Settings': invalid crc code: 0x0, want: 0xa518110d
2024/03/13 22:29:35 gogram - mtproto - error - decoding unknown object: decoding predicted object: decode registered object *objects.RpcResult: decode field 'Obj': decode interface: decode registered object *telegram.UsersUserFull: decode field 'FullUser': decode field 'Settings': invalid crc code: 0x0, want: 0xa518110d
wind-hx commented 8 months ago

@AmarnathCJD

TAMILVIP007 commented 8 months ago

@wind-hx

wind-hx commented 8 months ago

@wind-hx

?

AmarnathCJD commented 8 months ago

Sorry, one more question. This session works fine but an error occurs while getting my own user.

  session := redis.RedisGet("telegram:client:" + phone)
  client, err := telegram.NewClient(telegram.ClientConfig{
      AppID:         int32(telegramConfig.AppId),
      AppHash:       telegramConfig.AppHash,
      AppVersion:    telegramConfig.AppVersion,
      DeviceModel:   telegramConfig.DeviceModel,
      SystemVersion: telegramConfig.SystemVersion,
      LogLevel:      telegram.LogDebug,
      LangCode:      "en",
      StringSession: session,
  })
  client.Connect()
  user, err := client.GetMe()
2024/03/13 22:29:21 gogram - cache - debug - initialized cache (gogram_KVwV.db) successfully
2024/03/13 22:29:21 gogram - mtproto - debug - importing Auth from stringSession...
2024/03/13 22:29:21 gogram - mtproto - info - Connecting to [91.108.56.151:443] - <TCPFull> ...
2024/03/13 22:29:21 gogram - mtproto - info - Connection to [91.108.56.151:443] - <TCPFull> established
2024/03/13 22:29:21 gogram - client - debug - sending initial invokeWithLayer request
2024/03/13 22:29:21 gogram - mtproto - debug - session configs changed, resending request
2024/03/13 22:29:25 gogram - mtproto - debug - RPC response: *telegram.Config
2024/03/13 22:29:25 gogram - mtproto - debug - RPC response: *telegram.UpdatesState
2024/03/13 22:29:25 gogram - mtproto - info - Connecting to [91.108.56.151:443] - <TCPFull> ...
2024/03/13 22:29:25 gogram - mtproto - info - Connection to [91.108.56.151:443] - <TCPFull> established
2024/03/13 22:29:25 gogram - client - debug - sending initial invokeWithLayer request
2024/03/13 22:29:25 gogram - mtproto - debug - RPC response: *telegram.Config
2024/03/13 22:29:25 gogram - mtproto - error - decoding unknown object: decoding predicted object: decode registered object *objects.RpcResult: decode field 'Obj': decode interface: decode registered object *telegram.UsersUserFull: decode field 'FullUser': decode field 'Settings': invalid crc code: 0x0, want: 0xa518110d
2024/03/13 22:29:25 gogram - mtproto - error - decoding unknown object: decoding predicted object: decode registered object *objects.RpcResult: decode field 'Obj': decode interface: decode registered object *telegram.UsersUserFull: decode field 'FullUser': decode field 'Settings': invalid crc code: 0x0, want: 0xa518110d
2024/03/13 22:29:26 gogram - mtproto - error - decoding unknown object: decoding predicted object: decode registered object *objects.RpcResult: decode field 'Obj': decode interface: decode registered object *telegram.UsersUserFull: decode field 'FullUser': decode field 'Settings': invalid crc code: 0x0, want: 0xa518110d
2024/03/13 22:29:26 gogram - mtproto - error - decoding unknown object: decoding predicted object: decode registered object *objects.RpcResult: decode field 'Obj': decode interface: decode registered object *telegram.UsersUserFull: decode field 'FullUser': decode field 'Settings': invalid crc code: 0x0, want: 0xa518110d
2024/03/13 22:29:26 gogram - mtproto - error - decoding unknown object: decoding predicted object: decode registered object *objects.RpcResult: decode field 'Obj': decode interface: decode registered object *telegram.UsersUserFull: decode field 'FullUser': decode field 'Settings': invalid crc code: 0x0, want: 0xa518110d
2024/03/13 22:29:26 gogram - mtproto - error - decoding unknown object: decoding predicted object: decode registered object *objects.RpcResult: decode field 'Obj': decode interface: decode registered object *telegram.UsersUserFull: decode field 'FullUser': decode field 'Settings': invalid crc code: 0x0, want: 0xa518110d
2024/03/13 22:29:26 gogram - mtproto - error - decoding unknown object: decoding predicted object: decode registered object *objects.RpcResult: decode field 'Obj': decode interface: decode registered object *telegram.UsersUserFull: decode field 'FullUser': decode field 'Settings': invalid crc code: 0x0, want: 0xa518110d
2024/03/13 22:29:28 gogram - mtproto - error - decoding unknown object: decoding predicted object: decode registered object *objects.RpcResult: decode field 'Obj': decode interface: decode registered object *telegram.UsersUserFull: decode field 'FullUser': decode field 'Settings': invalid crc code: 0x0, want: 0xa518110d
2024/03/13 22:29:28 gogram - mtproto - error - decoding unknown object: decoding predicted object: decode registered object *objects.RpcResult: decode field 'Obj': decode interface: decode registered object *telegram.UsersUserFull: decode field 'FullUser': decode field 'Settings': invalid crc code: 0x0, want: 0xa518110d
2024/03/13 22:29:28 gogram - mtproto - error - decoding unknown object: decoding predicted object: decode registered object *objects.RpcResult: decode field 'Obj': decode interface: decode registered object *telegram.UsersUserFull: decode field 'FullUser': decode field 'Settings': invalid crc code: 0x0, want: 0xa518110d
2024/03/13 22:29:28 gogram - mtproto - error - decoding unknown object: decoding predicted object: decode registered object *objects.RpcResult: decode field 'Obj': decode interface: decode registered object *telegram.UsersUserFull: decode field 'FullUser': decode field 'Settings': invalid crc code: 0x0, want: 0xa518110d
2024/03/13 22:29:29 gogram - mtproto - error - decoding unknown object: decoding predicted object: decode registered object *objects.RpcResult: decode field 'Obj': decode interface: decode registered object *telegram.UsersUserFull: decode field 'FullUser': decode field 'Settings': invalid crc code: 0x0, want: 0xa518110d
2024/03/13 22:29:35 gogram - mtproto - error - decoding unknown object: decoding predicted object: decode registered object *objects.RpcResult: decode field 'Obj': decode interface: decode registered object *telegram.UsersUserFull: decode field 'FullUser': decode field 'Settings': invalid crc code: 0x0, want: 0xa518110d

Ahh I'll look into it

AmarnathCJD commented 8 months ago

@wind-hx

Nibba Fu

AmarnathCJD commented 8 months ago

78