wechat.openapp() open the app
but
wechat.sendAuthRequest('snsapi_userinfo', '123353452345');
54
doesn't open the app and iam not getting any response from the api
WeChat.addListener('SendAuth.Resp', function(data) {
console.log(data);
if(data.errCode == 0) {
that.getWeChatAccessToken(data.code);
}
});
@rengasahusoft Did you have any logs after you was calling .sendAuthRequest?
@yorkie No i am not getting any response can you show us one example
@yorkie this is the log which we got in our logcat after clicking sendAuthRequest
I/ActivityManager( 942): START u0 {flg=0x18000000 cmp=com.tencent.mm/.plugin.base.stub.WXEntryActivity (has extras)} from uid 10179 on display 0
V/WindowManager( 942): ** SHOWING status bar: top is not fullscreen
V/WindowManager( 942): addAppToken: AppWindowToken{293ab792 token=Token{ba7191d ActivityRecord{15672df4 u0 com.tencent.mm/.plugin.base.stub.WXEntryActivity t1431}}} to stack=1 task=1431 at 0
D/WindowManager( 942): IKSWL-9411 focusChangedLw lastFocus=Window{231c65c7 u0 com.wechat/com.wechat.MainActivity} newFocus=null
V/WindowManager( 942): ** SHOWING status bar: top is not fullscreen
I/cr_LibraryLoader(16699): Time to load native libraries: 31 ms (timestamps 1828-1859)
I/cr_LibraryLoader(16699): Expected native library version number "51.0.2704.81", actual native library version number "51.0.2704.81"
W/ActivityManager( 942): getTasks: caller 10025 does not hold REAL_GET_TASKS; limiting output
D/WindowManager( 942): IKSWL-9411 focusChangedLw lastFocus=null newFocus=Window{231c65c7 u0 com.wechat/com.wechat.MainActivity}
+1 android doesn't work
Some news ?
Not yet unfortunately, sorry, I didn't have any real android device to debug with this, so may I ask to @Richard-Cao to chime into this issue something?
I’m here
Do you meet the same problem there?
No. I don't use sendAuthRequest api. Only use share api.
I solved my problem.
my problem is android sign.
WeChat.sendAuthRequest('snsapi_userinfo') set scope as u see ,the problem will fixed.
and this is the offical demo:
{
// send oauth request
Final SendAuth.Req req = new SendAuth.Req();
req.scope = "snsapi_userinfo";
req.state = "wechat_sdk_demo_test";
api.sendReq(req);
}
scope 是 应用授权作用域,如获取用户个人信息则填写snsapi_userinfo(什么是授权域?)
@tofrookie can you elaborate on how exactly did you solve your problem. Thanks in advance!
i meet this problem, in android, can't open weixin to login, i have signed my app, any solution?
what is the sign as @tofrookie said? please show in detail.
I registerApp first and added the following:
WeChat.sendAuthRequest("snsapi_userinfo", "myclient_wx_login")
.then((result)=>{
console.log(result)
})
.catch((e)=>{
console.error(e);
})
I have the same problem ,i cannot open the App, should someone show the hole WXEntryActivity.java?
I have solved my problem ,just keep the package name and applicaionid the same, i don't know why i can't change the applicationid for different build purpose.
可以唤醒,但是无返回结果
我也是,可以唤醒!没有返回结果 ?
可以唤醒,但是无返回结果
8102年了,我依然碰到了这个问题,神奇的是这个 bug 居然被 closed 了...
can someone explain how to resolve the issue that wechat does not get opened? @sumyfly
我是解决了但是忘记是怎么解决了😹,代码也不在手里,印象里是微信的那个 code
I have solved my problem ,just keep the package name and applicaionid the same, i don't know why i can't change the applicationid for different build purpose.
maybe wx sdk find the EXEntryActivity by the applicationId
solution:
WeChat app wakes up, but no return results...
@onlybenyang @HyperSimon @ios-xxx @ww930912 Did you figure out something?
@shekhargupta Please check the whether WXEntryActivity created by yourself and the code
@onlybenyang thanks for your reply! The issue is resolved.
For me the issue was that I have wrongly placed WXAPI package outside com.MYPROJECT package.
Most helpful comment
I have solved my problem ,just keep the package name and applicaionid the same, i don't know why i can't change the applicationid for different build purpose.