small medium large xlarge

The latest version of the book is P1.0, released 8 months ago. If you've bought a PDF of the book and would like to update it to this version (for free), visit your home page.

By default this page displays the errata for the latest version of the book. If you have a previous version, select it here:

If you've found a new error, please submit it.

  • Typo
  • Tech. error
  • Suggestion
  • Maybe next edition
  • Not a problem
  • Reported in: P1.0 (14-Apr-20)
#86591
PDF page: Ch.4
"When we created our application, Phoenix generated an Ecto repository, called Rumble.Repo" Should be Rumbl without the 'e'. I'm on Kindle for M...more...
  • Reported in: P1.0 (26-Nov-19)
#86080
PDF page: L4557
In the "Setting Up Category Seed Data" section, a sample IEx session executes this command: ```elixir Rumbl.Repo.insert! %Rumbl.Multimedia.Category{...more...
  • Reported in: P1.0 (28-Apr-20)
#86668
PDF page: Ch.7
"The downside is that the upsert behavour..." I realize behavior is spelled differently in the UK/English etc, but I believe this should either be ...more...
  • Reported in: P1.0 (28-Apr-20)
#86669
PDF page: Ch.7
Again, on Kindle for Mac so exact location is tough but it's at 39%, or location 4739 of 12423. "Complex interactions, such as those between our mu...more...
  • Reported in: P1.0 (29-Dec-19)
#86197
Paper page: xv
Text: "OTP ‘GenServer‘s directly from the Elixir environment" Not sure what's with the left apostrophes. Was that meant to be backticks like `GenSe...more...
  • Reported in: P1.0 (20-Dec-19)
#86166
PDF page: 23
The output from mix phx.new is shown as: Fetch and install dependencies? [Yn] y * running mix deps.get * running mix deps.compile ... $ cd hell...more...
  • Reported in: B10.0 (28-Sep-19)
#85824
Paper page: 25

The word "Function" in the exception "UndefinedFunctionError" was missing a letter "c"--Jasmine Galang

  • Reported in: B10.0 (01-Oct-19)
#85832
PDF page: 26
The ebook the error complains: undefined function: HelloWeb.HelloView.render/2 (module HelloWeb.HelloView is not available) but in my termi...more...
  • Reported in: P1.0 (16-Jan-20)
#86263
Paper page: 26
If I'm understanding it correctly, the sentence, "We call the functions invoked by the router on our controller's actions, but don't get confused," sh...more...
  • Reported in: P1.0 (30-Oct-19)
#85949
PDF page: 47
At page 47, I run into a confusing part: Excerpt from the page With our user in place, let’s define our Accounts context. We will add a couple ...more...
  • Reported in: P1.0 (02-Mar-20)
#86392
PDF page: 51
***elixir Request: POST /sessions ** (exit) an exception was raised: ** (FunctionClauseError) no function clause matching in Strin...more...
  • Reported in: P1.0 (03-Dec-19)
#86104
PDF page: 55
Now, change your show.html.eex template to render it: <h1>Showing User</h1> <%= render "user.html", user: @user %> it must be : <%= render "use...more...
  • Reported in: P1.0 (02-Apr-20)
#86507
PDF page: 62
The link to Ecto.Migration API in the footnote is wrong. It should be "/ecto_sql/Ecto.Migration.html" instead of "ecto/Ecto.Migration.html".--vinicius...more...
  • Reported in: P1.0 (19-Dec-19)
#86163
Paper page: 63
not able to launch for .../users/new to get the desired output. Getting error message [debug] ** (Ecto.CastError) expected params to be a :map, got...more...
  • Reported in: P1.0 (19-Dec-19)
#86164
Paper page: 63
My earlier entry #86163 actually you need to use %{} in place of :empty in the default value for params in definition of changeset/2 in the web/mod...more...
  • Reported in: P1.0 (21-May-20)
#86748
PDF page: 65
Around this page you introduce a pattern in the code samples "path/accounts.change1.ex" and it is not clear if the reader should create this new file ...more...
  • Reported in: P1.0 (20-Dec-19)
#86165
PDF page: 68
The resources line used: resources "/users", UserController, only: [:index, :show, :new, :create] has a bug, since :show is before :new if you g...more...
  • Reported in: P1.0 (29-Apr-20)
#86672
PDF page: 80
"Then, our function delegates to the put_pass_hash function to compute and store the user hash in the database, like this:" I think this part is no...more...
  • Reported in: P1.0 (30-Apr-20)
#86682
PDF page: 94
In the first code listing on this page there is a call to ````Pbkdf2.no_user_verify() to prevent timing attacks. As documentation of this function ...more...
  • Reported in: P1.0 (03-Apr-20)
#86515
PDF page: 96
"[...] anyone would be able to find whether an email is registered on the website." should read "[...] anyone would be able to find whether a username...more...
  • Reported in: P1.0 (20-Oct-19)
#85897
PDF page: 99
"By passing the :method option to link, Phoenix generates a form tag instead of an anchor tag. Links without a specified HTTP method will default to G...more...
  • Reported in: P1.0 (28-Oct-19)
#85940
PDF page: 99
Paper page: 83
warning: function Rumbl.Accounts.User.registration_changeset/2 is undefined or private. Did you mean one of: * register_changeset/2 As the...more...
  • Reported in: P1.0 (20-Feb-20)
#86352
PDF page: 113

"We need to associate the video with the current user’s session" -> "We need to associate the video with the current session’s user"--Andrew Shearer

  • Reported in: P1.0 (19-Oct-19)
#85892
PDF page: 121
Paper page: 121
Not Found The requested URL /titles/phoenix14/code/relationships/listings/rumbl/priv/repo/migratio ƒ 80513030504_add_category_id_to_video.change1.e...more...
  • Reported in: P1.0 (24-Oct-19)
#85918
PDF page: 124
Typo in iex sample such that output doesn't match input: iex> Rumbl.Repo.insert! %Rumbl.Multimedia.Category{name: "Test"} %Rumbl.Multimedia.Catego...more...
  • Reported in: P1.0 (20-Feb-20)
#86353
PDF page: 137
"changeset error messages: Beautiful error messages for the consumption of humans." This is technically ambiguous: it may indicate error messages such...more...
  • Reported in: P1.0 (03-Mar-20)
#86396
Paper page: 139

'New User' view in the book has 4 fields.
I think that this view has 3 fields.
Thanks.--TORIFUKU Kaiou

  • Reported in: P1.0 (17-Mar-20)
#86453
PDF page: 139

The screenshot does not reflect the current state of the code as there's no email field.

  • Reported in: P1.0 (17-Mar-20)
#86452
PDF page: 141
Paper page: 125
Typo on "behaviour" in the before last sentence "The downside is that the upsert behavour is often database specific, so make sure to explore the diff...more...
  • Reported in: P1.0 (27-Jan-20)
#86277
PDF page: 144
Paper page: 128

double "in" :
"will go in in contexts"
--Ludovic Kuty

  • Reported in: P1.0 (20-Feb-20)
#86354
PDF page: 147
"test/rumbl/accounts/" and "test/rumbl/multimedia/" (two mentions in the same paragraph, the second asking the reader to delete them): these director...more...
  • Reported in: P1.0 (22-Oct-19)
#85907
PDF page: 147
In the part of the page: Whether you knew it or not, Phoenix has already been generating default tests for you, such as test/rumbl_web/controllers/...more...
  • Reported in: P1.0 (22-Oct-19)
#85908
PDF page: 148
For take the exactly same errors like: 3 tests, 1 failure. It was needed to delete the files: video_controller_test.exs and multimedia_test.exs. --R...more...
  • Reported in: P1.0 (22-Oct-19)
#85903
PDF page: 152
In a synopsis of 3 separate failing tests, the same test is listed twice (testing a password that's too short). The username uniqueness test isn't men...more...
  • Reported in: P1.0 (11-Dec-19)
#86143
PDF page: 153
> "We start by defining a new describe block on line 4 which..." This and all following line numbers are incorrect. > test "returns not found ...more...
  • Reported in: P1.0 (30-Mar-20)
#86498
PDF page: 153
Seeing the accounts_test.ex execution time, I think the book omitted to describe how to speed up password hashing, something like : # In config/tes...more...
  • Reported in: B10.0 (06-Oct-19)
#85841
Paper page: 154
There is "...having a hardcoded valid email and password..." in the first paragraph, but we using usernames instead of emails to identify the user. Al...more...
  • Reported in: P1.0 (05-Nov-19)
#85979
PDF page: 155
assert [%Video{id: ^id1}, %Video{id: ^id2}] = Multimedia.list_videos() AFAIK there's no guarantee that the rows will be returned in any specific or...more...
  • Reported in: P1.0 (16-Oct-19)
#85883
PDF page: 163
I could be just me, but I had great difficulty getting through this code. This forum post describes my prob. Perhaps it could be made clearer, I don't...more...
  • Reported in: P1.0 (23-Oct-19)
#85914
PDF page: 166
The link for download the source code redirects to the first Programming Phoenix book and not to the actual version 1.4 of the book. So the correct ...more...
  • Reported in: P1.0 (24-Nov-19)
#86063
PDF page: 167
The code doesn't run as written until the setup function is added. This must happen later in the book. The tests kept failing in the authenticate_us...more...
  • Reported in: B10.0 (26-Sep-19)
#85819
PDF page: 171
Paper page: 189
The mix test command on pdf shows 9 tests, but should actually be 6. On the previous page, the number of tests is 2, and 4 were added, leading 6. This...more...
  • Reported in: P1.0 (03-Mar-20)
#86398
Paper page: 172

The book shows '9 tests, 0 failures'.
I think that '6 tests, 0 failures' is correct.--TORIFUKU Kaiou

  • Reported in: P1.0 (17-Dec-19)
#86155
PDF page: 172
At this point there are only 6 tests in the file, but the book states on page 172: " Now let’s run our new tests: $ mix test test/rumbl_web/cont...more...
  • Reported in: P1.0 (04-Nov-19)
#85966
Paper page: 172
Page 172 contains copy regarding the length of time it takes to run the auth tests. I ran into slow tests by page 156 and was wondering if I'd screwe...more...
  • Reported in: P1.0 (20-Feb-20)
#86355
PDF page: 173

Remove line 25 of listing: "owner = %Rumbl.Accounts.User{}".
"owner" is unused, so this line generates a warning.--Andrew Shearer

  • Reported in: P1.0 (20-Feb-20)
#86356
PDF page: 182
"That way, external dependencies are never imported and available on the global JavaScript scope…". Ambiguous: "are never imported nor available" or "...more...
  • Reported in: P1.0 (20-Feb-20)
#86357
PDF page: 182

"you can add the -watch option" -> "you can add the --watch option" [double dash]--Andrew Shearer

  • Reported in: B9.0 (09-Oct-19)
#85856
PDF page: 183
Paper page: 165
In Part I, Chapter 8, the tests don't seem to have been updated to reflect changes made progressively to the Multimedia context. One example is on th...more...
  • Reported in: P1.0 (20-Feb-20)
#86358
PDF page: 186
The text appears contradictory on whether slugs can change after creation: "The whole premise of a slug is that you can automatically generate a perma...more...
  • Reported in: B9.0 (10-Oct-19)
#85859
PDF page: 187
Paper page: 169
In the "setup", I needed to also assign ":current_user" to "nil", not just implement "bypass_through", since the pipeline doesn't (yet) add that expec...more...
  • Reported in: B9.0 (10-Oct-19)
#85860
PDF page: 187
Paper page: 169
The solution I suggested in a previous erratum for this page involved the missing key :current_user on conn.assigns. That solution changed the test, ...more...
  • Reported in: P1.0 (21-Apr-20)
#86629
PDF page: 188

We really need to generate slugs for existing items in the db, e.g. in the migration--Russell T Eaves

  • Reported in: P1.0 (20-May-20)
#86742
PDF page: 188
Paper page: 172
Page 172 suggests adding 'config :pbkdf2_elixir, :rounds, 1' to 'rumbl/config/test.exs' to speed up the test suite. This should be suggested somewhere...more...
  • Reported in: P1.0 (11-Oct-19)
#85862
PDF page: 189
Paper page: 173

Variable "owner" is unused in the last test (line 25 in listing)--Pavel Abanichev

  • Reported in: P1.0 (31-Oct-19)
#85954
PDF page: 202
Maybe is the version different that I use but the log is different on my server output logs for this: [info] CONNECTED TO RumblWeb.UserSocket in 216µ...more...
  • Reported in: P1.0 (10-May-20)
#86715
PDF page: 205
Though it doesn't seem to impact the running of the app or the code, after adding the Permalink module, iex gives a couple of behaviour-related warnin...more...
  • Reported in: P1.0 (04-Jan-20)
#86223
PDF page: 205
Paper page: 190
As the code for Permalink is presented, cast("-1") will return :error while cast(-1) will return {:ok, -1}. I doubt this is the expected behaviour. Su...more...
  • Reported in: P1.0 (04-Nov-19)
#85971
PDF page: 206
When I try to do an Annotation I get this error on console: TypeError: msgContainer is null I copy and paste the cody and the error continues.. f...more...
  • Reported in: P1.0 (04-Nov-19)
#85972
PDF page: 206
Sorry it was an error of mine rather use id on msg-container I put class. And fixed when I change for the correct id tag. The previous mistake was m...more...
  • Reported in: B10.0 (29-Sep-19)
#85826
PDF page: 210
About programming the token in app.html.eex, the code needed to be added, namely: "<script type="text/javascript" src="<%= Routes.static_url(@conn, )...more...
  • Reported in: P1.0 (20-Feb-20)
#86359
PDF page: 215
The code in "channels/listings/rumbl/assets/js/video.change6.js" uses "this.scheduleTimer" on one line but "this.schedulerTimer" on the next line.--An...more...
  • Reported in: B9.0 (20-Aug-19)
#85704
PDF page: 217
The first line of the scheduleMessages function uses scheduleTimer instead of schedulerTimer: wrong: clearTimeout(this.scheduleTimer) right: cl...more...
  • Reported in: P1.0 (20-Feb-20)
#86360
PDF page: 223
"Later, as Phoenix improves, we’ll show a browser icon for browser tabs…": Does this refer to an upcoming Phoenix feature, and if so what? Or does it ...more...
  • Reported in: P1.0 (29-Oct-19)
#85946
PDF page: 223
The private function on pg 223 for the auth controller assigns the token with a key :user_token. However, where the token is used on the client side (...more...
  • Reported in: P1.0 (13-Nov-19)
#86005
PDF page: 238
I'm using the Phoenix version Phoenix v1.4.10 and the 'Copying the Web Source Files' it wasn't necessary to do. All was in the place.--Romenig L. Dama...more...
  • Reported in: P1.0 (13-Nov-19)
#86006
PDF page: 238

I do a mistake, sorry. It needs to copy!--Romenig L. Damasio

  • Reported in: P1.0 (18-Nov-19)
#86024
PDF page: 253
Paper page: 239

$ mix test

This command fails as the config/test.ex file was not updated, some users may not have postgres as a users. --E S

  • Reported in: P1.0 (20-Feb-20)
#86361
PDF page: 257

Minor inconsistency, which may or may not be intentional: One of the two start_link calls uses parens, while the other doesn't. --Andrew Shearer

  • Reported in: P1.0 (03-Mar-20)
#86397
Paper page: 281

The book shows '1 test, 0 failures'.
I think that '2 tests, 0 failures' is correct.--TORIFUKU Kaiou

  • Reported in: P1.0 (15-Dec-19)
#86151
Paper page: 282
IMHO the 4th unit test which stops and restarts the Infosys.Cache interferes with the other 3 unit tests of the "cache_test.exs" file. I guess the o...more...
  • Reported in: P1.0 (20-Feb-20)
#86362
PDF page: 287
testing_otp/listings/rumbl_umbrella/apps/info_sys/test/backends/wolfram_test.exs In test "no query results reports an empty list", append "= []" to t...more...
  • Reported in: P1.0 (30-Nov-19)
#86091
PDF page: 293
In the parte before to test has: "Then we assert the socket has a user_id assigned and the join reply contains the previously creatrd annotations." ...more...
  • Reported in: P1.0 (30-Nov-19)
#86092
PDF page: 293
Sorry but if I try the test again sometimes the mix complains for this: mix test apps/rumbl_web/test/channels/video_channel_test.exs ==> rumbl_web ...more...
  • Reported in: P1.0 (03-Mar-20)
#86399
Paper page: 293
The book shows "Then we asset the socket has a user_id assigned and the join reply contains the previously 'creatrd' annotations". I think that 'crea...more...
  • Reported in: P1.0 (20-Feb-20)
#86363
PDF page: 295

"new annotations triggers InfoSys" -> "new annotation triggers InfoSys"--Andrew Shearer

  • Reported in: B9.0 (31-Jul-19)
#85642
Paper page: 295
the mix test command at the bottom of the page intermittently produces an error: mix test test/rumbl_web/channels/video_channel_test.exs . Fini...more...
José Valim says: Good catch! Basically the Presence wants to query the DB and send updates but the test has shut down and there are no database connections. To fix this consistently, we would need to query the presence supervisor and ask all of its children to shutdown at the end of each test. But to do so, we will need to add a new API to Phoenix. If you can open up an issue in Phoenix issues tracker, it would be extra helpful. Thank you!
  • Reported in: P1.0 (23-Nov-19)
#86041
PDF page: 300
Paper page: 287
Instead of loading the stubbed HTTP client in ```test_helper.exs, I'd suggest adding it to test/support/http_client.ex and adding the test/support to ...more...
  • Reported in: P1.0 (29-Jan-20)
#86278
PDF page: 304

"Now, you can get a better look at how we’ll encorporate changing state in the LiveView"

"encorporate" should be "incorporate"--Ludovic Kuty

  • Reported in: P1.0 (24-Nov-19)
#86065
PDF page: 320
Paper page: 307
The page ends with "Typically, the handle_event will update the state in some way, but it doesn’t have to. Let’s take a look at a third use case, comm...more...

Stuff To Be Considered in the Next Edition

  • Reported in: B9.0 (07-Aug-19)
#85659
PDF page: 188
On p.188 (of the PDF) the instruction is to create a param.ex file with a protocol implementation of to_param I followed the instructions verbatim an...more...