getUserProfile线上调用报错,微信版本和小程序基础库版本都很新,为何还是不支持?

小程序 文章 2021-04-06 11:22 409 0 全屏看文

AI助手支持GPT4.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:

回答:

Made in.内江:

目前只有两个版本支持这个api 2.10.4以及2.16.0版本。开发版本体验版都会出现默认的那个头像昵称了。线上还没有。

杨钊:

做了新旧的支持判断,但是测试情况看不能并行,旧版的getUserInfo返回信息已经匿名化了:

于五五的五:

官方有毛病啊,我也碰到这个问题,新api部分真机报错。还没到4.13号旧的api直接就数据脱敏了,也不唤醒授权弹框

杨钊:对,数据脱敏了,使用旧API,返回信息已经匿名化了,对业务还是有影响啊,你这边有好的处理方法吗?
Brother斌🎈:

按文档示例代码写判断可避免错误

圣殿骑士:

目前IDE工具和体验版都已经改成新版本了,暂不支持并行

但是线上老方法还是可以用的

ᥴꪮꪮꪶ .:

官方不是和你说了吗 正式版4月13日才会支持这个api

شەرەر:已经支持这个 API 了,我们线上的小程序就用这个。不过还是需要处理兼容。

-EOF-

AI助手支持GPT4.0