ozyet
February 10, 2025, 10:16pm
1
[Edit: More details added]
This small app is getting an 500 error when auth param is added
import gradio as gr
def greet(name):
return "Hello " + name + "!!"
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
demo.launch(auth=("admin", "pass1234"))
More details from console:
Traceback (most recent call last):
File “/home/user/app/app.py”, line 7, in
demo.launch(auth=(“admin”, “pass1234”))
File “/usr/local/lib/python3.10/site-packages/gradio/blocks.py”, line 2666, in launch
raise ValueError(
Note 1: It stopped working since Friday last week.
Note 2: Tried ssr_mode=False but no luck.
1 Like
I’ve tried various things now. This is definitely a bug.
Gradio 5.15.0 / 5.14.0 / 5.8.0
Gradio 5.12.0
Gradio 4.44.0
It works.
ozyet
February 11, 2025, 10:34am
3
Thanks John, very appreciated.
Just wondering how quickly this issue would be addressed
1 Like
ozyet
February 12, 2025, 9:27am
4
Is there any way to set Gradio version to 4.40.0 in my space?Test - a Hugging Face Space by ozyet
1 Like
ozyet
February 23, 2025, 7:49am
7
Just checked the issue with Gradio 5.17.1, it still gives an 500 error when auth param is added
1 Like
ozyet
March 27, 2025, 7:53am
8
This issue still occurs in SDK version: 5.23.1
1 Like
Does anyone have any news or tricks on how to launch the 5th Gradio version in Space?
1 Like
Hmm… Possibly like this workaround?
opened 02:49AM - 16 Dec 24 UTC
bug
SSR
### Describe the bug
Failed to start while auth and ssr on
### Have you sear… ched existing issues? 🔎
- [X] I have searched and found no existing issues
### Reproduction
```python
import gradio as gr
def greet(name):
return f"Hello, {name}!"
# Define the username and password for authentication
auth = ('username', 'password')
# Create the Gradio interface
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
# Launch the interface with SSR enabled
iface.launch(server_name="0.0.0.0", ssr_mode=True, auth=auth)
```
### Screenshot
_No response_
### Logs
```shell
Error: Error: Login credentials are required to access this space.
at Client._resolve_config (file:///project/.venv/lib/python3.10/site-packages/gradio/templates/node/build/server/chunks/2-9Q2E4iJ-.js:39575:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Client.init (file:///project/.venv/lib/python3.10/site-packages/gradio/templates/node/build/server/chunks/2-9Q2E4iJ-.js:39491:5)
at async Client.connect (file:///project/.venv/lib/python3.10/site-packages/gradio/templates/node/build/server/chunks/2-9Q2E4iJ-.js:39530:5)
at async load$1 (file:///project/.venv/lib/python3.10/site-packages/gradio/templates/node/build/server/chunks/2-9Q2E4iJ-.js:41454:15)
at async load_data (file:///project/.venv/lib/python3.10/site-packages/gradio/templates/node/build/server/index.js:1178:18)
at async file:///project/.venv/lib/python3.10/site-packages/gradio/templates/node/build/server/index.js:2618:18
> raise ValueError(
"When localhost is not accessible, a shareable link must be created. Please set share=True or check your proxy settings to allow access to localhost."
)
E ValueError: When localhost is not accessible, a shareable link must be created. Please set share=True or check your proxy settings to allow access to localhost.
```
### System Info
```shell
❯ gradio environment
Gradio Environment Information:
------------------------------
Operating System: Darwin
gradio version: 5.8.0
gradio_client version: 1.5.1
------------------------------------------------
gradio dependencies in your environment:
aiofiles: 23.2.1
anyio: 4.7.0
audioop-lts is not installed.
fastapi: 0.115.6
ffmpy: 0.4.0
gradio-client==1.5.1 is not installed.
httpx: 0.28.1
huggingface-hub: 0.26.5
jinja2: 3.1.4
markupsafe: 2.1.5
numpy: 2.2.0
orjson: 3.10.12
packaging: 24.2
pandas: 2.2.3
pillow: 11.0.0
pydantic: 2.9.2
pydub: 0.25.1
python-multipart: 0.0.19
pyyaml: 6.0.2
ruff: 0.8.3
safehttpx: 0.1.6
semantic-version: 2.10.0
starlette: 0.38.6
tomlkit: 0.12.0
typer: 0.15.1
typing-extensions: 4.12.2
urllib3: 2.2.3
uvicorn: 0.32.1
authlib; extra == 'oauth' is not installed.
itsdangerous; extra == 'oauth' is not installed.
gradio_client dependencies in your environment:
fsspec: 2024.10.0
httpx: 0.28.1
huggingface-hub: 0.26.5
packaging: 24.2
typing-extensions: 4.12.2
websockets: 14.1
```
### Severity
Blocking usage of gradio
import gradio as gr
def greet(name):
return "Hello " + name + "!!"
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
demo.launch(auth=("admin", "pass1234"), ssr_mode=False)