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

Gradio 5.x fails to conenct to share server #10

Open
TravisCouture opened this issue Oct 30, 2024 · 1 comment
Open

Gradio 5.x fails to conenct to share server #10

TravisCouture opened this issue Oct 30, 2024 · 1 comment

Comments

@TravisCouture
Copy link

We are currently running the latest release of the Gradio share server in an EC2 instance. We are able to successfully launch and connect Gradio apps that are running 4.5.x + but Gradio apps built using 5.x fail to connect to the share server with the following error:

* Running on local URL:  http://127.0.0.1:7862/
2024/10/31 06:32:39 [W] [service.go:132] login to server failed: tls: failed to verify certificate: x509: certificate has expired or is not yet valid: current time 2024-10-31T06:32:39+09:00 is after 0001-01-01T00:00:00

Could not create share link. Please check your internet connection or our status page: https://status.gradio.app/.

There is no configuration difference between 4.5.x apps and 5.x apps. For additional context, we terminate TLS via an AWS LB.

Launch code:

demo.launch(share=True,
            share_server_address="ip:7000", share_server_protocol="http", 
            ssl_verify=False)

Version info:

gradio                      5.4.0
gradio_client               1.4.2
@TS-development
Copy link

I ran into the same issue and found that in Gradio version 5.0.0-beta.1 TLS is enabled by default in:
"venv/lib/python3.11/site-packages/gradio/tunneling.py"

    when the _start_tunnel method calls the binary here:
        ```
        def _start_tunnel(self, binary: str) -> str:
            CURRENT_TUNNELS.append(self)
            command = [
                binary,
                "http",
                "-n",
                self.share_token,
                "-l",
                str(self.local_port),
                "-i",
                self.local_host,
                "--uc",
                "--sd",
                "random",
                "--ue",
                "--server_addr",
                f"{self.remote_host}:{self.remote_port}",
                "--disable_log_color",
                # "--tls_enable",
                # "--tls_trusted_ca_file",
                # CERTIFICATE_PATH,
            ]
        ```

If you want to force HTTP, you can comment out the options as show above, though fixing the cert issue would be the proper approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants