Received message was deserializable but had unknown format
faluhub opened this issue · 14 comments
Describe the bug
Error message when connecting: Received message was deserializable but had unknown format
Code Sample
CONTROLLER = OBSRemoteController.builder()
.autoConnect(false)
.host("127.0.0.1")
.port(4444)
.lifecycle()
.withCommunicatorDefaultLogging(true)
.withControllerDefaultLogging(true)
.onReady(this::onControllerReady)
.onConnect(this::onControllerConnect)
.onDisconnect(this::onControllerDisconnect)
.and()
.build();
Expected behavior
It should connect correctly
Additional context
It doesn't automatically disconnect after, it's only when I make a request for something that it says the client has disconnected.
I found this when working through updating the V5 stuff on the snapshot. It's partially fixed on my dev branch, the issue is one of the connection classes wasn't serializing the data part of the body correctly. Also, I found one of the error code enums to be missing/incorrect because the new protocol inserted a new code in the middle somewhere (the error code is real/correct, but the enum/words for it are wrong)
Would share my branch, but I'm working on updating all the data classes at once so it's not yet compilable.
It used to be in earlier v5 development that some class fields were one thing and some were another. Now, all the classes have same root structure and they are all basically broken by that change and need to all be fixed simultaneously to compile at all.
@TinaTiel Not to be pushy, but is there an estimate as to when your branch will be done? I came across this issue this weekend and I hacked around it by changing the few commands that I needed which had the issue to make my project work. I decided against fixing it structurally because you mentioned that you are already working on it.
yeah I'd love to use this
I created a fork in which the Request and Response hierarchy has the request/responseData in the correct place in the json. I don't use many commands in my project but the ones I am using seem to work fine now.
In case it helps development or someone:
https://github.com/nvdweem/obs-websocket-java
The method that @wurgo was using seems to work for this as well :).
I created a fork in which the Request and Response hierarchy has the request/responseData in the correct place in the json. I don't use many commands in my project but the ones I am using seem to work fine now. In case it helps development or someone: https://github.com/nvdweem/obs-websocket-java
The method that @wurgo was using seems to work for this as well :).
could you release it to jitpack or something?
could you release it to jitpack or something?
The message you quoted has the link to jitpack: https://jitpack.io/#nvdweem/obs-websocket-java/5.x.x~protocol_update-SNAPSHOT
could you release it to jitpack or something?
The message you quoted has the link to jitpack: https://jitpack.io/#nvdweem/obs-websocket-java/5.x.x~protocol_update-SNAPSHOT
sorry!!
What about opening a PR?
What about opening a PR?
I'd be ok with that but I haven't put in any effort to fix the testcases. @TinaTiel also mentioned that there was another branch on which a lot of things were already fixed so I have no idea how much of the work that I did was already done.
Fair enough ;)
@ChristopheCVB: I created a pull request.
I fixed the unit tests and from what I can tell, the automated e2e tests also pass (those showed that the close codes were incorrect which TinaTiel also mentioned to have fixed).
Problem is fixed in 2.0.0-SNAPSHOT