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

OSError: [Errno 10013] - BlenderKit might get blocked by antivirus (Commodo, McAffee, Norton360) #259

Closed
Poduhvat opened this issue Aug 28, 2022 · 21 comments
Assignees
Labels
bug Something isn't working known issue unstale Issue is marked as unstale, it will not stale/close due to inactivity.

Comments

@Poduhvat
Copy link

Poduhvat commented Aug 28, 2022

Describe the bug

When installed or activated within Blender 3.2.2 at windows 10 makes Blender bugging i.e. working extremely slow, with 15 to 20 seconds reaction to even simplest commands like rotating or moving default cube. When deactivated or removed Blender works normally.

Expected behavior

Should react in a moment like Blender works without this kit or with previous version of Blender kit.

Screenshots/video

No response

Logs

Traceback (most recent call last):
File "[Blender 3.2 file path]\3.2\scripts\addons\blenderkit\timer.py", line 49, in timer
results = daemon_lib.get_reports(app_id)
File "[Blender 3.2 file path]\3.2\scripts\addons\blenderkit\daemon_lib.py", line 53, in get_reports
resp = session.get(url, json=data)
File "[Blender 3.2 file path]\3.2\python\lib\site-packages\requests\sessions.py", line 542, in get
return self.request('GET', url, **kwargs)
File "[Blender 3.2 file path]\3.2\python\lib\site-packages\requests\sessions.py", line 529, in request
resp = self.send(prep, **send_kwargs)
File "[Blender 3.2 file path]\3.2\python\lib\site-packages\requests\sessions.py", line 645, in send
r = adapter.send(request, **kwargs)
File "[Blender 3.2 file path]\3.2\python\lib\site-packages\requests\adapters.py", line 519, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=62485): Max retries exceeded with url: /report (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000019888C85CC0>: Failed to establish a new connection: [WinError 10061] No connection could be made
because the target machine actively refused it'))

Environment

  • BlenderKit version: the last one 3.1.7
  • Blender version: 3.2.2
  • Operating system: windows 10
  • additional specifics?

Additional information

No response

@MicheleGiunto
Copy link

Same thing happens to me. Here's more info:

Traceback (most recent call last):
File "[Blender 3.2 file path]\3.2\scripts\addons\blenderkit\timer.py", line 49, in timer
results = daemon_lib.get_reports(app_id)
File "[Blender 3.2 file path]\3.2\scripts\addons\blenderkit\daemon_lib.py", line 53, in get_reports
resp = session.get(url, json=data)
File "[Blender 3.2 file path]\3.2\python\lib\site-packages\requests\sessions.py", line 542, in get
return self.request('GET', url, **kwargs)
File "[Blender 3.2 file path]\3.2\python\lib\site-packages\requests\sessions.py", line 529, in request
resp = self.send(prep, **send_kwargs)
File "[Blender 3.2 file path]\3.2\python\lib\site-packages\requests\sessions.py", line 645, in send
r = adapter.send(request, **kwargs)
File "[Blender 3.2 file path]\3.2\python\lib\site-packages\requests\adapters.py", line 519, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=62485): Max retries exceeded with url: /report (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000019888C85CC0>: Failed to establish a new connection: [WinError 10061] No connection could be made
because the target machine actively refused it'))

in loop, freezing Blender at every single attempt of connection

@Poduhvat
Copy link
Author

I am not a software developer, just a user. I find out a problem and report it.

@agajdosi
Copy link
Member

agajdosi commented Sep 1, 2022

Hi @Poduhvat, thank you for your report. Also thank you @MicheleGiunto for the logs, it seems the problems are the same: the add-on starts a background server which downloads the assets and in your cases the server is not responding - meaning it probably did not start for some reason. If you want to debug, there is a file located at: C:/Users/<username>/blenderkit_data/blenderkit_daemon_62485.log which contains logs from the server - from it we should get why it did not start.

If you paste us the log, we will find a solution for you. It could be an antivirus, we had cases like that before... or something else.

In all cases we recently created a fix for better handling of this situation so the Blender does not lag, even though the search will not work, and the add-on will print out the messages to GUI, so it is more understandable what is going on, right now it can be quite hidden if one does not dig into the console.

@agajdosi agajdosi added bug Something isn't working HIGH NEEDS INFO Issue needs information from its creator or other users. labels Sep 1, 2022
@agajdosi agajdosi modified the milestone: v3.2.0 Sep 1, 2022
@Poduhvat
Copy link
Author

Poduhvat commented Sep 1, 2022

Thank you for the answer agajdosi. I had solved the problem by installing older version of Blenderkit 3.0.5 which works perfectly. So in order to find what is problem maybe you just need to compare changes which are made in 3.1.7 version relative to 3.0.5. version.

@agajdosi
Copy link
Member

agajdosi commented Sep 2, 2022

@Poduhvat I am glad 3.0.5 works fine for you. For the requests on models, images etc. it uses threads, which were announced by Blender devs as not completely safe to us. At the moment of 3.0.5 we had several reports of Blender just randomly crashing which is quite annoying from the perspective of the user and also developer of the software - as basically both cannot do much more than just hoping...

We investigated and tested several proposals for the solution and one which we evaluated as the best was to move the threading outside of the Blender into separate program running in the background - the daemon server which is part of the add-on since 3.1.0. For most users it fixed the problems and we are pretty happy with the overall results (and so we move more and more computing and tasks from the add-on to the daemon server). However the downside is... that on some systems (mostly Windows with some strange antiviruses) the daemon might not start which then leads to the error @MicheleGiunto posted. There the add-on tries to communicate with the local daemon server, but the requests fails as the daemon is not running and action is required to find out and fix.

It does not happen often at least from out data. But that does not mean we are not working on fixing it. I fully understand how frustrating it can be that something just does not work out of the box. So we recently pushed a PR which improves the error message to the users and also prevents the add-on from lags when daemon is not running - the add-on will not search and basically not work, but at least the Blender will not be affected. And now we are working on making the start more robust. But one thing is our side and another are the hundreds of antiviruses which sometimes might block the daemon - we slowly need to cover all of those and that will require some feedback from users and also some time. We already covered some, but it is a long run unfortunately.

@MicheleGiunto
Copy link

@agajdosi this is the daemon log

unhandled exception during asyncio.run() shutdown
task: <Task finished name='Task-1' coro=<_run_app() done, defined at [Blender 3.2 file path]\3.2\scripts\addons\blenderkit\dependencies\Windows\aiohttp\web.py:287> exception=OSError(10013, "error while attempting to bind on address ('[host IP]', [port?]): An attempt was made to access a socket in a way forbidden by its access permissions")>
Traceback (most recent call last):
File "[Blender 3.2 file path]\3.2\scripts\addons\blenderkit\dependencies\Windows\aiohttp\web.py", line 514, in run_app
loop.run_until_complete(main_task)
File "[Blender 3.2 file path]\3.2\python\lib\asyncio\base_events.py", line 641, in run_until_complete
return future.result()
File "[Blender 3.2 file path]\3.2\scripts\addons\blenderkit\dependencies\Windows\aiohttp\web.py", line 413, in _run_app
await site.start()
File "[Blender 3.2 file path]\3.2\scripts\addons\blenderkit\dependencies\Windows\aiohttp\web_runner.py", line 121, in start
self._server = await loop.create_server(
File "[Blender 3.2 file path]\3.2\python\lib\asyncio\base_events.py", line 1493, in create_server
raise OSError(err.errno, 'error while attempting '
OSError: [Errno 10013] error while attempting to bind on address ('[host IP]', [port?]): An attempt was made to access a socket in a way forbidden by its access permissions
Traceback (most recent call last):
File "[Blender 3.2 file path]\3.2\scripts\addons\blenderkit\daemon\daemon.py", line 227, in
web.run_app(server, host='[host IP]', port=args.port)
File "[Blender 3.2 file path]\3.2\scripts\addons\blenderkit\dependencies\Windows\aiohttp\web.py", line 514, in run_app
loop.run_until_complete(main_task)
File "[Blender 3.2 file path]\3.2\python\lib\asyncio\base_events.py", line 641, in run_until_complete
return future.result()
File "[Blender 3.2 file path]\3.2\scripts\addons\blenderkit\dependencies\Windows\aiohttp\web.py", line 413, in _run_app
await site.start()
File "[Blender 3.2 file path]\3.2\scripts\addons\blenderkit\dependencies\Windows\aiohttp\web_runner.py", line 121, in start
self._server = await loop.create_server(
File "[Blender 3.2 file path]\3.2\python\lib\asyncio\base_events.py", line 1493, in create_server
raise OSError(err.errno, 'error while attempting '
OSError: [Errno 10013] error while attempting to bind on address ('[host IP]', [port?]): An attempt was made to access a socket in a way forbidden by its access permissions

@agajdosi
Copy link
Member

agajdosi commented Sep 2, 2022

Thanks @MicheleGiunto! It could that the port is already used by another application, in the Blender preferences for the BlenderKit add-on, there is an option called daemon port, please try to select another port number and lets see if that fixes the problem. If any port works for you, then please let me know, we will need investigate, why your system prevents opening any port from Blender, but for now the easiest bet is that the port is occupied, not blocked, so please try select another port.

@J-ester93
Copy link

@Poduhvat
This worked for me:
the problem in my case was the firewall (Comodo), anyway I think all of them works in the same way.
Open firewall c.panel, find the activity panel, look for -unlock application- panel, a list will comes out in a new window, run the list and look for all blenderkit related activitities and unlock them by pressing right mouse and chosing unlock.

That's all folks!

bye

@agajdosi
Copy link
Member

agajdosi commented Sep 5, 2022

@J-ester93 Thank you for your logs and all the information! I am glad it works for you now.

I have created a follow up issue #271 in which we will catch the OSError: [Errno 10013] and will print an information how to get over it - the solution you have provided. Previously we have added a catch for another OS/Win Error connected to Commodo, but it seems it can block in various ways with various errors as results. 😿

@sboddy
Copy link

sboddy commented Sep 13, 2022

An FYI for McAffee users. Trying to open the default 62485 port didn't work for me. Maybe I'm doing it wrong. Changing the port in BK prefs to 1234 works, and needs no firewall rule. Blender is back to being buttery smooth.

@agajdosi agajdosi self-assigned this Sep 13, 2022
@agajdosi agajdosi changed the title Blender kit 3.1.7 for Blender 3.2.2 work blocking at windows 10 BlenderKit might get blocked by antivirus (Commodo, McAffee) - lagging UI, Max retries exceeded with url: /report Sep 13, 2022
@agajdosi
Copy link
Member

Thank you for sharing the information @sboddy! 🥇

@Poduhvat
Copy link
Author

Poduhvat commented Oct 11, 2022 via email

@agajdosi agajdosi removed their assignment Nov 7, 2022
@agajdosi agajdosi changed the title BlenderKit might get blocked by antivirus (Commodo, McAffee) - lagging UI, Max retries exceeded with url: /report BlenderKit might get blocked by antivirus (Commodo, McAffee) - OSError: [Errno 10013] Nov 21, 2022
@agajdosi agajdosi assigned agajdosi and unassigned agajdosi Dec 14, 2022
@agajdosi agajdosi added known issue and removed NEEDS INFO Issue needs information from its creator or other users. labels Dec 15, 2022
@agajdosi agajdosi removed this from the 3.4.0 milestone Dec 15, 2022
@agajdosi
Copy link
Member

Hi @Xerisz, could you please try to change the port in the configuration settings of the add-on? It is possible that some process on your system already uses the port 62485 which blocks the add-on from starting a daemon process using this port.

@agajdosi
Copy link
Member

There is a new version comming which could help with the problems, you can try it in here:
blenderkit-3.3.2.221220.zip

@agajdosi
Copy link
Member

In rare cases the port can be in the ranges excluded by Windows, to check the excluded ranges, you can run in PowerShell:

netsh interface ipv4 show excludedportrange protocol=tcp

If the BlenderKit's daemon's port (default port number: 62485) is in the range, please choose different port in the add-on preferences.

Trying with different port number is a good idea even though the port is not in the excluded ranges.

@agajdosi
Copy link
Member

Hi all,

we have just recently released a new public pre-release of the add-on. Could you please try it and let us know if this problem is still present or was fixed in this new version?

To install this pre-release you can:

  • Simply check the Enable prereleases option in the add-on preferences and then hit the Check now for blenderkit update.
  • Or you can download the pre-release from its release page as a .ZIP and install it manually into the Blender.

@Xerisz
Copy link

Xerisz commented Jan 17, 2023 via email

@github-actions github-actions bot added the stale label Feb 17, 2023
@agajdosi agajdosi changed the title OSError: [Errno 10013] - BlenderKit might get blocked by antivirus (Commodo, McAffee) OSError: [Errno 10013] - BlenderKit might get blocked by antivirus (Commodo, McAffee, Norton360) Feb 24, 2023
@agajdosi
Copy link
Member

Recently problem with daemon being blocked was also reported with Norton360: #534 (comment).

@github-actions github-actions bot removed the stale label Feb 25, 2023
@github-actions github-actions bot added the stale label Mar 28, 2023
@BlenderKit BlenderKit deleted a comment from github-actions bot Mar 28, 2023
@BlenderKit BlenderKit deleted a comment from github-actions bot Mar 28, 2023
@agajdosi agajdosi removed the stale label Mar 28, 2023
@github-actions github-actions bot added the stale label Apr 28, 2023
@BlenderKit BlenderKit deleted a comment from github-actions bot Apr 28, 2023
@agajdosi agajdosi added unstale Issue is marked as unstale, it will not stale/close due to inactivity. and removed stale labels Apr 28, 2023
@PetrDlouhy PetrDlouhy removed the HIGH label Sep 20, 2023
@agajdosi agajdosi mentioned this issue Jan 12, 2024
@agajdosi
Copy link
Member

Please update to https://github.com/BlenderKit/BlenderKit/releases/tag/v3.12.0.240423, this release contains code-signed Client binaries (doing what was previously doing Client). Code-signed binaries tells the OS and antiviruses, that BlenderKit has produced and signed the code which should increase their trust. If you still face trouble, please report the BlenderKit Client binary as false positive, once they scan the binary, they should move it to whitelist and no longer block that version or future versions signed with same certificate.

@agajdosi agajdosi self-assigned this Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working known issue unstale Issue is marked as unstale, it will not stale/close due to inactivity.
Projects
None yet
Development

No branches or pull requests

7 participants