1***@qq.com
1***@qq.com
  • 发布:2023-05-08 10:49
  • 更新:2024-03-31 01:25
  • 阅读:694

【报Bug】微信小程序获取手机号登录,提示“获取第三方账号失败”

分类:uni-app

产品分类: uniapp/小程序/微信

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: 版本 Windows 10 专业版 版本号 20H2 安装日期 ‎2022-‎07-‎11 操作系统版本 19042.630 体验 Windows Feature Experience Pack 120.2212.31.0

HBuilderX类型: 正式

HBuilderX版本号: 3.7.11

第三方开发者工具版本号: 版本(1.06.2301160 win32-x64)

基础库版本号: 2.31.1

项目创建方式: HBuilderX

操作步骤:

微信小程序获取手机号登录,提示“获取第三方账号失败”

1、从微信小程序后台获取了 APPID 和 APPSCRETE

2、在 uni modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-id/config.json 配置了

3、在manifest.json - 【微信小程序配置】填写了从微信小程序后台获取的 APPID

4、点击工具栏上的 【运行】-【运行到小程序模拟器】-【微信开发者工具】,启动微信开发者工具

5、清空【微信开发者工具】-【清除模拟器缓存】-【清除项目文件列表缓存】-【全部清除】

6、在模拟器中 点击 【微信授权手机号登录】,提示【获取第三方账号失败】

7、使用的是 【连接云端云函数】,查看unicloud 云端控制台 【云函数运行日志】提示如下:


请求入参: {
"args": {
"method": "loginByWeixinMobile",
"params": [
{
"phoneCode": "13324f02ea2c9add2a80defca9858cef752d1bad6241fd5cc954cbf9022fdc37"
}
],
"clientInfo": {
"PLATFORM": "mp-weixin",
"OS": "ios",
"APPID": "UNI0C00AF5",
"DEVICEID": "16835109199129025069",
"scene": 1001,
"windowWidth": 375,
"windowHeight": 730,
"deviceOrientation": "portrait",
"screenWidth": 375,
"screenHeight": 812,
"benchmarkLevel": 1,
"batteryLevel": 100,
"statusBarHeight": 44,
"bluetoothEnabled": true,
"locationEnabled": true,
"wifiEnabled": true,
"cameraAuthorized": true,
"locationAuthorized": true,
"microphoneAuthorized": true,
"notificationAuthorized": true,
"safeArea": {
"top": 44,
"left": 0,
"right": 375,
"bottom": 778,
"width": 375,
"height": 734
},
"enableDebug": false,
"devicePixelRatio": 3,
"mode": "default",
"deviceId": "16835109199129025069",
"safeAreaInsets": {
"top": 44,
"left": 0,
"right": 0,
"bottom": 34
},
"appId": "UNI0C00AF5",
"appName": "***",
"appVersion": "",
"appVersionCode": "100",
"appLanguage": "zh-Hans",
"uniCompileVersion": "3.7.11",
"uniRuntimeVersion": "3.7.11",
"uniPlatform": "mp-weixin",
"deviceBrand": "devtools",
"deviceModel": "iPhone X",
"deviceType": "phone",
"osName": "ios",
"osVersion": "10.0.1",
"hostVersion": "8.0.5",
"hostLanguage": "zh-CN",
"hostName": "WeChat",
"hostSDKVersion": "2.31.1",
"hostFontSizeSetting": 16,
"windowTop": 0,
"windowBottom": 0,
"locale": "zh-Hans",
"LOCALE": "zh-Hans"
}
},
"requestId": "ac1cc3051683513141025197714"
}
[uni-id-co/ac1cc3051683513141025197714/337ms/ERROR] invalid appid hint: [PEDcJHnre-DBg0eA] rid: 64585f35-0d74a02b-31cf918c
Error: invalid appid hint: [PEDcJHnre-DBg0eA] rid: 64585f35-0d74a02b-31cf918c
at generateApiResult (/tmp/function/lib/third-party/weixin/normalize.js:10:11)
at callWxOpenApi (/tmp/function/lib/third-party/weixin/normalize.js:73:5)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:189:7)
请求响应状态: success

预期结果:

微信小程序获取手机号登录,能成功登录

实际结果:

微信小程序获取手机号登录,提示“获取第三方账号失败”

bug描述:

BUG问题:微信小程序获取手机号登录,提示“获取第三方账号失败”

1、从微信小程序后台获取了 APPID 和 APPSCRETE

2、在 uni modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-id/config.json 配置了

3、在manifest.json - 【微信小程序配置】填写了从微信小程序后台获取的 APPID

4、点击工具栏上的 【运行】-【运行到小程序模拟器】-【微信开发者工具】,启动微信开发者工具

5、清空【微信开发者工具】-【清除模拟器缓存】-【清除项目文件列表缓存】-【全部清除】

6、在模拟器中 点击 【微信授权手机号登录】,提示【获取第三方账号失败】

7、使用的是 【连接云端云函数】,查看unicloud 云端控制台 【云函数运行日志】提示如下:


请求入参: {
"args": {
"method": "loginByWeixinMobile",
"params": [
{
"phoneCode": "13324f02ea2c9add2a80defca9858cef752d1bad6241fd5cc954cbf9022fdc37"
}
],
"clientInfo": {
"PLATFORM": "mp-weixin",
"OS": "ios",
"APPID": "UNI0C00AF5",
"DEVICEID": "16835109199129025069",
"scene": 1001,
"windowWidth": 375,
"windowHeight": 730,
"deviceOrientation": "portrait",
"screenWidth": 375,
"screenHeight": 812,
"benchmarkLevel": 1,
"batteryLevel": 100,
"statusBarHeight": 44,
"bluetoothEnabled": true,
"locationEnabled": true,
"wifiEnabled": true,
"cameraAuthorized": true,
"locationAuthorized": true,
"microphoneAuthorized": true,
"notificationAuthorized": true,
"safeArea": {
"top": 44,
"left": 0,
"right": 375,
"bottom": 778,
"width": 375,
"height": 734
},
"enableDebug": false,
"devicePixelRatio": 3,
"mode": "default",
"deviceId": "16835109199129025069",
"safeAreaInsets": {
"top": 44,
"left": 0,
"right": 0,
"bottom": 34
},
"appId": "UNI0C00AF5",
"appName": "***",
"appVersion": "",
"appVersionCode": "100",
"appLanguage": "zh-Hans",
"uniCompileVersion": "3.7.11",
"uniRuntimeVersion": "3.7.11",
"uniPlatform": "mp-weixin",
"deviceBrand": "devtools",
"deviceModel": "iPhone X",
"deviceType": "phone",
"osName": "ios",
"osVersion": "10.0.1",
"hostVersion": "8.0.5",
"hostLanguage": "zh-CN",
"hostName": "WeChat",
"hostSDKVersion": "2.31.1",
"hostFontSizeSetting": 16,
"windowTop": 0,
"windowBottom": 0,
"locale": "zh-Hans",
"LOCALE": "zh-Hans"
}
},
"requestId": "ac1cc3051683513141025197714"
}
[uni-id-co/ac1cc3051683513141025197714/337ms/ERROR] invalid appid hint: [PEDcJHnre-DBg0eA] rid: 64585f35-0d74a02b-31cf918c
Error: invalid appid hint: [PEDcJHnre-DBg0eA] rid: 64585f35-0d74a02b-31cf918c
at generateApiResult (/tmp/function/lib/third-party/weixin/normalize.js:10:11)
at callWxOpenApi (/tmp/function/lib/third-party/weixin/normalize.js:73:5)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:189:7)
请求响应状态: success

2023-05-08 10:49 负责人:无 分享
已邀请:
j***@jcxawlkjyxgs.wecom.work

j***@jcxawlkjyxgs.wecom.work

你的问题解决了没?

1***@qq.com

1***@qq.com

你的解决了没,卡了我好久

LAO_WUUAN

LAO_WUUAN

你的解决了没,卡了我好久

西蓝不是花

西蓝不是花 - 一个前端搬砖工

这多少年的毛病了,还没解决啊啊啊啊

1***@qq.com

1***@qq.com

解决了吗,24年了去用这个问题还在

要回复问题请先登录注册