[warning] Transport option {:next_protocols_advertised, ["h2", "http/1.1"]} unknown or invalid.
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- elixir
- Domain
- networking
Research direction
Start at lib/plug_cowboy.ex lines 293-294 and compare the configured option with Erlang SSL's server options. Investigate the backwards-compatibility concern raised in the issue before deciding whether the deprecated setting can be removed. Done means the startup warning is resolved without breaking HTTPS transport configuration.
Written by the indexing model from the issue text.
Description
When running a Phoenix project using plug_cowboy 2.7.5 I get the following warning on startup:
[warning] Transport option {:next_protocols_advertised, ["h2", "http/1.1"]} unknown or invalid.
I believe this is happening because of the code here: https://github.com/elixir-plug/plug_cowboy/blob/553b43e40e35ba5d92ed8f99bffaf181e6aba18b/lib/plug/cowboy.ex#L293-L294
From what I gather :next_protocols_advertised has been deprecated (https://www.erlang.org/doc/apps/ssl/ssl.html#t:server_option_legacy/0) in favor of :alpn_preferred_protocols.
Maybe there are some backwards compatibility issues that are problematic, but otherwise I think it'd be great to simply remove the setting of :next_protocols_advertised. If that's not possible maybe we could create a way to explicitly unset :next_protocols_advertised, similar to the code below?
config :app, AppWeb.Endpoint,
...
https: [
...
transport_options: [
socket_opts: [
next_protocols_advertised: nil
]
]
]
- Dominant language
- Elixir
- Stars
- 264
- Forks
- 59
- Avg merge
- 6h
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from elixir-plug/plug_cowboy
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
elixir-plug/plug_cowboy#92 · 12 comments ·
All issues in elixir-plug/plug_cowboy
Similar issues
-
marketing v9
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
revelrylabs/harmonium#715 ·
-
Feature:Resolution
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
intellij-elixir/intellij-elixir#4396 ·
Maintainers usually reply within 1 day
-
Python 3.15 supportPossibly taken @amnesiaof claimed this today. OpenL: python L: python:uv
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
dependabot/dependabot-core#16524 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
DROOdotFOO/raxol#1237 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
expert-lsp/expert#929 · 1 comment ·
Maintainers usually reply within 1 day