我也是同样的问题,解决了吗?
WXLog:Error:set token fail, errCode:4, errLog:wx?API名称:WXApi sendAuthReq,微信版本:8.0.46,基础库版本:微信OpenSDK 2.0.2, 移动应用(APP)做微信登录 目前实现情况:点击微信登录,可以调起微信,确认之后,监听函数没有收到结果 注册WxApi成功,调用WXApi sendAuthReq(scope, state, nonAutomatic), 有几个log, 最后出错 2024-02-20 20:25:28.045204+0800 PTNS[600:63586] [WeChatIdentityHandler.mm]-[WeChatIdentityHandler checkAndRecordTokenToKeychain:contextID:error:]WXLog:Error:set token fail, errCode:4, errLog:wx token[] or contextId[(null)] is nil! 详细些的log是这样: 2024-02-20 20:25:26.987210+0800 PTNS[600:63586] [WXApi.m]+[WXApi sendReq:isAutoResend:forceScheme:completion:]WXLog:send req[<SendAuthReq: 0x2803bd080>], appID:wx86c*******, universalLink:https://******/, sdkVersion:2.0.2 2024-02-20 20:25:26.997210+0800 PTNS[600:63586] [WXApi.m]+[WXApi sendReq:isAutoResend:forceScheme:completion:]WXLog:send req transformToUrl data len:244, erased:0 2024-02-20 20:25:26.997398+0800 PTNS[600:63586] [WXApi.m]+[WXApi sendReq:isAutoResend:forceScheme:completion:]WXLog:gen url with full params ok 2024-02-20 20:25:27.183292+0800 PTNS[600:63586] [WXApi.m]+[WXApi launchApplicationWithUrl:completion:]_block_invokeWXLog:launch app with ul only success 2024-02-20 20:25:27.183469+0800 PTNS[600:63586] [WXApi.m]+[WXApi launchWechatWithExtralUrl:forceScheme:contextId:paramsDataStr:unnecessaryDataErased:completion:]_block_invokeWXLog:launch app with universal link, ret:1 2024-02-20 20:25:27.183620+0800 PTNS[600:63586] [WeChatIdentityHandler.mm]-[WeChatIdentityHandler setContextReq:contextId:]WXLog:req:<SendAuthReq: 0x2803bd080>, cid:ec3113dcfdb3d6f4b197adfdb5c63cfb4a0ac4b986c0e4ab1368c295b5675ce9 2024-02-20 20:25:27.936097+0800 PTNS[600:63586] -[SceneDelegate sceneDidEnterBackground:](56):scene background 2024-02-20 20:25:27.943237+0800 PTNS[600:63586] <MainViewController: 0x130831000> #applicationWillEnterForeground or Will Terminate or applicationWillResignActive 2024-02-20 20:25:27.946337+0800 PTNS[600:63586] <MainViewController: 0x130831000> #applicationWillEnterForeground or Will Terminate or applicationWillResignActive 2024-02-20 20:25:28.026240+0800 PTNS[600:63936] [Common] Snapshot request 0x281816c70 complete with error: <NSError: 0x281820ba0; domain: FBSSceneSnapshotErrorDomain; code: 3; reason: "the request was canceled"> 2024-02-20 20:25:28.029082+0800 PTNS[600:63959] [Common] Snapshot request 0x281881b90 complete with error: <NSError: 0x281894c90; domain: BSActionErrorDomain; code: 6 (anulled)> 2024-02-20 20:25:28.037997+0800 PTNS[600:63586] -[SceneDelegate sceneWillEnterForeground:](43):scene foreground 2024-02-20 20:25:28.045204+0800 PTNS[600:63586] [WeChatIdentityHandler.mm]-[WeChatIdentityHandler checkAndRecordTokenToKeychain:contextID:error:]WXLog:Error:set token fail, errCode:4, errLog:wx token[] or contextId[(null)] is nil! 按照文档说明已验证universalLink可以正常工作。 请问最后这个出错可能是什么原因?
08-26我也有同样的问题,跳转正常,从微信返回回来就没有任何反应了,就是不走onResp回调,拿不到参数。我的项目是swift项目 没有SceneDelegate,记忆中是建项目的时候把SceneDelegate删掉,只保留了AppDelegate. "WeChatSDK: wxlog:send req[<SendAuthReq: 0x302930f80>], appID:wx3801244a61a0f7, universalLink:https://www.domain.com/app/ios/, sdkVersion:2.0.2" "WeChatSDK: wxlog:send req transformToUrl data len:236, erased:0" "WeChatSDK: wxlog:gen url with full params ok" "WeChatSDK: wxlog:launch app with ul only success" "WeChatSDK: wxlog:launch app with universal link, ret:1" "WeChatSDK: wxlog:req:<SendAuthReq: 0x302930f80>, cid:c604c6065ecc3fc4f73b40dc698290ad9eecf37daaf9a8f29b230d2d1bf8d36f" "WeChatSDK: wxlog:Error:set token fail, errCode:4, errLog:wx token[] or contextId[(null)] is nil!" 我的控制台里面可以看到下面的打印信息,但是不是走的onResp,这个是个谷歌的第三方框架打印出来的,不知道是在哪里打印的,所以不知道怎么拿到下面的信息。 - <Google>[I-ACS023001] Deep Link does not contain valid required params. URL params: { code = 031BOJ0002PQHS1MAc4d0dZUx34BOJ0Z; country = CN; lang = en; state = "default_state"; }
iOS 版本17.4.1, 接入微信登录,跳转微信授权成功,返回APP端没有执行onResp方法?如题所示,目前测试这个版本有问题
08-26