收藏
回答

getUserInfo的error,参数错误?

实现微信账号一键登录功能,看到日志里面,有少量getUserInfo的error,看上去是getOpenData的参数错误。

真机模拟的时候显示空白,暂时没有捕捉到,特发帖求助。

问题现象大概描述如下:

1、手机号A真机登录时,会报这个error

2、将A的微信号添加到开发账号组里,模拟器登录,正常

3、再用真机登录,正常


{"msg":"ERROR RequestId:59db81e4-bcfd-11ea-97d0-5254000f125d Result:{\"errCode\":1,\"errMsg\":\"user code exception caught\",\"stackTrace\":\"Error: errCode: -1 unknown error | errMsg: getOpenData:fail TypeError [ERR_INVALID_ARG_TYPE]: The \\\"string\\\" argument must be one of type string, Buffer, or ArrayBuffer. Received type undefined; at getOpenData api; \\n    at returnAsCloudSDKError (/var/user/node_modules/wx-server-sdk/index.js:6032:16)\\n    at Object.returnAsFinalCloudSDKError (/var/user/node_modules/wx-server-sdk/index.js:6046:15)\\n    at Promise (/var/user/node_modules/wx-server-sdk/index.js:1929:39)\\n    at new Promise (\\u003canonymous\\u003e)\\n    at Cloud.getOpenData (/var/user/node_modules/wx-server-sdk/index.js:1865:16)\\n    at Object.args [as getOpenData] (/var/user/node_modules/wx-server-sdk/index.js:120:29)\\n    at getCellPhone (/var/user/index.js:27:32)\\n    at Runtime.exports.main [as handler] (/var/user/index.js:14:14)\\n    at Runtime.handleOnce (/var/runtime/node10/Runtime.engine.js:193:23)\\n    at Timeout.setTimeout [as _onTimeout] (/var/runtime/node10/Runtime.engine.js:43:12)\"}","level":"error","src":"app","requestId":"59db81e4-bcfd-11ea-97d0-5254000f125d","function":"getUserInfo","timestamp":"1593760690884290"}


回答关注问题邀请回答
收藏

2 个回答

登录 后发表内容
问题标签