web-ui icon indicating copy to clipboard operation
web-ui copied to clipboard

Suddenly failed to start

Open jenglong1899 opened this issue 1 year ago • 3 comments

I successfully started and ran it several times, then I set up the "Using Your Own Browser (Optional)" in the README, and suddenly it failed to start. I reverted this setting but it still didn't work. I deleted the code, re-downloaded it, and initialized it again, but it still didn't work.

(web-ui) PS E:\pythonProjects\web-ui> python webui.py --ip 127.0.0.1 --port 7788
INFO     [browser_use] BrowserUse logging setup complete with level info
INFO     [root] Anonymized telemetry enabled. See https://github.com/gregpr07/browser-use for more information.
* Running on local URL:  http://127.0.0.1:7788
Traceback (most recent call last):
File "E:\pythonProjects\web-ui\webui.py", line 873, in <module>
main()
File "E:\pythonProjects\web-ui\webui.py", line 870, in main
demo.launch(server_name=args.ip, server_port=args.port)
File "E:\pythonProjects\web-ui\.venv\Lib\site-packages\gradio\blocks.py", line 2619, in launch
raise ValueError(
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.
(web-ui) PS E:\pythonProjects\web-ui>

During the previous normal runs, when I wanted to stop the task, I would press the stop button, but it took a long time to end, so I directly closed the browser tab and then pressed Ctrl-C in the webui terminal. I did this several times without any issues. I wonder if this operation caused the problem?

jenglong1899 avatar Jan 14 '25 07:01 jenglong1899

Do you use any proxy tools, such as Clash, when running your program?

Rccustevens avatar Jan 14 '25 09:01 Rccustevens

Do you use any proxy tools, such as Clash, when running your program?

Maybe you could try adding the following line to your Python application's code: os.environ["no_proxy"] = "localhost,127.0.0.1,::1"

Rccustevens avatar Jan 14 '25 10:01 Rccustevens

Thank you! It works!

I am using Clash, but when it was running successfully before, I also had Clash enabled

jenglong1899 avatar Jan 14 '25 11:01 jenglong1899