nighthawk-apps / zcash-explorer

Zcash Block Explorer
https://zcashblockexplorer.com
Apache License 2.0
17 stars 19 forks source link

(FunctionClauseError) no function clause matching #32

Open fabricemrchl opened 1 year ago

fabricemrchl commented 1 year ago

Describe the bug Internal server error on all request to self hosted instance.

To Reproduce Steps to reproduce the behavior:

  1. Build docker image based on "Dockerfile" in main branch
  2. Run it
  3. Go to home page

Expected behavior Display explorer

Screenshots Error in log : Request: GET / ** (exit) an exception was raised: ** (FunctionClauseError) no function clause matching in anonymous fn/1 in ZcashExplorerWeb.OrchardPoolLive.get_value_pools/1 (zcash_explorer 0.1.0) lib/zcash_explorer_web/live/orchard_pool_live.ex:42: anonymous fn(%{"id" => "transparent", "monitored" => false}) in ZcashExplorerWeb.OrchardPoolLive.get_value_pools/1 (elixir 1.14.4) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2 (zcash_explorer 0.1.0) lib/zcash_explorer_web/live/orchard_pool_live.ex:42: ZcashExplorerWeb.OrchardPoolLive.get_value_pools/1 (zcash_explorer 0.1.0) lib/zcash_explorer_web/live/orchard_pool_live.ex:38: ZcashExplorerWeb.OrchardPoolLive.orchard_value/1 (zcash_explorer 0.1.0) lib/zcash_explorer_web/live/orchard_pool_live.ex:8: anonymous fn/2 in ZcashExplorerWeb.OrchardPoolLive.render/1 (phoenix_live_view 0.17.11) lib/phoenix_live_view/diff.ex:387: Phoenix.LiveView.Diff.traverse/7 (phoenix_live_view 0.17.11) lib/phoenix_live_view/diff.ex:494: anonymous fn/4 in Phoenix.LiveView.Diff.traverse_dynamic/7 (elixir 1.14.4) lib/enum.ex:2468: Enum."-reduce/3-lists^foldl/2-0-"/3

Additional context Zcash node 5.4.2 from dockerhub "electriccoinco/zcashd" Dockerfile seems deprecated I had to change IMAGES to get latest version and succeed to build it.

FROM elixir:1.12.2-alpine AS build
replaced by
FROM elixir:1.14-alpine AS build

and

FROM alpine:3.14 AS app
replaced by
FROM alpine:3.17 AS app
fabricemrchl commented 1 year ago

More information, pages "blocks" and "nodes" are working fine. Issue seems related to "Orchard Pool" counter widget in home page.