NetEase / pomelo-androidclient

java&android client for pomelo
83 stars 45 forks source link

io.socket.SocketIOException: Error while handshaking #10

Closed kingideayou closed 9 years ago

kingideayou commented 9 years ago

握手时出现错误,在 StackOverFlow 上查询说需要更新 socket-io 版本,请问有什么解决方案吗?

01-02 14:07:12.738 9744-9744/com.next.pomelodemo W/dalvikvm﹕ Refusing to reopen boot DEX '/system/framework/hwframework.jar' 01-02 14:07:13.025 9744-9744/com.next.pomelodemo D/libEGL﹕ loaded /system/lib/egl/libEGL_VIVANTE.so 01-02 14:07:13.028 9744-9744/com.next.pomelodemo D/libEGL﹕ loaded /system/lib/egl/libGLESv1_CM_VIVANTE.so 01-02 14:07:13.035 9744-9744/com.next.pomelodemo D/libEGL﹕ loaded /system/lib/egl/libGLESv2_VIVANTE.so 01-02 14:07:13.068 9744-9744/com.next.pomelodemo D/OpenGLRenderer﹕ Enabling debug mode 0 01-02 14:07:29.278 9744-9889/com.next.pomelodemo I/org.netease.pomelo﹕ connection is terminated. 01-02 14:07:29.278 9744-9889/com.next.pomelodemo W/org.netease.pomelo﹕ there is no listeners. 01-02 14:07:29.285 9744-9889/com.next.pomelodemo W/System.err﹕ io.socket.SocketIOException: Error while handshaking 01-02 14:07:29.285 9744-9889/com.next.pomelodemo W/System.err﹕ at io.socket.IOConnection.handshake(IOConnection.java:322) 01-02 14:07:29.288 9744-9889/com.next.pomelodemo W/System.err﹕ at io.socket.IOConnection.access$600(IOConnection.java:39) 01-02 14:07:29.288 9744-9889/com.next.pomelodemo W/System.err﹕ at io.socket.IOConnection$ConnectThread.run(IOConnection.java:199) 01-02 14:07:29.288 9744-9889/com.next.pomelodemo W/System.err﹕ Caused by: java.net.SocketTimeoutException 01-02 14:07:29.292 9744-9889/com.next.pomelodemo W/System.err﹕ at java.net.PlainSocketImpl.read(PlainSocketImpl.java:491) 01-02 14:07:29.292 9744-9889/com.next.pomelodemo W/System.err﹕ at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:46) 01-02 14:07:29.292 9744-9889/com.next.pomelodemo W/System.err﹕ at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:240) 01-02 14:07:29.295 9744-9889/com.next.pomelodemo W/System.err﹕ at java.io.InputStream.read(InputStream.java:163) 01-02 14:07:29.295 9744-9889/com.next.pomelodemo W/System.err﹕ at java.io.BufferedInputStream.fillbuf(BufferedInputStream.java:142) 01-02 14:07:29.295 9744-9889/com.next.pomelodemo W/System.err﹕ at java.io.BufferedInputStream.read(BufferedInputStream.java:227) 01-02 14:07:29.295 9744-9889/com.next.pomelodemo W/System.err﹕ at libcore.io.Streams.readAsciiLine(Streams.java:201) 01-02 14:07:29.298 9744-9889/com.next.pomelodemo W/System.err﹕ at libcore.net.http.HttpEngine.readResponseHeaders(HttpEngine.java:560) 01-02 14:07:29.298 9744-9889/com.next.pomelodemo W/System.err﹕ at libcore.net.http.HttpEngine.readResponse(HttpEngine.java:813) 01-02 14:07:29.298 9744-9889/com.next.pomelodemo W/System.err﹕ at libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:274) 01-02 14:07:29.302 9744-9889/com.next.pomelodemo W/System.err﹕ at libcore.net.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:168) 01-02 14:07:29.302 9744-9889/com.next.pomelodemo W/System.err﹕ at io.socket.IOConnection.handshake(IOConnection.java:313) 01-02 14:07:29.302 9744-9889/com.next.pomelodemo W/System.err﹕ ... 2 more 01-02 14:07:29.302 9744-9889/com.next.pomelodemo I/io.socket﹕ Cleanup

kingideayou commented 9 years ago

抱歉,我的问题,已经解决。

JellyB commented 8 years ago

怎么解决的?

baochungit commented 8 years ago

I encountered the issue and fixed it by using LAN IP of the server instead of 127.0.0.1 which is known as localhost of client device.

vecharm commented 7 years ago

请问这个怎么解决的