streamlit / streamlit

Streamlit — A faster way to build and share data apps.
https://streamlit.io
Apache License 2.0
35.62k stars 3.09k forks source link

The app says "Please wait..." forever | streamlit running on via Databricks notebook #5619

Open AbishekS01 opened 2 years ago

AbishekS01 commented 2 years ago

Checklist

Summary

The app says "Please wait..." forever | streamlit running on via Databricks notebook, when I tried the https://docs.streamlit.io/knowledge-base/deploy/remote-start

streamlit run my_app.py --server.enableCORS=false streamlit run my_app.py --server.enableWebsocketCompression=false

Reproducible Code Example

https://raw.githubusercontent.com/StatsAI/Streamlit_RecSys/main/test_app.py

Steps To Reproduce

!pip install streamlit

import os base_url='https://' + spark.conf.get("spark.databricks.workspaceUrl") workspace_id=spark.conf.get("spark.databricks.clusterUsageTags.orgId") cluster_id=spark.conf.get("spark.databricks.clusterUsageTags.clusterId") dashboard_port='8501' pathname_prefix='/driver-proxy/o/' + workspace_id + '/' + cluster_id + '/' + dashboard_port dashboard_url=base_url + pathname_prefix + '/app' os.environ['STREAMLIT_REQUESTS_PATHNAME_PREFIX'] = pathname_prefix print(os.environ.get('STREAMLIT_REQUESTS_PATHNAME_PREFIX')) print("Once the dashboard is running, it can be accessed at this link:\n\n" + dashboard_url)

!streamlit run https://raw.githubusercontent.com/StatsAI/Streamlit_RecSys/main/test_app.py --server.port 8501

For output example : Collecting usage statistics. To deactivate, set browser.gatherUsageStats to False. You can now view your Streamlit app in your browser. Network URL: http://10.25.252.86:8501 External URL: http://18.220.214.11:8501

https://xxxxxxxxx.cloud.databricks.com/driver-proxy/o/xxxxxxxxx/xxxxxxxx/8501/app

image

Expected Behavior

No response

Current Behavior

image

Is this a regression?

Debug info

Additional Information

No response

Are you willing to submit a PR?


Community voting on feature requests enables the Streamlit team to understand which features are most important to our users.

If you'd like the Streamlit team to prioritize this feature request, please use the 👍 (thumbs up emoji) reaction in response to the initial post.

vdonato commented 2 years ago

Hi @AbishekS01,

Wanted to check -- have you previously been able to deploy apps on Databricks notebooks on previous versions of Streamlit? And does downgrading to version 1.13.0 fix things? I'll take a look to see if I can reproduce this error myself in the next few days, but it'd be helpful to get a bit more information.

AbishekS01 commented 2 years ago

@vdonato, I am trying 1st-time streamlit on databricks notebook, let me try to install streamlit 1.13.0 and update the result.

supernatent commented 2 years ago

I'm having the same issue with Streamlit 1.14.0 on Google Cloud Run. "Please wait..." forever for 1.14, works fine on 1.13.

AbishekS01 commented 2 years ago

@vdonato after installing "Streamlit, version 1.13.0" still getting "Please wait..." image

vdonato commented 2 years ago

Thanks for checking @AbishekS01. I wonder if this is an issue with how databricks notebooks work with streamlit rather than with streamlit itself. I'll have to give it a try myself when I have some free time, but my gut feeling is that this may require changes on the databricks notebook end rather than on ours.


@supernatent thanks for pointing this out. It turns out the issue you're running into got introduced in 1.14.0 and seems unrelated to the issue filed here (even though the user-facing behavior looks the same). I have a PR with a fix out in https://github.com/streamlit/streamlit/pull/5642 that I'll be merging today, and we should have a patch release out sometime next week to resolve the problem.

supernatent commented 2 years ago

@vdonato Thank you for following up on my comment!

Josh-Rubin-Fiddler commented 1 year ago

Hi friends, in case it's helpful.

I've encountered what seems like the same problem on an AWS SageMaker notebook instance (notebook-al2-v2) over default jupyter-server-proxy==3.2.1. I get the same indefinite "please wait" regardless of disabling CORS and web socket compression.

This affects Chrome, but not Safari.

Downgrading to streamlit==1.13.0 solves the problem. 1.14.0-1.17.0 are afflicted.

PvanHengel commented 1 year ago

Morning al, @Josh-Rubin-Fiddler we are seeing the same issue, dont want to downgrade as there are features we need on later versions of Streamlit. Is there a solution, i'm fairly confident the websocket requests are making it to the streamlit app, as ive turned up debugging, thus its passing the proxy properly. To me it seems like the headers, specifically the cookie header, may be breaking things, in particular i think that because aws needs to add their auth cookies, in addition to the streamlit ones things may be breaking. Ive looked through the release notes to better understand why 1.13 works but later versions dont and it seems that some changes have been made to auth on websockets, so that deepens my theory. Its clearly not a browser issue as it works fine when running locally.

Nothing complex to reproduce, run a basic sagemaker notebook, pip install streamlit .... streamlit hello .... access the app from the browser via proxy https://....../proxy/8501 (fill in correct full path and port).

Be sure to check out the cookies being passed, they are quite large on the inital request.

This is a huge blocker for us as we really want to adopt streamlit as our standard for developing UIs via sagemaker.

PvanHengel commented 1 year ago

To add, perhaps there is a small chance that the proxy being used messes with the request/response headers, and still trying to dig into that a bit deeper, but would appreciate any help!

Josh-Rubin-Fiddler commented 1 year ago

@PvanHengel, would love to see this resolved, but don't have a solution or any additional information.