mix deps.get fails when using nerves-web-kiosk/kiosk_system_rpi4

When trying to do a mix deps.get in a freshly cloned copy of github nerves-web-kiosk/kiosk_system_rpi4. I get the following failure.

20:52:03.598 [error] GenServer #PID<0.306.0> terminating
** (FunctionClauseError) no function clause matching in Nerves.Utils.HTTPClient.handle_info/2
    (nerves 1.5.1) lib/nerves/utils/http_client.ex:81: Nerves.Utils.HTTPClient.handle_info({:http, {#Reference<0.1639108394.1962409985.197879>, {:error, :socket_closed_remotely}}}, %{buffer: "", buffer_size: 0, caller: {#PID<0.94.0>, #Reference<0.1639108394.1962409985.197862>}, content_length: 0, filename: "", number_of_redirects: 1, opts: [stream: :self, receiver: #PID<0.306.0>, sync: false], progress?: true, url: "https://github-releases.githubusercontent.com/63556949/7a2c2400-85ec-11e9-8c20-70a3c2696d5d?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20211125%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20211125T204203Z&X-Amz-Expires=300&X-Amz-Signature=b05b3e0ee5ac6a968b37309d712c36e61e0d8e977966f0ee2e28c8ae38753703&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=63556949&response-content-disposition=attachment%3B%20filename%3Dnerves_toolchain_arm_unknown_linux_gnueabihf-linux_x86_64-1.2.0-EDC6266.tar.xz&response-content-type=application%2Foctet-stream"})
    (stdlib 3.16.1) gen_server.erl:695: :gen_server.try_dispatch/4
    (stdlib 3.16.1) gen_server.erl:771: :gen_server.handle_msg/6
    (stdlib 3.16.1) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Last message: {:http, {#Reference<0.1639108394.1962409985.197879>, {:error, :socket_closed_remotely}}}
State: %{buffer: "", buffer_size: 0, caller: {#PID<0.94.0>, #Reference<0.1639108394.1962409985.197862>}, content_length: 0, filename: "", number_of_redirects: 1, opts: [stream: :self, receiver: #PID<0.306.0>, sync: false], progress?: true, url: "https://github-releases.githubusercontent.com/63556949/7a2c2400-85ec-11e9-8c20-70a3c2696d5d?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20211125%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20211125T204203Z&X-Amz-Expires=300&X-Amz-Signature=b05b3e0ee5ac6a968b37309d712c36e61e0d8e977966f0ee2e28c8ae38753703&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=63556949&response-content-disposition=attachment%3B%20filename%3Dnerves_toolchain_arm_unknown_linux_gnueabihf-linux_x86_64-1.2.0-EDC6266.tar.xz&response-content-type=application%2Foctet-stream"}
** (EXIT from #PID<0.94.0>) an exception was raised:
    ** (FunctionClauseError) no function clause matching in Nerves.Utils.HTTPClient.handle_info/2
        (nerves 1.5.1) lib/nerves/utils/http_client.ex:81: Nerves.Utils.HTTPClient.handle_info({:http, {#Reference<0.1639108394.1962409985.197879>, {:error, :socket_closed_remotely}}}, %{buffer: "", buffer_size: 0, caller: {#PID<0.94.0>, #Reference<0.1639108394.1962409985.197862>}, content_length: 0, filename: "", number_of_redirects: 1, opts: [stream: :self, receiver: #PID<0.306.0>, sync: false], progress?: true, url: "https://github-releases.githubusercontent.com/63556949/7a2c2400-85ec-11e9-8c20-70a3c2696d5d?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20211125%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20211125T204203Z&X-Amz-Expires=300&X-Amz-Signature=b05b3e0ee5ac6a968b37309d712c36e61e0d8e977966f0ee2e28c8ae38753703&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=63556949&response-content-disposition=attachment%3B%20filename%3Dnerves_toolchain_arm_unknown_linux_gnueabihf-linux_x86_64-1.2.0-EDC6266.tar.xz&response-content-type=application%2Foctet-stream"})
        (stdlib 3.16.1) gen_server.erl:695: :gen_server.try_dispatch/4
        (stdlib 3.16.1) gen_server.erl:771: :gen_server.handle_msg/6
        (stdlib 3.16.1) proc_lib.erl:226: :proc_lib.init_p_do_apply/3

I am complete newbie to nerves so I have no idea how to go about resolving this. My host system is Ubuntu 21.10.

Any help will be greatly appreciated.

try this: Browser in Nerves (kiosk-mode) - #10 by Sebb

Thanks @Sepp that gave me some more pointers.

The instructions in the README for the kiosk_system_rpi4 contain the following.

The most common way of using this Nerves System is create a project with mix nerves.new and to export MIX_TARGET=rpi4. See the Getting started guide for more information.

I realise now that this is misleading to a newbie like me. Having cloned the repo I took a guess and ran mix nerves.new in root of my cloned repo. This is obviously incorrect as that just creates an empty nerves project. I realise now the repo itself is an already created nerves project. So I tried running mix deps.get in the root of my repo. This gave this error.

======================================
Resolving Hex dependencies…
Dependency resolution completed:
Unchanged:
earmark_parser 1.4.17
elixir_make 0.6.3
ex_doc 0.26.0
makeup 1.0.5
makeup_elixir 0.15.2
makeup_erlang 0.1.1
nerves 1.7.12
nerves_system_br 1.9.1
nerves_system_linter 0.3.0
nerves_toolchain_arm_unknown_linux_gnueabihf 1.2.0
nerves_toolchain_ctng 1.6.0
nimble_parsec 1.2.0
All dependencies are up to date

Nerves environment
MIX_TARGET: target
MIX_ENV: dev

==> nerves
==> kiosk_system_rpi4
Resolving Nerves artifacts…
Resolving kiosk_system_rpi4
=> Trying https://github.com/nerves-project/kiosk_system_rpi4/releases/download/v1.8.2/kiosk_system_rpi4-portable-1.8.2-4489533.tar.gz

10:26:17.219 [warn] Description: ‘Authenticity is not established by certificate path validation’
Reason: ‘Option {verify, verify_peer} and cacertfile/cacerts is missing’

 Status 404 Not Found                                                                                 

=> Trying https://github.com/nerves-project/kiosk_system_rpi4/releases/download/v1.8.2/kiosk_system_rpi4-portable-1.8.2-448953331EB7DC0EEFCB57351D1F199F2984DC770AF4E224BFBEA3F73E228D48.tar.gz
Status 404 Not Found
=> no_result
Cached nerves_toolchain_arm_unknown_linux_gnueabihf

The next thing I tried was running mix deps.get in the example subdirectory. This gave me this error.

===================================
Resolving Hex dependencies…
Dependency resolution completed:
Unchanged:
circular_buffer 0.4.0
dns 2.3.0
elixir_make 0.6.3
mdns 1.0.12
muontrap 1.0.0
nerves 1.5.5
nerves_firmware_ssh 0.4.6
nerves_init_gadget 0.7.0
nerves_network 0.5.5
nerves_network_interface 0.4.6
nerves_runtime 0.11.8
nerves_system_br 1.9.1
nerves_system_linter 0.3.0
nerves_time 0.4.4
nerves_toolchain_arm_unknown_linux_gnueabihf 1.2.0
nerves_toolchain_ctng 1.6.0
nerves_wpa_supplicant 0.5.2
one_dhcpd 0.2.5
ring_logger 0.8.2
shoehorn 0.8.0
socket 0.3.13
system_registry 0.8.2
toolshed 0.2.25
uboot_env 1.0.0

Nerves environment
MIX_TARGET: host
MIX_ENV: dev

Unchecked dependencies for environment dev:

  • webengine_kiosk (~/dev/fhunleth/webengine_kiosk)
    the dependency is not available
    ** (Mix) Can’t continue due to errors on dependencies
    =================================

So I am guessing that I have got to work out where these resources really are. Then move out of the cloned repo and do a mix create.new somewhere else. Then using the two mix.exs files in the repo as examples create my own mix.exs file thay points to the right locations.

Am I on the right track now?

Can anyone give me a hint about what these dependency urls should be?

Roger

You have to use the kiosk-system as dependency in a project you created with mix nerves.new, You should not have a dependency to another system. You need a compatible Erlang/Elixir version installed. Or: just rpeeat the steps I linked.