Closed lucavenir closed 6 months ago
This looks like an issue that was introduced with Bandit 1.5.1. In the meantime, you can set bandit was {:bandit, "1.5.0"}
. Thanks for the report! We'll coordinate on the bandit side to get this fixed up.
Thank you - I did not realize there was a bandit
upgrade. Could I ask how I could have noticed this one by myself and prevented the "spam" in here?
Hold on, my mix.exs
file contains the following dependencies:
defmodule Hello.MixProject do
use Mix.Project
def project do
[
app: :hello,
version: "0.1.0",
elixir: "~> 1.14",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: deps()
]
end
# Configuration for the OTP application.
#
# Type `mix help compile.app` for more information.
def application do
[
mod: {Hello.Application, []},
extra_applications: [:logger, :runtime_tools]
]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
# Specifies your project dependencies.
#
# Type `mix help deps` for examples and options.
defp deps do
[
{:phoenix, "~> 1.7.12"},
{:phoenix_ecto, "~> 4.4"},
{:ecto_sql, "~> 3.10"},
{:postgrex, ">= 0.0.0"},
{:phoenix_html, "~> 4.0"},
{:phoenix_live_reload, "~> 1.2", only: :dev},
{:phoenix_live_view, "~> 0.20.2"},
{:floki, ">= 0.30.0", only: :test},
{:phoenix_live_dashboard, "~> 0.8.3"},
{:esbuild, "~> 0.8", runtime: Mix.env() == :dev},
{:tailwind, "~> 0.2", runtime: Mix.env() == :dev},
{:heroicons,
github: "tailwindlabs/heroicons",
tag: "v2.1.1",
sparse: "optimized",
app: false,
compile: false,
depth: 1},
{:swoosh, "~> 1.5"},
{:finch, "~> 0.13"},
{:telemetry_metrics, "~> 1.0"},
{:telemetry_poller, "~> 1.0"},
{:gettext, "~> 0.20"},
{:jason, "~> 1.2"},
{:dns_cluster, "~> 0.1.1"},
{:bandit, "~> 1.2"} # !!! 1.2, not 1.5.1
]
end
# Aliases are shortcuts or tasks specific to the current project.
# For example, to install project dependencies and perform other setup tasks, run:
#
# $ mix setup
#
# See the documentation for `Mix` for more info on aliases.
defp aliases do
[
setup: ["deps.get", "ecto.setup", "assets.setup", "assets.build"],
"ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
"ecto.reset": ["ecto.drop", "ecto.setup"],
test: ["ecto.create --quiet", "ecto.migrate --quiet", "test"],
"assets.setup": ["tailwind.install --if-missing", "esbuild.install --if-missing"],
"assets.build": ["tailwind hello", "esbuild hello"],
"assets.deploy": [
"tailwind hello --minify",
"esbuild hello --minify",
"phx.digest"
]
]
end
end
what should I put instead of 1.2
, then?
We generate a mix.exs reference for you like {:bandit, "~> 1.5"}
, so it will pick up the latest compatible release. In this case, it picked up a bad release. So nothing you could look out for or stay on top of. Just a simple bug which will be fixed up shortly :)
You specifically want to lock it at {:bandit, "1.5.0"}
Thank you a ton for your patience 🙏🏼 Unluckily, I cannot help further. Have a great day!
Bandit 1.5.2 released with a fix for this
@lucavenir I'd just released 1.5.1 a few hours ago so you were among the few unlucky first users. Sorry for the trouble!
You guys are incredible!
Sorry for the trouble!
Don't you dare! So thank you for answering this quickly! Have a great day!
Environment
mix new.phx
Ubuntu 22.04 LTS
Actual behavior
I tried and experimented with phoenix in the last month; so I wanted to expand via a first "more serious" project. But now I'm not able to get
Up And Running
anymore 😢 Or at least not without encountering an error.Up And Running says we should run these:
To correctly start the server. Which works.
But whenever I hit
http://localhost:4000/
, the server reports this errorExpected behavior
No
[error]
should ever appear on aGET /
request... Especially after following the simplest up-and-running guide on the web 😄The error points towards
ThousandIsland
andBandit
, so I'm not sure how to solve this problem.