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

Better message when share link is not created #4773

Merged
merged 8 commits into from Jul 5, 2023
Merged

Better message when share link is not created #4773

merged 8 commits into from Jul 5, 2023

Conversation

abidlabs
Copy link
Member

@abidlabs abidlabs commented Jul 3, 2023

If a user sets share=True, and an antivirus blocks the download of the FRP binary, the message is a little cryptic, as can be seen by issues: #4548 and #3230.

Here's the current message (which doesn't make sense as it references a non-existent file):

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: C:\Users\BarberM\Anaconda3\envs\textgen\lib\site-packages\gradio\frpc_windows_amd64_v0.2

Here's the new, more instructive message including a workaround:

Could not create share link. Missing file: /Users/abidlabs/dev/gradio-repos/gradio/gradio/frpc_darwin_arm64_v0.2. 

This is likely because your antivirus software is blocking the download of this file. You can install manually by following these steps: 

1. Download this file: https://cdn-media.huggingface.co/frpc-gradio-0.2/frpc_darwin_arm64
2. Rename the downloaded file to: frpc_darwin_arm64_v0.2
3. Move the file to this location: /Users/abidlabs/dev/gradio-repos/gradio/gradio

Closes: #4548

@gradio-pr-bot
Copy link
Contributor

All the demos for this PR have been deployed at https://huggingface.co/spaces/gradio-pr-deploys/pr-4773-all-demos

@gradio-pr-bot
Copy link
Contributor

gradio-pr-bot commented Jul 3, 2023

Chromatic build successful 🎉

@abidlabs abidlabs marked this pull request as ready for review July 3, 2023 19:40
Copy link
Collaborator

@aliabid94 aliabid94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any good way to test this? Btw earlier I was running main, when I couldn't launch a share link from a hospital network with a firewall, I didn't get any error message at all, it just hanged.

@abidlabs
Copy link
Member Author

abidlabs commented Jul 3, 2023

You could do the following:

  1. Delete the file located at gr.tunneling.BINARY_PATH (for me this, is at: /Users/abidlabs/dev/gradio-repos/gradio/gradio/frpc_darwin_arm64_v0.2)
  2. Disable your internet connection
  3. Try launching a Gradio demo with share=True

and you should see the message printed

I couldn't launch a share link from a hospital network with a firewall, I didn't get any error message at all, it just hanged.

I think this is a different issue. Not tackled by this PR

@akx
Copy link
Contributor

akx commented Jul 4, 2023

I think this is a different issue. Not tackled by this PR

Might be fixed by adding a suitable timeout to all Requests calls (the Ruff security lint S113 looks at this).

Copy link
Collaborator

@freddyaboulton freddyaboulton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix @abidlabs

image

@vercel
Copy link

vercel bot commented Jul 5, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
gradio ⬜️ Ignored (Inspect) Jul 5, 2023 4:01pm

@abidlabs
Copy link
Member Author

abidlabs commented Jul 5, 2023

Thanks @freddyaboulton!

@abidlabs abidlabs merged commit f76348d into main Jul 5, 2023
15 checks passed
@abidlabs abidlabs deleted the share-msg branch July 5, 2023 16:06
@abidlabs abidlabs mentioned this pull request Sep 15, 2023
1 task
@RidaSaghir
Copy link

Hello.. my gradio application successfully downloads the frpc file but doesn't create any sharing link and just hangs. I tried switching the wifi off after deleting the frpc file, only then it says that can't create a share link.

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

Successfully merging this pull request may close these issues.

Share link not generated, error message references non-existent file
6 participants