Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Mirk32 opened this issue Oct 9, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@Mirk32
Copy link

Mirk32 commented Oct 9, 2023

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

@Mirk32 Mirk32 added the bug Something isn't working label Oct 9, 2023
@aesmail
Copy link
Owner

aesmail commented Oct 9, 2023

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

@aesmail aesmail closed this as completed Oct 9, 2023
@aesmail aesmail reopened this Oct 9, 2023
@aesmail
Copy link
Owner

aesmail commented Oct 9, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants