Skip to content

Error in mix mob.connect #21

@andyl

Description

@andyl

Dev Host: Xubuntu 24.04 w/ Android Phone connected via USB. I was able to get the demo app running on my phone, but ran into a glitch with mix mob.connect. The workaround is iex -S mix mob.connect --no-iex. (see CLI transcript below).

Claude says:

This is a bug in mob_dev/lib/mix/tasks/mob.connect.ex:163: it calls IEx.Server.run([]) directly without first starting the :iex application, so IEx.Broker (which the :iex app supervises) doesn't exist when IEx.Server.run/1 tries to register with it. The comment at line 161-162 confirms the author already knew Elixir 1.20-rc.4 removed the old IEx.start/0 — they just didn't realize the new entrypoint requires :iex to be started first.

Here's the CLI Transcript.

myself@myhost ~/zz/riga|> mix mob.connect

Scanning for devices...

  Android
  ├── SM-A176B  R5GYB16C3JB  found

  SM-A176B  →  tunneling...  ✓
  Restarting app on R5GYB16C3JB... done

  Waiting for nodes...
  riga_android_r5gyb16c3jb@127.0.0.1 ...  ✓

Connected cluster (1 node(s)):
  ✓ riga_android_r5gyb16c3jb@127.0.0.1  [port 9100]

Starting IEx (connected to 1 device(s))...
  Node.list()       — see connected nodes
  nl(MyModule)      — hot-push code to all nodes

** (exit) exited in: GenServer.call(IEx.Broker, {:register, #PID<0.95.0>}, 5000)
    ** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
    (elixir 1.20.0-rc.5) lib/gen_server.ex:1176: GenServer.call/3
    (iex 1.20.0-rc.5) lib/iex/server.ex:49: IEx.Server.run/1
    (mix 1.20.0-rc.5) lib/mix/task.ex:502: anonymous fn/3 in Mix.Task.run_task/5
    (mix 1.20.0-rc.5) lib/mix/cli.ex:129: Mix.CLI.run_task/2
    /home/myself/.asdf/installs/elixir/1.20.0-rc.5-otp-29/bin/mix:7: (file)


myself@myhost ~/zz/riga|> iex -S mix mob.connect --no-iex
Erlang/OTP 29 [erts-17.0] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit:ns]


Scanning for devices...

  Android
  ├── SM-A176B  R5GYB16C3JB  found

  SM-A176B  →  tunneling...  ✓
  Restarting app on R5GYB16C3JB... done

  Waiting for nodes...
  riga_android_r5gyb16c3jb@127.0.0.1 ...  ✓

Connected cluster (1 node(s)):
  ✓ riga_android_r5gyb16c3jb@127.0.0.1  [port 9100]

Nodes ready:
  riga_android_r5gyb16c3jb@127.0.0.1
Interactive Elixir (1.20.0-rc.5) - press Ctrl+C to exit (type h() ENTER for help)
----- GLOBAL IEX

iex(mob_dev@127.0.0.1)1> x = 1
1
iex(mob_dev@127.0.0.1)2>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions