gradio: Could not create share link, please check your internet connection.

Describe the bug

Gradio cannot connect to the internet in a Google Cloud Compute instance

Is there an existing issue for this?

  • I have searched the existing issues

Reproduction

I spun up a cloud instance like I have done many times in the past, and it’s failing to create the internet lin.

Screenshot

No response

Logs

(base) user@instance-1:~/stable-diffusion-webui$ /home/user/stable-diffusion-webui/venv/bin/python3 webui.py --share --gradio-auth username8008:password --xformers
Loading weights [4711ff4dd2] from /home/user/stable-diffusion-webui/models/Stable-diffusion/v2-1_768-nonema-pruned.ckpt
Creating model from config: /home/user/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/configs/stable-diffusion/v2-inference-v.yaml
LatentDiffusion: Running in v-prediction mode
DiffusionWrapper has 865.91 M params.
Applying xformers cross attention optimization.
Textual inversion embeddings loaded(0):
Model loaded in 18.4s (load weights from disk: 12.6s, find config: 1.2s, create model: 0.2s, apply weights to model: 1.2s, apply half(): 0.4s, load VAE: 2.1s, move model to device: 0.7s).
Running on local URL:  http://127.0.0.1:7860

Could not create share link, please check your internet connection.
Startup time: 31.5s (import gradio: 2.7s, import ldm: 1.1s, other imports: 3.9s, setup codeformer: 0.2s, load scripts: 0.4s, load SD checkpoint: 18.4s, create ui: 0.2s, gradio launch: 4.5s).

System Info

Gradio version: '3.16.2'

Severity

blocking all usage of gradio

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 42 (2 by maintainers)

Most upvoted comments

gradio 3.38.0 gradio_client 0.2.10

In my opinion, frpc_linux_amd64_v0.2 is an intranet penetration plug-in, check if the file frpc_linux_amd64_v0.2 has the executable permission, if not , run chmod +x frpc_linux_amd64_v0.2 to make it executable. in my case, in docker environment:

chmod +x /usr/local/lib/python3.8/dist-packages/gradio/frpc_linux_amd64_v0.2

finally , it works.

I was having this issue on my Windows machine as well. Turns out my security guard was blocking it from creating an external server. Disabling it temporarily worked for me.

That fixed it for me, thank you!!

What exactly did you do? Am also on win11

  • Press Windows key > Search for “Windows Security” > Open
  • Press the button on “app and browser control”
  • Expand the potentially unwanted app.
  • Go to Actions > Allow on device
  • Done! @avocardio

I am still getting the same error! No links

chmod +x /usr/local/lib/python3.8/dist-packages/gradio/frpc_linux_amd64_v0.2

I think this won’t work when you have gradio in a virtual environment.

Found a workaround. Force downgrade to 3.8 …3.9, and the public link will show. There is something wrong/bug with the latest version of Gradio.

gradio 3.38.0 gradio_client 0.2.10

In my opinion, frpc_linux_amd64_v0.2 is an intranet penetration plug-in, check if the file frpc_linux_amd64_v0.2 has the executable permission, if not , run chmod +x frpc_linux_amd64_v0.2 to make it executable. in my case, in docker environment:

chmod +x /usr/local/lib/python3.8/dist-packages/gradio/frpc_linux_amd64_v0.2

finally , it works.

Works for me too! No need to downgrade gradio version!!!

When I test the following code in the latest version (3.27), it doesn’t generate the public url.

import gradio as gr

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

demo = gr.Interface(fn=greet, inputs="text", outputs="text")
    
demo.launch(share=True)

But on an older version, like 3.9, it works.

pip install gevent and it works pip install gevent==22.10.2

gradio 3.38.0 gradio_client 0.2.10

In my opinion, frpc_linux_amd64_v0.2 is an intranet penetration plug-in, check if the file frpc_linux_amd64_v0.2 has the executable permission, if not , run chmod +x frpc_linux_amd64_v0.2 to make it executable. in my case, in docker environment:

chmod +x /usr/local/lib/python3.8/dist-packages/gradio/frpc_linux_amd64_v0.2

finally , it works.

bro you are a fking genius!

I had the same issue and by downgraded to 3.9 it worked like a charm

1704359155983 我完美解决了这个问题,按照提示与命令来就可以。

gradio 3.38.0 gradio_client 0.2.10

In my opinion, frpc_linux_amd64_v0.2 is an intranet penetration plug-in, check if the file frpc_linux_amd64_v0.2 has the executable permission, if not , run chmod +x frpc_linux_amd64_v0.2 to make it executable. in my case, in docker environment:

chmod +x /usr/local/lib/python3.8/dist-packages/gradio/frpc_linux_amd64_v0.2

finally , it works.

worked for me, huge thanks!

gradio 3.38.0 gradio_client 0.2.10

In my opinion, frpc_linux_amd64_v0.2 is an intranet penetration plug-in, check if the file frpc_linux_amd64_v0.2 has the executable permission, if not , run chmod +x frpc_linux_amd64_v0.2 to make it executable. in my case, in docker environment:

chmod +x /usr/local/lib/python3.8/dist-packages/gradio/frpc_linux_amd64_v0.2

finally , it works.

didn’t work for me.

my solution in offline docker container:

demo.launch(share=False, server_name=‘0.0.0.0’, server_port=7860)

Getting this error: Running on local URL: http://127.0.0.1:7860

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

Also please ensure that your antivirus or firewall is not blocking the binary file located at: /home/mojo/miniforge3/envs/textgen/lib/python3.10/site-packages/gradio/frpc_linux_aarch64_v0.2

I also tried simple gradio app to check but same also I tried with niginx sudo nano /etc/nginx/sites-available/default server { listen 80; server_name: 209.73.86.100; location / { proxy_pass http://localhost:7860; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } In browser I get This site can’t be reached 127.0.0.1 refused to connect.

Hi @pengzhiliang ! There was an issue with the share links that has now been resolved!