# Real Time Phoenix Errata P17: Getting first sample working with Phoenix 1.6.x

**URL:** <https://forum.devtalk.com/t/real-time-phoenix-errata-p17-getting-first-sample-working-with-phoenix-1-6-x/40966>\
**Category:** PragProg Customers\
**Tags:** book-real-time-phoenix, errata\
**Created:** [17 February 2022 01:24 UTC](https://forum.devtalk.com/t/real-time-phoenix-errata-p17-getting-first-sample-working-with-phoenix-1-6-x/40966 "2022-02-17T01:24:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![creminology](https://forum.devtalk.com/letter_avatar_proxy/v4/letter/c/e47774/32.png) [@creminology](https://forum.devtalk.com/u/creminology)\
**Post date:** [17 February 2022 01:24 UTC](https://forum.devtalk.com/t/real-time-phoenix-errata-p17-getting-first-sample-working-with-phoenix-1-6-x/40966/1 "2022-02-17T01:24:58Z")

</div>

Skimming ahead, much of the following is explained in Chapter 3, but new readers (like me!) will hit a roadblock in Chapter 2 with their first app not working without making some changes under the latest versions of Phoenix.

```auto
mix phx.new hello_sockets --no-ecto --no-live --no-dashboard --no-mailer
cd hello_sockets
mix phx.gen.channel Ping

```

Permit the generator to create the default socket handler, and follow the instructions to add it to the `HelloSocketsWeb.Endpoint` module. Also follow the instructions to import `user_socket.js` by uncommenting the line in `assets/js/app.js`.

Inside `assets/js/user.socket.js`, change the name of the channel being joined from “room:42” to “ping”.

Inside `HelloSocketsWeb.PingChannel`, change the first parameter of `join/3` from “ping:lobby” to “ping”.

Inside `HelloSocketsWeb.PingChannel`, change the channel named “ping:\*” to “ping”

In another thread, the author suggests pinning the version of Elixir and Phoenix so as to match the book. But I think it’s important that readers have confidence that they can immediately apply what they learn from this book in their own projects using the latest version of Phoenix.

I took the decision to add the “–no-live” flag when creating the Phoenix app in case having LiveView integrated made things more confusing. In previous versions of Phoenix, one had to explicitly add LiveView; now it comes as a default without the flag.

---

<div class="post-metadata">

**Author:** ![sb8244](https://forum.devtalk.com/user_avatar/forum.devtalk.com/sb8244/32/209_2.png) [@sb8244](https://forum.devtalk.com/u/sb8244)\
**Post date:** [17 February 2022 18:08 UTC](https://forum.devtalk.com/t/real-time-phoenix-errata-p17-getting-first-sample-working-with-phoenix-1-6-x/40966/2 "2022-02-17T18:08:10Z")

</div>

I appreciate this report, and it will definitely be addressed in the next update (although I’m not sure when that will be).

Pinning the version is great for people that just want to work through the content, because 99.8% of it hasn’t changed. But I do agree that using the latest version is generally “best” if the user can handle the warnings / upgrade path.

Few thoughts on differences that I know off the top:

- PubSub 2.0 breaking changes regarding PubSub creation
- Test warnings due to `use ChannelCase` instead of `import ChannelCase`
- Generators have changed significantly as LiveView has progressed

I’d love to collect additional breaking changes that cause the book to not compile / work as expected.

---

<div class="post-metadata">

**Author:** ![creminology](https://forum.devtalk.com/letter_avatar_proxy/v4/letter/c/e47774/32.png) [@creminology](https://forum.devtalk.com/u/creminology)\
**Post date:** [17 February 2022 23:45 UTC](https://forum.devtalk.com/t/real-time-phoenix-errata-p17-getting-first-sample-working-with-phoenix-1-6-x/40966/3 "2022-02-17T23:45:17Z")

</div>

I think it would be great if you could persuade PragProg to let you publish a Github repository of the code; ideally the original code with the commits to make it compatible with Phoenix 1.6.x.

The link to the zipped code repository is on their book page so it’s not as if it’s hidden from non-purchasers. Perhaps they didn’t want to deal with readers posting issues directly to Github.

I do think the book needs some kind of statement or sidebar about why it still has value even in a world where everyone seems to be adopting LiveView. Even if LiveView is introduced later!

One key reason I picked up the book again, which I bought in September 2019, is that I noticed you were still engaging with readers on this forum. So I do appreciate your feedback.

---

<div class="post-metadata">

**Author:** ![creminology](https://forum.devtalk.com/letter_avatar_proxy/v4/letter/c/e47774/32.png) [@creminology](https://forum.devtalk.com/u/creminology)\
**Post date:** [17 February 2022 23:59 UTC](https://forum.devtalk.com/t/real-time-phoenix-errata-p17-getting-first-sample-working-with-phoenix-1-6-x/40966/4 "2022-02-17T23:59:45Z")

</div>

Replying to myself, if there was an update to the book, I think it would be great if you could extend Part IV with guest-written chapters on how to connect it to other frontends such as Flutter, iOS and Javascript frameworks other than React.

For example, perhaps Paul Hollyer who maintains the [elm-phoenix-websocket](https://github.com/phollyer/elm-phoenix-websocket/) library, would be up for writing an Elm chapter. The fact that he recently released v4 was another reason I picked up your book again.

It’s not that these additional chapters would necessarily add knowledge on using Phoenix for real-time that isn’t already in your book, but they may introduce experiences and strategies more suited to their specific domains.

Anyway. Thanks again for the book.

---

<div class="post-metadata">

**Author:** ![sb8244](https://forum.devtalk.com/user_avatar/forum.devtalk.com/sb8244/32/209_2.png) [@sb8244](https://forum.devtalk.com/u/sb8244)\
**Post date:** [25 February 2022 18:35 UTC](https://forum.devtalk.com/t/real-time-phoenix-errata-p17-getting-first-sample-working-with-phoenix-1-6-x/40966/5 "2022-02-25T18:35:26Z")

</div>

> [@creminology](#):
>
> I think it would be great if you could persuade PragProg to let you publish a Github repository of the code; ideally the original code with the commits to make it compatible with Phoenix 1.6.x.

This is a great idea. I will send them an email asking about the process for this.

---

<div class="post-metadata">

**Author:** ![VAK](https://forum.devtalk.com/letter_avatar_proxy/v4/letter/v/e95f7d/32.png) [@VAK](https://forum.devtalk.com/u/VAK)\
**Post date:** [8 December 2022 12:49 UTC](https://forum.devtalk.com/t/real-time-phoenix-errata-p17-getting-first-sample-working-with-phoenix-1-6-x/40966/6 "2022-12-08T12:49:23Z")

</div>

Slight correction. I think we should change the  
" Inside `HelloSocketsWeb.PingChannel`, change the first parameter of `join/3` from “ping:lobby” to “ping”"  
to  
" Inside `HelloSocketsWeb.UserSocket`, change the channel named “ping:\*” to “ping”".
