Hello - I tried today to add new features to a messaging server using Websocket I worked on a few weeks ago. At the time I was using Akka HTTP 10.1.2. The language to bind to an HTTP connection was
val binding = Http().bindAndHandle(route, "localhost", 8080)
taking in an implicit untyped ActorSystem
Since the change in versions, it’s now become
val binding = Http(system).newServerAt("localhost", 8080).bind(route)
system is a reference to a typed ActorSystem (I have two, I need one to spawn unmonitored actors).
This is all fine and good, but when I run it with the same route, my websocket server doesn’t connect. When I use websocat to smoke test, I get
[INFO websocat::ws_client_peer] get_ws_client_peer websocat: WebSocketError: I/O failure websocat: error running
I did some debugging, tried to make a simpler Websocket route, and it seems it doesn’t even invoke my websocket route. So I said “whatever, I will finish my feature, and file a ticket to upgrade Akka HTTP versions later”. Turns out I can’t do that, because https://repo1.maven.org/maven2/com/typesafe/akka/akka-http-core_2.13/ doesn’t contain the Akka HTTP version I used to build this a few weeks ago.
This really sucks, because now instead of developing I am stuck trying to figure out why something that worked fine a few weeks ago doesn’t work in a new version which is not even a major version, and I don’t even have the option to just not upgrade. The learning curve on Scala and Akka is steep enough without this.