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

Setting dev_addr to localhost breaks navigation.instant as of 9.4.3 #6204

Closed
4 tasks done
johnthagen opened this issue Oct 16, 2023 · 7 comments
Closed
4 tasks done
Labels
needs reproduction Issue lacks a minimal reproduction .zip file

Comments

@johnthagen
Copy link
Contributor

johnthagen commented Oct 16, 2023

Context

Originally discussed at

Bug description

Mkdocs has a dev_addr configuration.

If the user configures this to:

dev_addr: localhost:8001

This breaks the navigation.instant feature. Clicking on links in the navigation or within the pages will not update the contents on screen correctly.

Screenshot 2023-10-16 at 10 33 56 AM

Solution 1

Note, that strictly speaking the Mkdocs docs state that the format should be IP:Port, and localhost is not an IP. Moving this to 127.0.0.1:8001 fixes this issue, but since it used to work, I thought I'd report to see if there are any other underlying issues to address.

Could this instead fail hard with a clear error message?

Solution 2

9.4.2 release does not exhibit this "bug".

Related links

Reproduction

9.4.6-dev_addr-localhost-navigation.zip

Steps to reproduce

Browser

Chrome

Before submitting

@alexvoss
Copy link
Sponsor Collaborator

What operating system are you on? Can you confirm that localhost resolves to 127.0.0.1? (e.g., nslookup localhost) What does the network view in the browser's developer tools show?

I built your site but running mkdocs directly, having installed packages only as mkdocs asked for them (not sure what 'poetry' and 'nox' are). It seems to be working fine on my machine, so I recon it is something about your machine or an interaction with other plugins and tools you are using. Hope this helps you narrow it down more.

@johnthagen
Copy link
Contributor Author

What operating system are you on?

I'm on macOS 13.6.

Can you confirm that localhost resolves to 127.0.0.1?

$ nslookup localhost
Server:		<REDACTED INTERNAL DNS SERVERNAME>
Address:	<REDACTED INTERNAL DNS SERVERNAME>#53

Name:	localhost.REDACTED_COMPANY_PREFIX.REDACTED_TOP_LEVEL_DOMAIN
Address: 127.0.0.1

@iBug
Copy link
Contributor

iBug commented Oct 17, 2023

Doesn't make sense to me. I also could not reproduce on my machine (Ubuntu 22.04, kernel 5.15.0-86-generic, Python 3.10.12, other packages installed latest on a fresh venv). Maybe this is something macOS-specific.

Also it would help better if your ZIP contained a minimal reproduction, not something with poetry or nox or whatever.

@squidfunk squidfunk added the needs reproduction Issue lacks a minimal reproduction .zip file label Oct 17, 2023
@johnthagen
Copy link
Contributor Author

not something with poetry or nox or whatever.

The zip file itself has a requiremens.lock.txt in it, so that should be usable with bare pip and no need to use Poetry or nox. I included the Poetry/nox instructions for someone who wanted to check it out directly from my branch.

Maybe this is something macOS-specific.

Perhaps the auto-reloader/server works differently on macOS? I've seen similar differences on Flask and other similar auto-reload projects in the past.

Since it worked on 9.4.2 and broke specifically starting at 9.4.3, I thought it was worth reporting in case there is something underlying. If the maintainer would like to close this issue, I'm also fine with that as well, since I was able to fix my particular issue by using 127.0.0.1 instead of localhost.

@iBug
Copy link
Contributor

iBug commented Oct 17, 2023

You skipped the only bold word in my response: Please provide a minimal reproduction so others can actually look into it without various plugins interfering. Also, I reviewed 9.4.2...9.4.3 and did not find anything that makes sense.

Based on those reviews, I'm inclined to believe there's something wrong with another component in your setup, and definitely not the theme's fault. Chances are very likely that you upgraded the faulty component along with the theme from 9.4.2 to 9.4.3.

@squidfunk
Copy link
Owner

squidfunk commented Oct 17, 2023

Thanks @alexvoss and @iBug taking the time to help here. I'm closing this as not reproducible for now. If @johnthagen provides a minimal reproduction that allows us to inspect the error, we can reopen this issue.

@johnthagen
Copy link
Contributor Author

This seems to be fixed when I tried it in 9.4.8 after looking at the changelog. I suspect 87d69a9 was what fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs reproduction Issue lacks a minimal reproduction .zip file
Projects
None yet
Development

No branches or pull requests

4 participants