blender_vscode icon indicating copy to clipboard operation
blender_vscode copied to clipboard

connect ECONNREFUSED 127.0.0.1:7908 after updating

Open simonsanchezart opened this issue 9 months ago • 16 comments

Today, after update VS Code and a few extensions, I started getting this error after Blender launches, it then gets frozen and not much happens. connect ECONNREFUSED 127.0.0.1:7908

This happened after updating VS Code and some extensions. I already tried downgrading VS Code and Python & Python Debugger but it's still hapenning.

ms-python.debugpy Version 2024.14.0 (after downgrading) ms-python.python Version 2025.0.0 (after downgrading) VS Code version 1.97.2 (after downgrading)

Log:

 *  Executing task: c:\Program Files\Blender Foundation\Blender 4.3\blender.exe --python c:\Users\Simon\.vscode\extensions\jacqueslucke.blender-development-0.0.25\pythonFiles\launch.py 

Registered MACHIN3tools 1.11.1.DeusEx with 12 tools, 6 pie menus
HardOps 0.9.88.7 available!
Registered MESHmachine 0.17.0 with 2 plug libraries
 • plug library: Examples
 • plug library: MyPlugs
ADDONS_TO_LOAD [{'load_dir': 'c:\\Users\\Simon\\Documents\\Personal-Documents\\freelance\\asb\\asb_blender_toolkit', 'module_name': 'asb_blender_toolkit'}]
INFO: Removing old link: C:\Users\Simon\AppData\Roaming\Blender Foundation\Blender\4.3\extensions\vscode_development\asb_blender_toolkit
 * Serving Flask app 'Blender Server'
 * Debug mode: on
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on http://127.0.0.1:9237
Press CTRL+C to quit
Sending: {'type': 'setup', 'blenderPort': 9237, 'debugpyPort': 7908, 'blenderPath': 'c:\\Program Files\\Blender Foundation\\Blender 4.3\\blender.exe', 'scriptsFolder': 'c:\\Program Files\\Blender Foundation\\Blender 4.3\\4.3\\scripts', 'addonPathMappings': [{'src': 'c:\\Users\\Simon\\Documents\\Personal-Documents\\freelance\\asb\\asb_blender_toolkit', 'load': 'C:\\Users\\Simon\\AppData\\Roaming\\Blender Foundation\\Blender\\4.3\\extensions\\vscode_development\\asb_blender_toolkit'}]}
Waiting for debug client.

simonsanchezart avatar Mar 06 '25 11:03 simonsanchezart

Had the same problem starting today.

I tried disabling my firewall but still didn't work.

I reinstalled the Blender addon and that also didn't work.

Finally, what resolves the problem for me was to deinstall the Python debugger, click "restart Extensions" and installed it again. Now I can start Blender through VSCode again and also the previous error "...is already being debugged - open launch.json" is gone.

Bitsqueezer2025 avatar Mar 06 '25 12:03 Bitsqueezer2025

Same here. Though, creating manually a server on blender and connecting to it works with specified ports.

JohanBonnetGVA avatar Mar 06 '25 12:03 JohanBonnetGVA

I solved it by uninstalling all python extensions and then running Blender: Start.

KareKyasu avatar Mar 06 '25 15:03 KareKyasu

If you have uninstalled all Python extensions then you have also uninstalled the Python debugger extension.. ;)

Bitsqueezer2025 avatar Mar 06 '25 16:03 Bitsqueezer2025

Thank you guys. To me, this is an example of how things can suddenly break down due to automatic updates.

PavelSharp avatar Mar 06 '25 17:03 PavelSharp

With this addon being discontinued, I didn't expect to see an issue created and much less a fix. Thank you so much, @Bitsqueezer2025!

rubenp02 avatar Mar 06 '25 18:03 rubenp02

Thanks a lot @KareKyasu and @Bitsqueezer2025 I tryed uninstalling only BlenderDevelopment extension but it didnt work. I ended up uninstalling others that I thought might be related to pythona dn could affect something.

I noticed that, the extensions that I uninstalled and after that making the installation ov Blende Development Extension, to make it work were these ones

Jupyter, Pylance and Python. Because all of them were updated yesterday, the day that started having problems.

So maybe just uninstalling those 3 might be enough to make the blender extension to work again.

Bellow are the screenshot of them

Image

Image

Image

carlosedubarreto avatar Mar 07 '25 10:03 carlosedubarreto

@carlosedubarreto : No, I meant the Python Debugger component as this is the one which needs a connection to Blender and also made problems before the last update ("...already been debugged..."). Try to only deinstall and install this one again. I didn't reinstall any of the extensions you've listed and it worked after this one. Moreover: It doesn't help to reinstall Python as Blender has it's own Python interpreter which will not change (only with a new Blender version). And Jupyter has nothing to do with Blender, as far as I know.

Bitsqueezer2025 avatar Mar 07 '25 12:03 Bitsqueezer2025

install pre version python debugger really work!

achlin512 avatar Mar 07 '25 15:03 achlin512

@Bitsqueezer2025 Thanks a loooot for the tip! Resintalling just Python Debugger fixed the issue, which appeared tonight on my side. I also had the popup message "already been debugged bla bla" before that during a few days, but I wasn't able to fix it (that didn't prevent the debugger to work though).

werwack avatar Mar 09 '25 20:03 werwack

@carlosedubarreto : No, I meant the Python Debugger component as this is the one which needs a connection to Blender and also made problems before the last update ("...already been debugged..."). Try to only deinstall and install this one again. I didn't reinstall any of the extensions you've listed and it worked after this one. Moreover: It doesn't help to reinstall Python as Blender has it's own Python interpreter which will not change (only with a new Blender version). And Jupyter has nothing to do with Blender, as far as I know.

LOL, I didnt noticed that was one called "python Debbuger" that makes sense, as everyone is saying, I was also getting some strange messages

Thanks a lot.

carlosedubarreto avatar Mar 10 '25 06:03 carlosedubarreto

Hi, I have the same problem. The debugging was working few days ago and now it is stuck on "Waiting for debug client." I suspect it happened after running a tool at work that setups a bunch of stuff for a project. But the tool is a blackbox and I have no idea what it changed. Or maybe it can be also unrelated. I reinstalled everything VSCode Blender... but nothing changed. Checked the firewall there is no Blender or python entries. Any way to debug what is going on? I'm pretty new to python development and VSCode. Thanks a lot!

fos4o avatar May 16 '25 09:05 fos4o

I've just installed the newest Python debugger extension version, was no problem and it still worked with Blender (I use 4.4).

So if you think it could have done with any other extension: In the extension list there is a preference icon for each where you can choose "disable". I would disable all one by one, beginning with the one where you believe it could make problems and try out if it works.

Bitsqueezer2025 avatar May 16 '25 12:05 Bitsqueezer2025

Using blender 4.4.0 I updated my Vscode and it works fine. I seems to connect even to Blender 2.90.1. Maybe older dependencies does break at some point when updating Vscode?

@fos4o can you run in blender this snippet?

import pkg_resources
for dist in pkg_resources.working_set:
    print(f"{dist.project_name}=={dist.version}")
Detailed Verions
# auto update is on for python extension
ms-python.debugpy
Version 2025.8.0
Version: 1.97.2 (system setup)
Commit: e54c774e0add60467559eb0d1e229c6452cf8447
Date: 2025-02-12T23:20:35.343Z
Electron: 32.2.7
ElectronBuildId: 10982180
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.22631

Dependencies in blender runtime:

>>> for dist in pkg_resources.working_set:
...     print(f"{dist.project_name}=={dist.version}")
...     
click==8.1.8
jinja2==3.1.6
werkzeug==3.1.3
flask==3.0.3
MarkupSafe==3.0.2
itsdangerous==2.2.0
blinker==1.9.0
debugpy==1.8.14
colorama==0.4.6
certifi==2021.10.8
setuptools==63.2.0
pip==24.0
idna==3.3
Cython==3.0.11
requests==2.27.1
pycodestyle==2.12.1
autopep8==2.3.1
charset-normalizer==2.0.10
urllib3==1.26.8
numpy==1.26.4
meson==0.63.0
zstandard==0.16.0

I updated to

Version: 1.100.2 (system setup)
Commit: 848b80aeb52026648a8ff9f7c45a9b0a80641e2e
Date: 2025-05-14T21:47:40.416Z
Electron: 34.5.1
ElectronBuildId: 11369351
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.22631

Mateusz-Grzelinski avatar May 16 '25 14:05 Mateusz-Grzelinski

Thanks. This is what I get after running it

click==8.2.0 jinja2==3.1.6 werkzeug==3.1.3 flask==3.0.3 MarkupSafe==3.0.2 itsdangerous==2.2.0 blinker==1.9.0 debugpy==1.8.14 colorama==0.4.6 certifi==2021.10.8 setuptools==63.2.0 pip==24.0 idna==3.3 Cython==3.0.11 requests==2.27.1 pycodestyle==2.12.1 autopep8==2.3.1 charset-normalizer==2.0.10 urllib3==1.26.8 numpy==1.26.4 meson==0.63.0 zstandard==0.16.0

It is strange that it was working few days ago with blender 4.4.0. And then stopped. I tried reinstalling everything. I'm now with blender 4.4.3. I tried on my computer at home today with blender 4.4.3 and it works fine. Something changed on my work computer probably after setting up one project but I do not have any idea what. I checked and the environment variables but there is nothing suspicious that can break the connection.

fos4o avatar May 16 '25 15:05 fos4o

Ok I found the problem after some debugging. At work there is proxy for connecting to internet it is set to "Automatically detect settings" (windows) No idea why but it goes through the proxy and for localhost requests. The authentication fails. This is in "communication.py" -> "def send_dict_as_json" -> requests.post(EDITOR_ADDRESS, json=data) So thanks to this Python requests return 504 in localhost I added before the request to skip the proxy for localhost os.environ['NO_PROXY'] = 'localhost'

fos4o avatar May 20 '25 07:05 fos4o