根据微信官方要求,调整了登录方式,使用getUserProfile获取用户信息,本地真机测试都没啥问题,但是上线后监控预警中收到很多报错,IOS和Android分别如下:
但是查看报错详情,微信版本和基础库版本都是满足官方的升级要求,微信(8.0.1、8.0.2、8.0.3基本也是最近的三个版本)小程序基础库(2.16.0最新版):
getUserProfile线上调用报错,微信版本和小程序基础库版本都很新,为何还是不支持?The getUserProfile online call reports an error. The WeChat version and the applet basic library version are very new. Why is it still not supported?
getUserProfile线上调用报错,微信版本和小程序基础库版本都很新,为何还是不支持?根据微信官方要求,调整了登录方式,使用getUserProfile获取用户信息,本地真机测试都没啥问题,但是上线后监控预警中收到很多报错,IOS和Android分别如下:
但是查看报错详情,微信版本和基础库版本都是满足官方的升级要求,微信(8.0.1、8.0.2、8.0.3基本也是最近的三个版本)小程序基础库(2.16.0最新版):
According to the official requirements of wechat, the login mode was adjusted, and getuserprofile was used to obtain user information. There was no problem in the local real machine test, but many errors were reported in the monitoring and early warning after going online. IOS and Android are as follows: However, looking at the details of the error report, both the wechat version and the basic library version meet the official upgrade requirements. Wechat (8.0.1, 8.0.2, 8.0.3 are basically the latest three versions) applet basic library (2.16.0, the latest version) is as follows:
回答:
做了新旧的支持判断,但是测试情况看不能并行,旧版的getUserInfo返回信息已经匿名化了:
官方有毛病啊,我也碰到这个问题,新api部分真机报错。还没到4.13号旧的api直接就数据脱敏了,也不唤醒授权弹框
按文档示例代码写判断可避免错误
目前IDE工具和体验版都已经改成新版本了,暂不支持并行
但是线上老方法还是可以用的
官方不是和你说了吗 正式版4月13日才会支持这个api
目前只有两个版本支持这个api 2.10.4以及2.16.0版本。开发版本体验版都会出现默认的那个头像昵称了。线上还没有。