# BUG: Gradio 5.x Launch Auth Getting an Error 500

**URL:** <https://discuss.huggingface.co/t/bug-gradio-5-x-launch-auth-getting-an-error-500/140100>\
**Category:** Spaces\
**Created:** [February 10, 2025, 10:16pm UTC](https://discuss.huggingface.co/t/bug-gradio-5-x-launch-auth-getting-an-error-500/140100 "2025-02-10T22:16:31Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ozyet](https://avatars.discourse-cdn.com/v4/letter/o/41988e/32.png) [@ozyet](https://discuss.huggingface.co/u/ozyet)\
**Post date:** [February 10, 2025, 10:16pm UTC](https://discuss.huggingface.co/t/bug-gradio-5-x-launch-auth-getting-an-error-500/140100/1 "2025-02-10T22:16:31Z")

</div>

[Edit: More details added]

This small app is getting an 500 error when auth param is added 😔

```auto
import gradio as gr

def greet(name):
    return "Hello " + name + "!!"

demo = gr.Interface(fn=greet, inputs="text", outputs="text")
demo.launch(auth=("admin", "pass1234"))

```

> **[Test - a Hugging Face Space by ozyet](https://huggingface.co/spaces/ozyet/test)**
>
> Test

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.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [February 11, 2025, 5:22am UTC](https://discuss.huggingface.co/t/bug-gradio-5-x-launch-auth-getting-an-error-500/140100/2 "2025-02-11T05:22:12Z")

</div>

I’ve tried various things now. This is definitely a bug.

### Gradio 5.15.0 / 5.14.0 / 5.8.0

 ![auth500](https://us1.discourse-cdn.com/hellohellohello/original/3X/9/7/97893c3ff8a6248d7f2e301626e72df52583a615.png)

### Gradio 5.12.0

 ![auth500_5120](https://us1.discourse-cdn.com/hellohellohello/original/3X/8/0/808c92bafec4ffa8febce9ceceebebc9a049fbf6.png)

### Gradio 4.44.0

It works.

---

<div class="post-metadata">

**Author:** ![ozyet](https://avatars.discourse-cdn.com/v4/letter/o/41988e/32.png) [@ozyet](https://discuss.huggingface.co/u/ozyet)\
**Post date:** [February 11, 2025, 10:34am UTC](https://discuss.huggingface.co/t/bug-gradio-5-x-launch-auth-getting-an-error-500/140100/3 "2025-02-11T10:34:18Z")

</div>

Thanks John, very appreciated.

Just wondering how quickly this issue would be addressed 🤔

---

<div class="post-metadata">

**Author:** ![ozyet](https://avatars.discourse-cdn.com/v4/letter/o/41988e/32.png) [@ozyet](https://discuss.huggingface.co/u/ozyet)\
**Post date:** [February 12, 2025, 9:27am UTC](https://discuss.huggingface.co/t/bug-gradio-5-x-launch-auth-getting-an-error-500/140100/4 "2025-02-12T09:27:44Z")

</div>

Is there any way to set Gradio version to 4.40.0 in my space?[Test - a Hugging Face Space by ozyet](http://huggingface.co/spaces/ozyet/test)

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [February 12, 2025, 11:07am UTC](https://discuss.huggingface.co/t/bug-gradio-5-x-launch-auth-getting-an-error-500/140100/5 "2025-02-12T11:07:57Z")

</div>

Just this way.😅

> **[README.md · ozyet/test at main](https://huggingface.co/spaces/ozyet/test/blob/main/README.md)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

```yaml
sdk_version: 5.15.0

```

to

```yaml
sdk_version: 4.44.0

```

---

<div class="post-metadata">

**Author:** ![ozyet](https://avatars.discourse-cdn.com/v4/letter/o/41988e/32.png) [@ozyet](https://discuss.huggingface.co/u/ozyet)\
**Post date:** [February 12, 2025, 12:36pm UTC](https://discuss.huggingface.co/t/bug-gradio-5-x-launch-auth-getting-an-error-500/140100/6 "2025-02-12T12:36:12Z")

</div>

Thank you! 😉

---

<div class="post-metadata">

**Author:** ![ozyet](https://avatars.discourse-cdn.com/v4/letter/o/41988e/32.png) [@ozyet](https://discuss.huggingface.co/u/ozyet)\
**Post date:** [February 23, 2025, 7:49am UTC](https://discuss.huggingface.co/t/bug-gradio-5-x-launch-auth-getting-an-error-500/140100/7 "2025-02-23T07:49:06Z")

</div>

Just checked the issue with Gradio 5.17.1, it still gives an 500 error when auth param is added 😔

---

<div class="post-metadata">

**Author:** ![ozyet](https://avatars.discourse-cdn.com/v4/letter/o/41988e/32.png) [@ozyet](https://discuss.huggingface.co/u/ozyet)\
**Post date:** [March 27, 2025, 7:53am UTC](https://discuss.huggingface.co/t/bug-gradio-5-x-launch-auth-getting-an-error-500/140100/8 "2025-03-27T07:53:57Z")

</div>

This issue still occurs in SDK version: 5.23.1 😔

---

<div class="post-metadata">

**Author:** ![sasha-kuzovlev](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/sasha-kuzovlev/32/44857_2.png) [@sasha-kuzovlev](https://discuss.huggingface.co/u/sasha-kuzovlev)\
**Post date:** [April 6, 2025, 3:12am UTC](https://discuss.huggingface.co/t/bug-gradio-5-x-launch-auth-getting-an-error-500/140100/9 "2025-04-06T03:12:32Z")

</div>

Does anyone have any news or tricks on how to launch the 5th Gradio version in Space?

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [April 6, 2025, 4:06am UTC](https://discuss.huggingface.co/t/bug-gradio-5-x-launch-auth-getting-an-error-500/140100/10 "2025-04-06T04:06:05Z")

</div>

Hmm… Possibly like this workaround?

> <https://github.com/gradio-app/gradio/issues/10204>
>
> \### 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

```py
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)

```
