[BUG] Websocket Sync Error
Is there an existing issue for this?
- [X] I have searched the existing issues
Current Behavior
1.I added two divide plugins,

2.I close first divide plugin
3.I try to sync plugin data,oooo,occur error

com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2 path $
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:224)
at com.google.gson.Gson.fromJson(Gson.java:887)
at com.google.gson.Gson.fromJson(Gson.java:852)
at com.google.gson.Gson.fromJson(Gson.java:801)
at com.google.gson.Gson.fromJson(Gson.java:773)
at org.apache.shenyu.common.utils.GsonUtils.fromJson(GsonUtils.java:123)
at org.apache.shenyu.plugin.divide.handler.DividePluginDataHandler.lambda$handlerRule$0(DividePluginDataHandler.java:32)
at java.util.Optional.ifPresent(Optional.java:159)
at org.apache.shenyu.plugin.divide.handler.DividePluginDataHandler.handlerRule(DividePluginDataHandler.java:31)
at org.apache.shenyu.plugin.base.cache.CommonPluginDataSubscriber.lambda$null$5(CommonPluginDataSubscriber.java:141)
at java.util.Optional.ifPresent(Optional.java:159)
at org.apache.shenyu.plugin.base.cache.CommonPluginDataSubscriber.lambda$subscribeDataHandler$7(CommonPluginDataSubscriber.java:141)
at java.util.Optional.ifPresent(Optional.java:159)
at org.apache.shenyu.plugin.base.cache.CommonPluginDataSubscriber.subscribeDataHandler(CommonPluginDataSubscriber.java:118)
at org.apache.shenyu.plugin.base.cache.CommonPluginDataSubscriber.onRuleSubscribe(CommonPluginDataSubscriber.java:96)
at java.util.ArrayList.forEach(ArrayList.java:1257)
at org.apache.shenyu.plugin.sync.data.websocket.handler.RuleDataHandler.doRefresh(RuleDataHandler.java:42)
at org.apache.shenyu.plugin.sync.data.websocket.handler.AbstractDataHandler.handle(AbstractDataHandler.java:68)
at org.apache.shenyu.plugin.sync.data.websocket.handler.WebsocketDataHandler.executor(WebsocketDataHandler.java:59)
at org.apache.shenyu.plugin.sync.data.websocket.client.ShenyuWebsocketClient.handleResult(ShenyuWebsocketClient.java:88)
at org.apache.shenyu.plugin.sync.data.websocket.client.ShenyuWebsocketClient.onMessage(ShenyuWebsocketClient.java:68)
at org.java_websocket.client.WebSocketClient.onWebsocketMessage(WebSocketClient.java:591)
at org.java_websocket.drafts.Draft_6455.processFrameText(Draft_6455.java:885)
at org.java_websocket.drafts.Draft_6455.processFrame(Draft_6455.java:819)
at org.java_websocket.WebSocketImpl.decodeFrames(WebSocketImpl.java:379)
at org.java_websocket.WebSocketImpl.decode(WebSocketImpl.java:216)
at org.java_websocket.client.WebSocketClient.run(WebSocketClient.java:508)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2 path $
at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:385)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:213)
... 27 common frames omitted
Expected Behavior
No response
Steps To Reproduce
No response
Environment
ShenYu version(s):V2.4.0--last month
Debug logs
No response
Anything else?
No response
hi, @moremind ,thanks for your report, would you like to fix it? and pull request.
I think , divide selector handler is null ?
I think , divide selector handler is null ?
No,I only open a selector with selector handler,from the log,I think this question related to plugin rule?
No,I only open a selector with selector handler,from the log,I think this question related to plugin rule?
is selector handler field is null
@moremind can you fix it?
@moremind Hello bro, have you done it yet?
@moremind can you fix it?
ooooh,Sorry,I have no time doing it, I may fix it after a month.
@moremind Hello bro, have you done it yet?
ooooh,Sorry,I have no time doing it, I may fix it after a month.
@yu199195 I test again,shenyu-2.4.1 can't find this bug?
@moremind
i do not find this bug .
