BanqiJane / Bilibili_Danmuji

(Bilibili)B站直播礼物答谢、定时广告、关注感谢,自动回复工具,房管工具,自动打卡,Bilibili直播弹幕姬(使用websocket协议),java版B站弹幕姬,基于springboot。
GNU General Public License v3.0
738 stars 108 forks source link

欢迎姬发送弹幕失败后,导致弹幕姬运行异常 #87

Open alxebanner opened 8 months ago

alxebanner commented 8 months ago

RT, 触发条件 1、当B站用户的名称 包含关键词“坦克”时, 2、欢迎姬打开 3、已登录

触发过程1、该用户进入直播间,欢迎姬触发,发送欢迎弹幕

现象:会因为触发了 b站自己的屏蔽词,导致弹幕发送失败, 在程序里面表现为 导致运行时异常 IndexOutOfBoundsException

BanqiJane commented 8 months ago

有相应的弹幕姬程序日志吗

alxebanner commented 8 months ago

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:659) at java.util.ArrayList.get(ArrayList.java:435) at com.alibaba.fastjson.JSONArray.get(JSONArray.java:240) at com.alibaba.fastjson.JSONArray.getString(JSONArray.java:421) at xyz.acproject.danmuji.thread.core.ParseMessageThread.run(ParseMessageThread.java:140) 2024-03-10 07:50:24,287 ERROR ParseMessageThread:1382 -Index: 0, Size: 0 2024-03-10 07:50:24,833 INFO HttpUserData:520 -{"msg":"f","code":0,"data":{"mode_info":{"mode":0,"extra":"{\"send_from_me\":true,\"mode\":0,\"color\":5566168,\"dm_type\":0,\"font_size\":25,\"player_mode\":1,\"show_player_type\":0,\"content\":\"欢迎M1a2坦克~落落人美歌甜性格好,关注就像捡到宝!\",\"user_hash\":\"1061412762\",\"emoticon_unique\":\"\",\"bulge_display\":0,\"recommend_score\":0,\"main_state_dm_color\":\"\",\"objective_state_dm_color\":\"\",\"direction\":0,\"pk_direction\":0,\"quartet_direction\":0,\"anniversary_crowd\":0,\"yeah_space_type\":\"\",\"yeah_space_url\":\"\",\"jump_to_url\":\"\",\"space_type\":\"\",\"space_url\":\"\",\"animation\":{},\"emots\":null,\"is_audited\":false,\"id_str\":\"50d255c0c6cc47901de578ebfd65ecf571\",\"icon\":null,\"show_reply\":true,\"reply_mid\":0,\"reply_uname\":\"\",\"reply_uname_color\":\"\",\"reply_is_mystery\":false,\"hit_combo\":0}","show_player_type":0,"user":{"uid":511911998,"guard_leader":{"is_guard_leader":false},"base":{"origin_info":{"face":"https://i2.hdslb.com/bfs/face/ae0494c90bc15eff273adb8526e555213a96ff67.jpg","name":"离落め"},"face":"https://i2.hdslb.com/bfs/face/ae0494c90bc15eff273adb8526e555213a96ff67.jpg","is_mystery":false,"name":"离落め","name_color_str":"","name_color":0,"official_info":{"role":0,"title":"","type":-1,"desc":""}}}}},"message":"f"} 2024-03-10 07:50:24,833 ERROR HttpUserData:523 -发送弹幕失败,原因:触发破站关键字,请检查发送弹幕是否含有破站屏蔽词或者非法词汇 java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:659) at java.util.ArrayList.get(ArrayList.java:435) at com.alibaba.fastjson.JSONArray.get(JSONArray.java:240) at com.alibaba.fastjson.JSONArray.getString(JSONArray.java:421) at xyz.acproject.danmuji.thread.core.ParseMessageThread.run(ParseMessageThread.java:140) 2024-03-10 13:00:00,008 ERROR ParseMessageThread:1382 -Index: 0, Size: 0 2024-03-10 13:27:23,191 INFO Http11Processor:175 -Error parsing HTTP request header Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level. java.lang.IllegalArgumentException: Invalid character found in method name [0x030x000x00/0xe00x000x000x000x000x00Cookie: ]. HTTP method names must be tokens at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:419) ~[tomcat-embed-core-9.0.63.jar!/:?] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:271) ~[tomcat-embed-core-9.0.63.jar!/:?] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) ~[tomcat-embed-core-9.0.63.jar!/:?] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:890) ~[tomcat-embed-core-9.0.63.jar!/:?] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1743) ~[tomcat-embed-core-9.0.63.jar!/:?] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-9.0.63.jar!/:?] at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) ~[tomcat-embed-core-9.0.63.jar!/:?] at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) ~[tomcat-embed-core-9.0.63.jar!/:?] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-9.0.63.jar!/:?] at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_382] java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:659) at java.util.ArrayList.get(ArrayList.java:435) at com.alibaba.fastjson.JSONArray.get(JSONArray.java:240) at com.alibaba.fastjson.JSONArray.getString(JSONArray.java:421) at xyz.acproject.danmuji.thread.core.ParseMessageThread.run(ParseMessageThread.java:140) 2024-03-11 01:00:00,005 ERROR ParseMessageThread:1382 -Index: 0, Size: 0 java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:659) at java.util.ArrayList.get(ArrayList.java:435) at com.alibaba.fastjson.JSONArray.get(JSONArray.java:240) at com.alibaba.fastjson.JSONArray.getString(JSONArray.java:421) at xyz.acproject.danmuji.thread.core.ParseMessageThread.run(ParseMessageThread.java:140) 2024-03-11 13:00:00,025 ERROR ParseMessageThread:1382 -Index: 0, Size: 0 2024-03-11 13:27:45,407 INFO Http11Processor:175 -Error parsing HTTP request header Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level. java.lang.IllegalArgumentException: Invalid character found in method name [0x030x000x00/0xe00x000x000x000x000x00Cookie: ]. HTTP method names must be tokens at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:419) ~[tomcat-embed-core-9.0.63.jar!/:?] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:271) ~[tomcat-embed-core-9.0.63.jar!/:?] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) ~[tomcat-embed-core-9.0.63.jar!/:?] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:890) ~[tomcat-embed-core-9.0.63.jar!/:?] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1743) ~[tomcat-embed-core-9.0.63.jar!/:?] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-9.0.63.jar!/:?] at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) ~[tomcat-embed-core-9.0.63.jar!/:?] at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) ~[tomcat-embed-core-9.0.63.jar!/:?] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-9.0.63.jar!/:?] at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_382] java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:659) at java.util.ArrayList.get(ArrayList.java:435) at com.alibaba.fastjson.JSONArray.get(JSONArray.java:240) at com.alibaba.fastjson.JSONArray.getString(JSONArray.java:421) at xyz.acproject.danmuji.thread.core.ParseMessageThread.run(ParseMessageThread.java:140) 2024-03-12 01:00:00,006 ERROR ParseMessageThread:1382 -Index: 0, Size: 0 java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:659) at java.util.ArrayList.get(ArrayList.java:435) at com.alibaba.fastjson.JSONArray.get(JSONArray.java:240) at com.alibaba.fastjson.JSONArray.getString(JSONArray.java:421) at xyz.acproject.danmuji.thread.core.ParseMessageThread.run(ParseMessageThread.java:140) 2024-03-12 13:00:00,023 ERROR ParseMessageThread:1382 -Index: 0, Size: 0 2024-03-12 15:09:45,374 INFO Http11Processor:175 -Error parsing HTTP request header Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level. java.lang.IllegalArgumentException: Invalid character found in method name [0x030x000x00/*0xe00x000x000x000x000x00Cookie: ]. HTTP method names must be tokens at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:419) ~[tomcat-embed-core-9.0.63.jar!/:?] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:271) ~[tomcat-embed-core-9.0.63.jar!/:?] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) ~[tomcat-embed-core-9.0.63.jar!/:?] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:890) ~[tomcat-embed-core-9.0.63.jar!/:?] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1743) ~[tomcat-embed-core-9.0.63.jar!/:?] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-9.0.63.jar!/:?] at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) ~[tomcat-embed-core-9.0.63.jar!/:?] at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) ~[tomcat-embed-core-9.0.63.jar!/:?] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-9.0.63.jar!/:?] at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_382] java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:659) at java.util.ArrayList.get(ArrayList.java:435) at com.alibaba.fastjson.JSONArray.get(JSONArray.java:240) at com.alibaba.fastjson.JSONArray.getString(JSONArray.java:421) at xyz.acproject.danmuji.thread.core.ParseMessageThread.run(ParseMessageThread.java:140) 2024-03-13 01:00:00,003 ERROR ParseMessageThread:1382 -Index: 0, Size: 0 java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:659) at java.util.ArrayList.get(ArrayList.java:435) at com.alibaba.fastjson.JSONArray.get(JSONArray.java:240) at com.alibaba.fastjson.JSONArray.getString(JSONArray.java:421) at xyz.acproject.danmuji.thread.core.ParseMessageThread.run(ParseMessageThread.java:140) 2024-03-13 13:00:00,073 ERROR ParseMessageThread:1382 -Index: 0, Size: 0

kevinluo6191 commented 7 months ago

+1