play-samples icon indicating copy to clipboard operation
play-samples copied to clipboard

Unexpected exception for play-java-websocket example

Open kelly-xuxixi opened this issue 6 years ago • 6 comments
trafficstars

Hi,

I encountered this problem when trying to render localhost:9000 image

I'm using java version "12.0.1" and sbt 1.2.8

Thanks!

kelly-xuxixi avatar May 31 '19 22:05 kelly-xuxixi

Hey @kelly-xuxixi. This is https://github.com/playframework/play-scala-websocket-example/issues/93 and the workaround is installing Node.JS (e.g. version 10).

dwijnand avatar Jun 03 '19 08:06 dwijnand

Can this be closed then?

octonato avatar Jun 03 '19 08:06 octonato

No, it's an unresolved issue.

dwijnand avatar Jun 03 '19 08:06 dwijnand

@dwijnand Thanks. The problem is fixed after installing node.js

kelly-xuxixi avatar Jun 03 '19 17:06 kelly-xuxixi

Yeah, I think the correct fix is to:

  1. Drop Trireme support in js-engine and release a new version that only supports node (since Trireme does not support a modern version of node) with a clear error message if node command is not found.
  2. Update sbt-js-engine to use this release of js-engine.
  3. Update sbt-web plugins that depend on sbt-js-engine to use the new release of sbt-js-engine.
  4. Update our samples to use the version of such plugins.

Well, at least this maps the work that needs to be done to fix this for good. For now, the workaround is to install node.

marcospereira avatar Jun 04 '19 22:06 marcospereira

I just encountered this issue as well (commit 2183783f0a0b5c1d6774270e7819cc05b16e45f6)

If the aim of this example is to help non-experts understand how to do something interesting with webSockets, perhaps it would make sense to reduce the complexity of the example using vanilla js rather than coffeescript?

cgled avatar Dec 07 '19 13:12 cgled