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

Enable https to access external IP #7703

Closed
3 of 4 tasks
LarsHill opened this issue Nov 10, 2023 · 6 comments · Fixed by #7712
Closed
3 of 4 tasks

Enable https to access external IP #7703

LarsHill opened this issue Nov 10, 2023 · 6 comments · Fixed by #7712
Assignees
Labels
type:enhancement Requests for feature enhancements or new features

Comments

@LarsHill
Copy link
Contributor

Checklist

  • I have searched the existing issues for similar issues.
  • I added a very descriptive title to this issue.
  • I have provided sufficient information below to help reproduce this issue.

Summary

We try to deploy a streamlit app on a windows server that only allows external connections via https.

When accessing the deployed app, it does not completely load and in the console we repeatedly see the following warning

2023-11-10 18:15:16.923 Did not auto detect external IP.
Please go to https://docs.streamlit.io/ for debugging hints.

We identified the root of this warning within this library module:

def get_external_ip():

Apparently the hardcoded url

_AWS_CHECK_IP = "http://checkip.amazonaws.com"

is called to retrieve the external IP of the server.
Since we can only access urls via https, the streamlit app does not continue loading.

Since "https://checkip.amazonaws.com" (using https) works as well, it would be great if a fallback would be implemented to try getting the ip via https when the http response is None.

Thanks and best regards
Lars

Reproducible Code Example

No response

Steps To Reproduce

No response

Expected Behavior

No response

Current Behavior

No response

Is this a regression?

  • Yes, this used to work in a previous version.

Debug info

  • Streamlit version:
  • Python version:
  • Operating System:
  • Browser:

Additional Information

No response

@LarsHill LarsHill added status:needs-triage Has not been triaged by the Streamlit team type:bug Something isn't working labels Nov 10, 2023
Copy link

If this issue affects you, please react with a 👍 (thumbs up emoji) to the initial post.

Your feedback helps us prioritize which bugs to investigate and address first.

Visits

@sfc-gh-kjavadyan sfc-gh-kjavadyan added priority:P3 and removed status:needs-triage Has not been triaged by the Streamlit team labels Nov 10, 2023
@sfc-gh-kjavadyan sfc-gh-kjavadyan self-assigned this Nov 10, 2023
@LarsHill
Copy link
Contributor Author

If it helps, I added a PR that fixes the issue. Let me know if you prefer a different solution, i.e. simply replace the http url by the https one.

@kajarenc
Copy link
Collaborator

Hey, @LarsHill!
Thanks for opening this issue, and thanks for opening PR

I added some commits to your PR (test, fix failing CI etc.), I hope in the next couple of days we could do an internal review!

Stay in touch!

@kajarenc kajarenc added type:enhancement Requests for feature enhancements or new features and removed type:bug Something isn't working priority:P3 labels Nov 15, 2023
Copy link

To help Streamlit prioritize this feature, react with a 👍 (thumbs up emoji) to the initial post.

Your vote helps us identify which enhancements matter most to our users.

Visits

@faiztest
Copy link

I encountered a similar issue when attempting to deploy it on HuggingFace space.
Did not auto detect external IP. Please go to https://docs.streamlit.io/ for debugging hints.

@sfc-gh-kjavadyan
Copy link
Collaborator

@faiztest This change will be released in Sreamlit version 1.29

For now, you can use the streamlit nightly build:

pip install streamlit-nightly

Hope this would help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement Requests for feature enhancements or new features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants