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

Install in existing Liveview app #703

Open
dantodor opened this issue Dec 12, 2024 · 1 comment
Open

Install in existing Liveview app #703

dantodor opened this issue Dec 12, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@dantodor
Copy link

Environment

  • Elixir version (elixir -v): 1.17.3
  • Phoenix version (mix deps): 1.7.14
  • Phoenix LiveView version (mix deps): 0.20.17
  • Beacon version (mix deps): 0.3.2
  • Operating system: OSX
  • Browsers on which you attempted to reproduce this bug (the more the merrier): Chrome latest

Actual behavior

I am trying to install beacon into an existing app via igniter, as advised in the docs.
After running the mix igniter command, I found several issues.
Non-blocker, the config

  insights: [site: :insights, repo: Nui.Repo, endpoint: NuiWeb.Endpoint, router: NuiWeb.Router]

Is added only to the runtime.exs. Fixed by copying it to dev.exs.
Now I can access the default setup for Beacon, which is great.
When I try to access the admin section though, I get an empty page, and this message in the console.

[debug] ** (Phoenix.Router.NoRouteError) no route found for GET /__beacon_live_admin__/assets/beacon_live_admin.min.css.map (NuiWeb.Router)
    (nui 0.1.0) deps/phoenix/lib/phoenix/router.ex:541: NuiWeb.Router.call/2
    (nui 0.1.0) lib/nui_web/endpoint.ex:1: NuiWeb.Endpoint.plug_builder_call/2
    (nui 0.1.0) deps/plug/lib/plug/debugger.ex:136: NuiWeb.Endpoint."call (overridable 3)"/2
    (nui 0.1.0) lib/nui_web/endpoint.ex:1: NuiWeb.Endpoint.call/2
    (phoenix 1.7.14) lib/phoenix/endpoint/sync_code_reload_plug.ex:22: Phoenix.Endpoint.SyncCodeReloadPlug.do_call/4
    (bandit 1.5.7) lib/bandit/pipeline.ex:124: Bandit.Pipeline.call_plug!/2
    (bandit 1.5.7) lib/bandit/pipeline.ex:36: Bandit.Pipeline.run/4
    (bandit 1.5.7) lib/bandit/http1/handler.ex:12: Bandit.HTTP1.Handler.handle_data/3
    (bandit 1.5.7) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3
    (bandit 1.5.7) /Users/dantodor/work/alphablock/nui/deps/thousand_island/lib/thousand_island/handler.ex:379: Bandit.DelegatingHandler.handle_info/2
    (stdlib 6.1.1) gen_server.erl:2345: :gen_server.try_handle_info/3
    (stdlib 6.1.1) gen_server.erl:2433: :gen_server.handle_msg/6
    (stdlib 6.1.1) proc_lib.erl:329: :proc_lib.init_p_do_apply/3

What am I doing wrong?

Expected behavior

Expect to be able to get to the admin page

@dantodor dantodor added the bug Something isn't working label Dec 12, 2024
@APB9785
Copy link
Contributor

APB9785 commented Jan 3, 2025

Hi @dantodor, thanks for trying Beacon! The debug message you shared is unrelated to your issue. That message says the css file didn't load, but your issue is that beacon_live_admin isn't connected to any beacon site(s). Did you use the command

mix beacon.gen.site --site my_site --path /

to generate the site(s)? Or have you set up the Beacon site(s) manually? Any additional details you can provide would be helpful troubleshooting the issue, maybe even paste the Beacon.Config you are using.

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