Setting up 'health' and 'host-config' for a multipage app

Hello Everyone,

Been building some simple chatbots with Streamlit and I LOVE how easy it is for a newbie to get started with Streamlit.

I have one question though:

Whenever I build a multi-page app, I see the following two console errors.

main.7e6f4f72.js:2 
 GET http://localhost:8501/my-page/_stcore/health 404 (Not Found)
main.7e6f4f72.js:2 
 GET http://localhost:8501/my-page/_stcore/host-config 404 (Not Found)

I don’t see these errors on the main page of my multi-page app.

Any pointers as to how I can set up the host-config and health for a multi page app with potentially many pages?

I’m on Streamlit, version 1.33.0

Thanks!

There shouldn’t be a need to configure those endpoints unless you’re doing something extremely unique.

Can you share a link to your repo? What is your file structure? Are you using the built-in navigation menu or are building your own navigation links? What are the steps you take to run your app and trigger these errors?

@mathcatsand - thank you for the quick response!

Here are the steps to reproduce.

  1. Create a Streamlit project with the pages directory and a page inside the pages directory.
  2. Go to the inside page from the home page.
  3. Refresh the inside page. A console error gets triggered.

I’ve attached 4 screenshots to demonstrate the issue. Happy to raise an issue on GitHub if this is a bug.




Oh, I see. What is your OS and browser (including version)? I’ll have to poke someone to help as I’m not sure.

OS: Mac

Browser: Tested with both Chrome and Firefox

Thanks for helping on this!

I checked with a dev and this is considered expected behavior. Refreshing a page starts a new user session. When you initiate a session from a subpage, there’s some logic to figure out the app’s path.

1 Like

Great. Thanks so much!

Is there a way to suppress or handle the warning? I ask because in some use cases (ex: say we create a widget from a particular Streamlit page and then embed the widget on another site), these warnings will keep popping up every time the widget loads.

I’m not aware of any native way for doing so. I think you’d you have to dig into the Streamlit code if you want to change this behavior, currently. I suggest creating GitHub issue to explain your use case and feature request for this level of control.

1 Like

Awesome Thanks!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.