请选择 进入手机版 | 继续访问电脑版
查看: 260|回复: 3

安卓IM接入登录报空指针,不是408就是415,很急!求帮助!QAQ

[复制链接]

1

主题

2

帖子

9

积分

云客

Rank: 1

积分
9
发表于 2019-11-19 03:29:38 | 显示全部楼层 |阅读模式
代码几乎是原原本本照搬demo的,只砍去了一些没有用到的功能。但是demo可以登录,把demo的app key改成我们应用的,用服务端拿到的token也可以正常登录。但是到我自己的应用当中就不行,有时报408,有时报415.有时候会出现空指针,底下贴出执行登录后的日志,上面的空指针经常出现,但是因为混淆过看不到源码,所以请大大们帮忙看看!很着急,想了一通宵都没头绪!QAQ
11-19 03:26:14.802 10150-10150/com.zlapp.im I/ZLAPPoginActivity.netEaseLogin(Line:362): account:203455
11-19 03:26:14.802 10150-10150/com.zlapp.im I/ZLAPPoginActivity.netEaseLogin(Line:363): token2053BAB3B88E73DAB41CE5669257A27
11-19 03:26:14.804 10150-10168/com.zlapp.im I/[ui]TransExec: 400/execute Transaction: [id: 18,  method: AuthService/login]
11-19 03:26:14.806 10150-10168/com.zlapp.im I/[ui]ui: 400/user manual login, account=203455
11-19 03:26:14.814 10150-10168/com.zlapp.im I/[ui]ui: 402/set status from UNLOGIN to CONNECTING
11-19 03:26:14.815 10150-10168/com.zlapp.im I/[ui]InvocationMgr: 402/on notify: Transaction: [id: 19,  method: AuthServiceObserver/observeOnlineStatus]
11-19 03:26:14.822 10150-10206/com.zlapp.im W/EGL_emulation: eglSurfaceAttrib not implemented
11-19 03:26:14.822 10150-10206/com.zlapp.im W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xa1c54100, error=EGL_SUCCESS
11-19 03:26:14.890 10150-10168/com.zlapp.im I/[ui]ui: 402/set status from CONNECTING to LOGINING
11-19 03:26:14.891 10150-10168/com.zlapp.im I/[ui]InvocationMgr: 402/on notify: Transaction: [id: 20,  method: AuthServiceObserver/observeOnlineStatus]
11-19 03:26:44.970 10150-10168/com.zlapp.im V/[ui]core: 403/handle packet: PacketHeader [SID 2 , CID 2 , SER 2 , RES 408 , TAG 2 , LEN 445]
11-19 03:26:44.980 10150-10168/com.zlapp.im I/[ui]ui: 402/UI save sessionId from Push, sessionId=e5e1632f-71fc-4cf7-a77a-a085fa1b2555
11-19 03:26:44.985 10150-10168/com.zlapp.im I/[ui]ui: 402/set status from LOGINING to UNLOGIN
11-19 03:26:44.987 10150-10193/com.zlapp.im W/art: Method processed more than once: java.lang.String com.netease.nimlib.o.b.a(java.nio.channels.FileChannel)
11-19 03:26:44.989 10150-10168/com.zlapp.im I/[ui]core: 403/deviceId = 0d89ed9c-bc41-47a3-a525-a256dfc91f00
11-19 03:26:44.994 10150-10168/com.zlapp.im I/[ui]ui: 403/handler response PacketHeader [SID 2 , CID 2 , SER 2 , RES 408 , TAG 2 , LEN 445]
11-19 03:26:44.996 10150-10168/com.zlapp.im I/[ui]InvocationMgr: 402/execution result: Transaction: [id: 18,  method: AuthService/login, result: 408]
11-19 03:26:44.997 10150-10193/com.zlapp.im W/System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.netease.nimlib.j.j.b()' on a null object reference
11-19 03:26:45.003 10150-10193/com.zlapp.im W/System.err:     at com.netease.nimlib.d.e.a(UICore.java:213)
11-19 03:26:45.003 10150-10193/com.zlapp.im W/System.err:     at com.netease.nimlib.o.a.a.b.a(LoginResponseHandler.java:2115)
11-19 03:26:45.003 10150-10193/com.zlapp.im W/System.err:     at com.netease.nimlib.d.b.b$2.run(ResponseDispatcher.java:190)
11-19 03:26:45.003 10150-10193/com.zlapp.im W/System.err:     at com.netease.nimlib.d.b.b.b(ResponseDispatcher.java:1207)
11-19 03:26:45.003 10150-10193/com.zlapp.im W/System.err:     at com.netease.nimlib.d.b.b.a(ResponseDispatcher.java:14)
11-19 03:26:45.003 10150-10193/com.zlapp.im W/System.err:     at com.netease.nimlib.d.b.b$1.run(ResponseDispatcher.java:60)
11-19 03:26:45.003 10150-10193/com.zlapp.im W/System.err:     at com.netease.nimlib.e.b.b$b.run(TaskExecutor.java:180)
11-19 03:26:45.003 10150-10193/com.zlapp.im W/System.err:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
11-19 03:26:45.003 10150-10193/com.zlapp.im W/System.err:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
11-19 03:26:45.003 10150-10193/com.zlapp.im W/System.err:     at java.lang.Thread.run(Thread.java:818)
11-19 03:26:45.004 10150-10168/com.zlapp.im E/[ui]core: 403/process response exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.netease.nimlib.j.j.b()' on a null object reference on packet: PacketHeader [SID 2 , CID 2 , SER 2 , RES 408 , TAG 2 , LEN 445]
    java.lang.NullPointerException: Attempt to invoke virtual method 'void com.netease.nimlib.j.j.b()' on a null object reference
        at com.netease.nimlib.d.e.a(UICore.java:213)
        at com.netease.nimlib.o.a.a.b.a(LoginResponseHandler.java:2115)
        at com.netease.nimlib.d.b.b$2.run(ResponseDispatcher.java:190)
        at com.netease.nimlib.d.b.b.b(ResponseDispatcher.java:1207)
        at com.netease.nimlib.d.b.b.a(ResponseDispatcher.java:14)
        at com.netease.nimlib.d.b.b$1.run(ResponseDispatcher.java:60)
        at com.netease.nimlib.e.b.b$b.run(TaskExecutor.java:180)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
        at java.lang.Thread.run(Thread.java:818)
11-19 03:26:45.019 10150-10168/com.zlapp.im I/[ui]ui: 402/remove all has refreshed message ids
11-19 03:26:45.020 10150-10168/com.zlapp.im I/[ui]InvocationMgr: 402/on notify: Transaction: [id: 21,  method: AuthServiceObserver/observeOnlineStatus]
11-19 03:26:45.041 10150-10168/com.zlapp.im D/[ui]cp: 420/IPC-CP getAllLinksFromLBS data=106.2.126.87:8080;59.111.167.120:8080;106.2.126.82:8080;106.2.126.87:8080;59.111.167.222:8080;106.2.126.86:8080;106.2.127.192:9092;106.2.126.79:8080;59.111.167.121:8080;link.netease.im:8080;
11-19 03:26:45.041 10150-10168/com.zlapp.im I/[ui]NetPing: 420/***** Net ping start, host list size=12 *****
11-19 03:26:45.043 10150-10168/com.zlapp.im I/[ui]NetPing: 420/ping host 106.2.126.87
11-19 03:26:45.089 10150-10206/com.zlapp.im W/EGL_emulation: eglSurfaceAttrib not implemented
11-19 03:26:45.089 10150-10206/com.zlapp.im W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xa087fbc0, error=EGL_SUCCESS
11-19 03:26:47.112 10150-10168/com.zlapp.im I/[ui]NetPing: 420/ping host result={"min":28.482,"avg":32.423,"max":37.582,"mdev":3.813,"loss":0,"ip":"106.2.126.87"}
11-19 03:26:47.115 10150-10168/com.zlapp.im I/[ui]NetPing: 420/ping host 59.111.167.120
11-19 03:26:49.170 10150-10168/com.zlapp.im I/[ui]NetPing: 420/ping host result={"min":28.913,"avg":33.08,"max":38.152,"mdev":3.825,"loss":0,"ip":"59.111.167.120"}
11-19 03:26:49.176 10150-10168/com.zlapp.im I/[ui]NetPing: 420/ping host 106.2.126.82
11-19 03:26:51.218 10150-10168/com.zlapp.im I/[ui]NetPing: 420/ping host result={"min":16.443,"avg":18.767,"max":21.105,"mdev":1.909,"loss":0,"ip":"106.2.126.82"}
11-19 03:26:51.227 10150-10168/com.zlapp.im I/[ui]NetPing: 420/ping host 59.111.167.222
11-19 03:26:53.292 10150-10168/com.zlapp.im I/[ui]NetPing: 420/ping host result={"min":30.794,"avg":33.802,"max":37.033,"mdev":2.556,"loss":0,"ip":"59.111.167.222"}
11-19 03:26:53.293 10150-10168/com.zlapp.im I/[ui]NetPing: 420/ping host 106.2.126.86
11-19 03:26:55.417 10150-10168/com.zlapp.im I/[ui]NetPing: 420/ping host result={"min":16.207,"avg":36.826,"max":77.339,"mdev":28.648,"loss":0,"ip":"106.2.126.86"}
11-19 03:26:55.420 10150-10168/com.zlapp.im I/[ui]NetPing: 420/ping host 106.2.127.192
11-19 03:26:57.470 10150-10168/com.zlapp.im I/[ui]NetPing: 420/ping host result={"min":15.863,"avg":19.425,"max":22.309,"mdev":2.677,"loss":0,"ip":"106.2.127.192"}
11-19 03:26:57.471 10150-10168/com.zlapp.im I/[ui]NetPing: 420/ping host 106.2.126.79
11-19 03:26:59.503 10150-10168/com.zlapp.im I/[ui]NetPing: 420/ping host result={"min":17.636,"avg":21.188,"max":26.582,"mdev":3.879,"loss":0,"ip":"106.2.126.79"}
11-19 03:26:59.507 10150-10168/com.zlapp.im I/[ui]NetPing: 420/ping host 59.111.167.121
11-19 03:27:01.569 10150-10168/com.zlapp.im I/[ui]NetPing: 420/ping host result={"min":16.587,"avg":19.625,"max":23.474,"mdev":2.873,"loss":0,"ip":"59.111.167.121"}
11-19 03:27:01.573 10150-10168/com.zlapp.im I/[ui]NetPing: 420/ping host link.netease.im
11-19 03:27:03.637 10150-10168/com.zlapp.im I/[ui]NetPing: 420/ping host result={"min":27.434,"avg":31.011,"max":34.972,"mdev":3.092,"loss":0,"ip":"link.netease.im"}
11-19 03:27:03.652 10150-10168/com.zlapp.im I/[ui]NetPing: 420/ping host nosup-hz1.127.net



回复

使用道具 举报

1

主题

2

帖子

9

积分

云客

Rank: 1

积分
9
 楼主| 发表于 2019-11-19 10:47:15 | 显示全部楼层
求帮助,很紧急!
回复

使用道具 举报

1

主题

79

帖子

457

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
457
发表于 2019-11-25 10:06:47 | 显示全部楼层
408 415 都是本地网络不好。可以切换一下网络环境看看,
但是如果是必现415, 那么需要走一下网络排查流程,可以看下ping 我们的地址是否能通
回复

使用道具 举报

0

主题

1

帖子

4

积分

云客

Rank: 1

积分
4
发表于 2020-3-19 16:48:37 | 显示全部楼层
楼主解决了吗
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表