aesmail / kaffy

Powerfully simple admin package for phoenix applications
https://kaffy.fly.dev/admin/
MIT License
1.3k stars 153 forks source link

[BUG] (UndefinedFunctionError) function :ping_erlang.__info__/1 is undefined or private #299

Open Mirk32 opened 9 months ago

Mirk32 commented 9 months ago

Versions Used Kaffy: 0.10.0 Phoenix: 1.7 Elixir: 1.15.5-otp-26 Erlang: 26.0.2

On admin page loading get following error - (UndefinedFunctionError) function :ping_erlang.info/1 is undefined or private

Fixed locally by manual patching the method deps/kaffy/lib/kaffy/utils.ex - get_schemas method with following code -

  defp get_schemas(mods) do
    Enum.filter(mods, fn m ->
      if m == :ping_erlang do
        false
      else
        functions = m.__info__(:functions)
        Keyword.has_key?(functions, :__schema__) && Map.has_key?(m.__struct__, :__meta__)
      end
    end)
  end

Admin page should be displayed

Screenshots

image
aesmail commented 9 months ago

@Mirk32 thank you for reporting the issue. Just released Kaffy v0.10.1 with a fix for the issue.

aesmail commented 9 months ago

acted too quickly. the fix made Kaffy ignore all admin modules. already released v0.10.2 to revert the change. will look into this further.