下载 App
求助 求助重新加载后 clientCloud:Get 持续超时,如何处理?
10/1828 浏览综合
大家好,想请教一个概率出现的云存档读取问题。
游戏使用 TapTap Maker、UrhoX Lua,通过 clientCloud:Get 读取云存档。正常时可以进入游戏;多次重新加载后,有时会一直停在“正在加载游戏”,无法开始。再次手动重载有时恢复,有时仍会卡住。已有玩家也遇到同类情况,复现概率尚未统计。
环境和复现路径
- Android TapTap 测试环境,已采集一台小米设备的真实日志,记录的 runtime_version=2.16.35。
- Maker 网页预览也观察到同类持续云读超时;不同现场分别记录,未认定一定同源。
- 一条容易触发的用户路径:正常进入游戏 → 第一局结算 → 点击“升级技能”回大厅 → 重新加载 → 重复几次后概率卡在加载。
- 用户明确当时没有同时打开另一端游戏。上述操作顺序不等于已证明技能升级是原因。
- Android 系统版本、TapTap 客户端版本、当时 Wi-Fi/移动网络类型尚未采集。
真实手机日志观察
本地读取已结束,诊断记录 local_read_end outcome=1,随后进入首次云端确认。4 次独立 Get 调用均正常返回到 Lua,然后分别收到 SDK 的 timeout 回调,没有观察到成功回调。
以第一个 Get 发起时刻为 T+0,时间来自同一段真实手机日志,仅将绝对时间转换为相对时间:
| 尝试 | 调用 Get | SDK timeout | 单次等待 |
|---|---|---|---|
| 1 | T+0.000 秒 | T+15.007 秒 | 约15秒 |
| 2 | T+18.063 秒 | T+33.070 秒 | 约15秒 |
| 3 | T+36.123 秒 | T+51.131 秒 | 约15秒 |
| 4 | T+55.571 秒 | T+70.574 秒 | 约15秒 |
这段手机证据覆盖约70.6秒;另有用户等待超过90秒的反馈。网页另一次现场在约9分钟观察窗口内记录18次 SDK timeout、未见成功,不能把几个现场的时长混为一谈。
等待期间诊断状态:
textready=0 initial=1 root=unsynced cloud=1 account_ready=1 migration=0 transition=0 chapter=0 save=0 owner=0 io=0 sdk_code=-
cloud=1 / account_ready=1 只说明 Lua 侧对象和账号标识可用,不代表服务端鉴权一定成功。日志中的 dispatch_return 也只代表 Lua 调用正常返回,不能证明 HTTP 已发出或服务端已收到。sdk_code=- 表示没有取得数值型平台错误码。
已排查与目前处理
- 本次手机日志没有显示保存、迁移或章节任务卡住;尚未收到云读成功,因此没有证据把这次问题归因于云档反序列化失败。
- 已将 Lua 侧只读等待预算逐步延长至60秒,并处理重试、关闭和迟到回调;但这不能解决 SDK 本身一直返回 timeout 的原因。
- 已增加每次独立请求、SDK回调及启动生命周期日志。timeout 与 Lua 自己的看门狗分开记录;上述手机4次为 SDK timeout。
- 新候选已加入有效本地档兜底;无本地档的新玩家可经两次明确确认创建新档。云端未知时不自动上传覆盖,不把超时当云端无档。这些属于避免玩家一直被阻挡的措施,不代表云链路根因已经修复。
- 本地替身测试和原生流程测试通过,但它们无法证明真实平台网络已恢复。新候选在真实弱网下的效果仍待验证。
想请教
- 有没有遇到重新加载后 clientCloud:Get 连续约15秒超时,手动再重载偶尔恢复的情况?
- 这个 timeout 回调通常来自哪一层?如何区分网络/鉴权、服务端无响应和 SDK 到 Lua 的回调问题?
- 重新加载时,SDK 的旧请求、连接和登录会话应该怎样清理?是否有官方支持的取消请求、重建连接或重新鉴权接口及调用时机?目前没有擅自加入自动重启。
- Lua 侧调用返回、超时却没有数值错误码时,如何获取 HTTP 状态、request ID 或平台服务端链路?反馈记录里的 version_id=0,也没有拿到可用游戏局ID,官方建议怎样关联实际运行包与请求?
- 是否有推荐的最小复现工程或排查日志开关?
下面是脱敏诊断日志:
Sanitized real Android trace. T+0 = first cloud Get request.
Absolute time and identifying fields removed; selected field values preserved.
request = Lua Get invocation; dispatch_return does not prove network transmission.
sdk_timeout = SDK timeout callback; sdk_code=- means no numeric code was captured.
T-2.936s event=module_enter platform=Android outcome=- ready=0 closed=0 root=none initial=0 exclusive=0 read=0 upload=0 migration=0 transition=0 chapter=0 save=0 owner=0 io=0 cloud=1 account_ready=1
T-1.336s event=start platform=Android outcome=- ready=0 closed=0 root=none initial=0 exclusive=0 read=0 upload=0 migration=0 transition=0 chapter=0 save=0 owner=0 io=0 cloud=1 account_ready=1
T-0.205s event=load_begin platform=Android outcome=- ready=0 closed=0 root=none initial=0 exclusive=0 read=0 upload=0 migration=0 transition=0 chapter=0 save=0 owner=0 io=0 cloud=1 account_ready=1
T-0.139s event=local_load_begin platform=Android outcome=- ready=0 closed=0 root=none initial=0 exclusive=0 read=0 upload=0 migration=0 transition=0 chapter=0 save=0 owner=0 io=0 cloud=1 account_ready=1
T-0.015s event=local_read_end platform=Android outcome=1 ready=0 closed=0 root=acknowledged initial=0 exclusive=1 read=0 upload=0 migration=0 transition=0 chapter=0 save=0 owner=0 io=0 cloud=1 account_ready=1
T+0.000s event=local_load_end platform=Android outcome=1 ready=0 closed=0 root=unsynced initial=1 exclusive=1 read=0 upload=0 migration=0 transition=0 chapter=0 save=0 owner=0 io=0 cloud=1 account_ready=1
T+0.000s req=1 event=request channel=root wall_s=0 update_s=0.0 sdk_code=- cloud=1 account_ready=1
T+0.000s req=1 event=dispatch_return channel=root wall_s=0 update_s=0.0 sdk_code=- return_kind=nil return_false=0 cloud=1 account_ready=1
T+0.000s event=load_return platform=Android outcome=- ready=0 closed=0 root=unsynced initial=1 exclusive=1 read=1 upload=0 migration=0 transition=0 chapter=0 save=0 owner=0 io=0 cloud=1 account_ready=1
T+1.476s event=loading_wait platform=Android outcome=- ready=0 closed=0 root=unsynced initial=1 exclusive=1 read=1 upload=0 migration=0 transition=0 chapter=0 save=0 owner=0 io=0 cloud=1 account_ready=1
T+15.007s req=1 event=sdk_timeout channel=root wall_s=15 update_s=15.0 sdk_code=- cloud=1 account_ready=1
T+15.404s event=loading_wait platform=Android outcome=- ready=0 closed=0 root=unsynced initial=1 exclusive=1 read=0 upload=0 migration=0 transition=0 chapter=0 save=0 owner=0 io=0 cloud=1 account_ready=1
T+18.063s req=2 event=request channel=root wall_s=0 update_s=0.0 sdk_code=- cloud=1 account_ready=1
T+18.064s req=2 event=dispatch_return channel=root wall_s=0 update_s=0.0 sdk_code=- return_kind=nil return_false=0 cloud=1 account_ready=1
T+20.397s event=loading_wait platform=Android outcome=- ready=0 closed=0 root=unsynced initial=1 exclusive=1 read=1 upload=0 migration=0 transition=0 chapter=0 save=0 owner=0 io=0 cloud=1 account_ready=1
T+33.070s req=2 event=sdk_timeout channel=root wall_s=15 update_s=15.0 sdk_code=- cloud=1 account_ready=1
T+33.384s event=loading_wait platform=Android outcome=- ready=0 closed=0 root=unsynced initial=1 exclusive=1 read=0 upload=0 migration=0 transition=0 chapter=0 save=0 owner=0 io=0 cloud=1 account_ready=1
T+34.688s event=focus_gain platform=Android outcome=- ready=0 closed=0 root=unsynced initial=1 exclusive=1 read=0 upload=0 migration=0 transition=0 chapter=0 save=0 owner=0 io=0 cloud=1 account_ready=1
T+36.123s req=3 event=request channel=root wall_s=0 update_s=0.0 sdk_code=- cloud=1 account_ready=1
T+36.124s req=3 event=dispatch_return channel=root wall_s=0 update_s=0.0 sdk_code=- return_kind=nil return_false=0 cloud=1 account_ready=1
T+38.424s event=loading_wait platform=Android outcome=- ready=0 closed=0 root=unsynced initial=1 exclusive=1 read=1 upload=0 migration=0 transition=0 chapter=0 save=0 owner=0 io=0 cloud=1 account_ready=1
T+51.131s req=3 event=sdk_timeout channel=root wall_s=15 update_s=13.8 sdk_code=- cloud=1 account_ready=1
T+51.404s event=loading_wait platform=Android outcome=- ready=0 closed=0 root=unsynced initial=1 exclusive=1 read=0 upload=0 migration=0 transition=0 chapter=0 save=0 owner=0 io=0 cloud=1 account_ready=1
T+55.571s req=4 event=request channel=root wall_s=0 update_s=0.0 sdk_code=- cloud=1 account_ready=1
T+55.571s req=4 event=dispatch_return channel=root wall_s=0 update_s=0.0 sdk_code=- return_kind=nil return_false=0 cloud=1 account_ready=1
T+56.453s event=loading_wait platform=Android outcome=- ready=0 closed=0 root=unsynced initial=1 exclusive=1 read=1 upload=0 migration=0 transition=0 chapter=0 save=0 owner=0 io=0 cloud=1 account_ready=1
T+57.073s event=focus_gain platform=Android outcome=- ready=0 closed=0 root=unsynced initial=1 exclusive=1 read=1 upload=0 migration=0 transition=0 chapter=0 save=0 owner=0 io=0 cloud=1 account_ready=1
T+70.574s req=4 event=sdk_timeout channel=root wall_s=15 update_s=14.9 sdk_code=- cloud=1 account_ready=1
T+71.409s event=loading_wait platform=Android outcome=- ready=0 closed=0 root=unsynced initial=1 exclusive=1 read=0 upload=0 migration=0 transition=0 chapter=0 save=0 owner=0 io=0 cloud=1 account_ready=1











