Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read RpcRequest: unknown case: RPCCall #445

Closed
mrksmb opened this issue Nov 5, 2019 · 3 comments
Closed

Cannot read RpcRequest: unknown case: RPCCall #445

mrksmb opened this issue Nov 5, 2019 · 3 comments
Assignees
Labels

Comments

@mrksmb
Copy link

mrksmb commented Nov 5, 2019

Getting the following error after running:

sbt new UdashFramework/udash.g8 sbt compileStatics run

and pointing the browser to http://localhost:8080/ :

09:06:52.313 [qtp1137752618-86] ERROR io.udash.rpc.AtmosphereService - Error occurred while handling websocket data. com.avsystem.commons.serialization.GenCodec$UnknownCase: Cannot read io.udash.rpc.RpcRequest, unknown case: RPCCall at com.avsystem.commons.serialization.ErrorReportingCodec.unknownCase(macroCodecs.scala:308) at com.avsystem.commons.serialization.NestedSealedHierarchyCodec.readObject(macroCodecs.scala:151) at com.avsystem.commons.serialization.GenCodec$ObjectCodec.readNonNull(GenCodec.scala:291) at com.avsystem.commons.serialization.GenCodec$ObjectCodec.readNonNull$(GenCodec.scala:289) at com.avsystem.commons.serialization.SealedHierarchyCodec.readNonNull(macroCodecs.scala:113) at com.avsystem.commons.serialization.GenCodec$NullSafeCodec.read(GenCodec.scala:244) at com.avsystem.commons.serialization.GenCodec$NullSafeCodec.read$(GenCodec.scala:241) at com.avsystem.commons.serialization.SealedHierarchyCodec.read(macroCodecs.scala:113) at com.avsystem.commons.serialization.GenCodec$.read(GenCodec.scala:93) at com.avsystem.commons.serialization.json.JsonStringInput$.read(JsonStringInput.scala:14) at io.udash.rpc.AtmosphereService.readRequest(AtmosphereService.scala:196) at io.udash.rpc.AtmosphereService.handleRequest(AtmosphereService.scala:122) at io.udash.rpc.AtmosphereService.onWebsocketRequest(AtmosphereService.scala:84) at io.udash.rpc.AtmosphereService.onRequest(AtmosphereService.scala:64) at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:225)

Java version 1.8.0_221, accepted defaults during project setup.

@mrksmb mrksmb changed the title Cannot read RPCRequest: unknown Case: RPCCall Cannot read RpcRequest: unknown Case: RPCCall Nov 5, 2019
@mrksmb mrksmb changed the title Cannot read RpcRequest: unknown Case: RPCCall Cannot read RpcRequest: unknown case: RPCCall Nov 5, 2019
@ddworak
Copy link
Member

ddworak commented Nov 5, 2019

@mrksmb I've just run:

sbt new UdashFramework/udash.g8

then:

sbt compileStatics run

on a clean directory with Ubuntu 19.04 and openjdk version "1.8.0_222" - it all seems to work fine here.

Can you upload a minimal project somewhere?

Please also make sure to check without browser cache or in incognito mode. The exception you're getting looks like a mismatch between an older version of Udash on the frontend and a newer one on the backend.

@ddworak ddworak self-assigned this Nov 5, 2019
@mrksmb
Copy link
Author

mrksmb commented Nov 14, 2019

@ddworak sorry for the delay. Clearing the browser cache / using incognito mode resolved the issue. I had used the previous Udash version in my browser several months ago which has probably caused the problem.

Is there a simiple way to add versioning to the files in the browser cache which caused this issue? That might make it smoother for other developers who upgrade to a new version in the future. Thank you!

@ddworak
Copy link
Member

ddworak commented Nov 14, 2019

@mrksmb one way to do it would be the Cache-Control headers. Adding an issue for introducing an example to the template #451

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants