Skip to content

mdbook serve --port 80 --open panics, but opens the browser #2631

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

Open
szabgab opened this issue Apr 2, 2025 · 0 comments · May be fixed by #2632
Open

mdbook serve --port 80 --open panics, but opens the browser #2631

szabgab opened this issue Apr 2, 2025 · 0 comments · May be fixed by #2632
Labels
C-bug Category: A bug, incorrect or unintended behavior Command-serve Command: serve

Comments

@szabgab
Copy link
Contributor

szabgab commented Apr 2, 2025

Problem

When we try to use a restricted port between 1-1023 we get a panic and the browser is still opened and reports a missing service.

mdbook serve test_book --open --port 83

I tried a few ports.

The same if we already have a book served on some good port (e.g. the default 3000) and we start a new book one the same port.
mdbook panics and opens the browser on that port, but that shows the other book.

Steps

For the first one just run

mdbook serve test_book --open --port 83

For the second problem in one window run

mdbook serve test_book

And then in another window run

mdbook serve test_book --open

Possible Solution(s)

No response

Notes

No response

Version

Both `mdbook v0.4.47` and what we have in `master`.
@szabgab szabgab added the C-bug Category: A bug, incorrect or unintended behavior label Apr 2, 2025
szabgab added a commit to szabgab/mdBook that referenced this issue Apr 2, 2025
Give a nice explanation if it is used or if it is a protected port.
Closes rust-lang#2631
@szabgab szabgab linked a pull request Apr 2, 2025 that will close this issue
@ehuss ehuss added the Command-serve Command: serve label Apr 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: A bug, incorrect or unintended behavior Command-serve Command: serve
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants