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

[Edit: More details added]

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

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.

Thanks John, very appreciated.

Just wondering how quickly this issue would be addressed :thinking:

1 Like

Is there any way to set Gradio version to 4.40.0 in my space?Test - a Hugging Face Space by ozyet

1 Like

Just this way.:sweat_smile:

sdk_version: 5.15.0

to

sdk_version: 4.44.0

Thank you! :wink:

1 Like

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

1 Like

This issue still occurs in SDK version: 5.23.1 :pensive:

1 Like