Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

扫码失败 #15

Open
howlDream opened this issue Jan 15, 2018 · 23 comments
Open

扫码失败 #15

howlDream opened this issue Jan 15, 2018 · 23 comments

Comments

@howlDream
Copy link

image
扫码失败:二维码已失效

@Jamling
Copy link
Owner

Jamling commented Jan 15, 2018

请提供完整的日志,可以选择全选错误text或在error log中看到完整的异常信息

@howlDream
Copy link
Author

java.lang.RuntimeException: 二维码已失效

@Jamling
Copy link
Owner

Jamling commented Jan 15, 2018

没有类似

eclipse.buildId=4.5.0.I20150603-2000
java.version=1.8.0_91
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN
Framework arguments:  -product org.eclipse.epp.package.rcp.product -nl=en -Djsse.enableSNIExtension=false
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.rcp.product -nl=en -Djsse.enableSNIExtension=false

This is a continuation of log file E:\workspace\.metadata\.bak_0.log
Created Time: 2018-01-15 14:19:10.140

cn.ieclipse.smartqq
Error
Mon Jan 15 16:33:16 CST 2018
登录失败

java.lang.RuntimeException: 二维码已失效
	at com.scienjus.smartqq.client.SmartQQApi.verifyQRCode(SmartQQApi.java:181)
	at com.scienjus.smartqq.client.SmartQQApi.login(SmartQQApi.java:106)
	at com.scienjus.smartqq.client.SmartQQClient.login(SmartQQClient.java:185)
	at cn.ieclipse.smartim.dialogs.LoginDialog.doLogin(LoginDialog.java:161)
	at cn.ieclipse.smartim.dialogs.LoginDialog$1.run(LoginDialog.java:63)

的信息吗?
尝试的解决办法:
1,断开连接,再重新登录
2,在文件系统上找开二维码图片,再使用手机QQ扫码登录。

@howlDream
Copy link
Author

!ENTRY cn.ieclipse.smartqq 4 0 2018-01-15 16:26:43.077
!MESSAGE 登录失败
!STACK 0
java.lang.RuntimeException: 二维码已失效
at com.scienjus.smartqq.client.SmartQQApi.verifyQRCode(SmartQQApi.java:181)
at com.scienjus.smartqq.client.SmartQQApi.login(SmartQQApi.java:106)
at com.scienjus.smartqq.client.SmartQQClient.login(SmartQQClient.java:185)
at cn.ieclipse.smartim.dialogs.LoginDialog.doLogin(LoginDialog.java:161)
at cn.ieclipse.smartim.dialogs.LoginDialog$1.run(LoginDialog.java:63)

不知怎的,已经好了!
不过又发现新问题,点击对话报错:
!ENTRY org.eclipse.ui 4 0 2018-01-15 16:30:41.204
!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NoClassDefFoundError: org/eclipse/ui/console/IScrollLockStateProvider)
at org.eclipse.swt.SWT.error(SWT.java:4361)
at org.eclipse.swt.SWT.error(SWT.java:4276)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4144)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
Caused by: java.lang.NoClassDefFoundError: org/eclipse/ui/console/IScrollLockStateProvider
at cn.ieclipse.smartim.console.IMChatConsole.createPage(IMChatConsole.java:85)
at org.eclipse.ui.internal.console.ConsoleView.doCreatePage(ConsoleView.java:316)
at org.eclipse.ui.part.PageBookView.createPage(PageBookView.java:411)
at org.eclipse.ui.part.PageBookView.partActivated(PageBookView.java:763)
at org.eclipse.ui.internal.console.ConsoleView$4.run(ConsoleView.java:404)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
... 24 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.ui.console.IScrollLockStateProvider
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 31 more

@Jamling
Copy link
Owner

Jamling commented Jan 15, 2018

通过异常信息来看,是QQ后台二维码失败了,估计是时间太长没扫。
第二个问题:
换个eclipse版本,本插件不支持eclipse 4.5.2,因为这个版本的eclipse console存在一个bug。

@howlDream
Copy link
Author

好吧 。/\ 。

@ShuailingMa
Copy link

扫描完微信二维码,报错,说字符串索引越界,知道是什么情况么?QQ正常。

@Jamling
Copy link
Owner

Jamling commented Apr 19, 2018

@ShuailingMa 先保证本插件为最新版本,之前有某个版本,微信扫码会引发数组越界。

@ShuailingMa
Copy link

eclipse中Marketplace下载的3.1.2版本的SmartQQ

@Jamling
Copy link
Owner

Jamling commented Apr 19, 2018

最新版本为:GitHub release

使用Help-> Check for updates检查更新一下

@ShuailingMa
Copy link

显示是最新版的,刚才又卸载了,使用install software重新安装了一下,扫码微信时,还是同样的错误。

@Jamling
Copy link
Owner

Jamling commented Apr 19, 2018

Window->Show View 打开Error Log视图,把详细的日志发出来吧。

@ShuailingMa
Copy link

java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.AbstractStringBuilder.substring(AbstractStringBuilder.java:935)
at java.lang.StringBuffer.substring(StringBuffer.java:480)
at java.lang.StringBuffer.substring(StringBuffer.java:462)
at io.github.biezhi.wechat.api.WechatApi.makeSynckey(WechatApi.java:322)
at io.github.biezhi.wechat.api.WechatApi.webwxinit(WechatApi.java:307)
at io.github.biezhi.wechat.api.WechatClient.login(WechatClient.java:113)
at cn.ieclipse.smartim.dialogs.LoginDialog.doLogin(LoginDialog.java:167)
at cn.ieclipse.smartim.dialogs.LoginDialog$1.run(LoginDialog.java:63)

@ShuailingMa
Copy link

这部分是session data:

eclipse.buildId=4.7.3.M20180301-0715
java.version=1.8.0_162
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=zh_CN
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -data file:/home/shuailing/eclipse-workspace/ -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.jee.product

@Jamling
Copy link
Owner

Jamling commented Apr 19, 2018

这个错误与以前的数组越界不是同一个地方。我微信被封,暂时不能解决哦。
参考:
https://github.com/Jamling/SmartIM/blob/master/wechat/src/main/java/io/github/biezhi/wechat/api/WechatApi.java 第322行

@ShuailingMa
Copy link

恩恩,没事,不过我很好奇微信也会被封,你一定是位大神

@Jamling
Copy link
Owner

Jamling commented Apr 19, 2018

SmartIM带机器人功能,我测试机器人功能时,估计被微信发现了。

@ShuailingMa
Copy link

好吧,可以的,能不能想办法把腾讯黑了

@Jamling
Copy link
Owner

Jamling commented Apr 19, 2018

@ShuailingMa 你想多了,能黑大腾讯的人,可不是一般的人。我使用别人的微信登录过了,可以登录。你先在微信网页版官网登录一下,再手机退出,再使用本插件登录一下试试。

@ShuailingMa
Copy link

还是一样的问题,你觉得会不会是因为我的jdk是openjdk的缘故,你可以和我说游一下,你的jdk版本和eclipse版本么

@Jamling
Copy link
Owner

Jamling commented Apr 19, 2018

@ShuailingMa
跟jdk无关,参考Jamling/SmartIM@30d17d1 原因是webwxinit接口返回的json SyncKey->List为空导致。你可以在微信网页官网上登录,查看一下官网返回的是否也为空。smartim代码中已对此问题做了处理,但我不确定synckey为空,是否会影响后面的接口。

@ShuailingMa
Copy link

你知道怎么查看是否为空么?我在官网扫描完成就直接进去了

@Jamling
Copy link
Owner

Jamling commented Apr 19, 2018

浏览器中打开开发人员工具,快捷键比如f12。然后查看网络,每个请求具体的请求参数及响应都有的。如果没有基础知识,建议不折腾了。
如果熟悉java,建议下载smartim源代码,运行wechat module中的application,自己空位原因。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants