Tree not showing with localhost but ok with 127.0.0.1

Coming back to jupyter after a few months of hiatus, I try to restart a project with
python3 -m venv venv ; source venv/bin/activate
and then pip install jupyter ; jupyter-notebook
At this point, I go to the static redirection page and get to http://localhost:8888/tree . Page is blank.
However, http://127.0.0.1:8888/tree just works.
It used to work fine a few months ago. Did something change?

My /etc/localhosts contains localhost => 127.0.0.1 and localhost => ::1
Could this be because of ipv6. My OS is a trixie/sid debian box.

i’ve never used a localhosts file, don’t know if that works.
what should work imho:

try adding

127.0.0.1	localhost
::1		localhost

to /etc/hosts

That was a typo. That’s my /etc/hosts file
As far as I know the resolution should be correct.

user@host$ host localhost
localhost has address 127.0.0.1
localhost has IPv6 address ::1