OSError: ([Errno 98] Address already in use) in Streamlit Sharing

Hi guys,

I’m building an app which tries to authenticate a Google service via Oauth (credentials are in a JSON file).

Once the 1st credentials are uploaded, the script is meant to redirect the user to Google’s consent screen:

Instead, I have this error in Streamlit Sharing:

OSError: [Errno 98] Address already in use

Do you know if there’s an explanation for this?

It’s worth noting that this app works perfectly well on my local machine.

Here’s the app: https://share.streamlit.io/charlywargnier/streamlitgscconnectortests/main/GSCConnectMasterV2.py

And the code: https://github.com/CharlyWargnier/StreamlitGSCConnectorTests/blob/main/GSCConnectMasterV2.py

Also a screenshot of the full log trace:

Thanks in advance! :pray:


---- Update ----
I’ve deployed the same app/code in Heroku and I’ve got the same issue - see screenshot below:

This is fixed, thanks to @synode’s help! :raised_hands:

It was due to an incorrect setting from the library I was using. That setting was trying to spawn a local server in S4, which is not possible.


1 Like