Page 1 of 2

[SOLUTION] "Accept incoming connections" every time qBittorent is opened

Posted: Sat Nov 05, 2016 12:36 am
by Rainmaker
I realise this topic is old  :o but I finally found a solution to this annoying issue, which I've also been experiencing for a couple of years. It turns out the problem lies with the certificate system and keychain, and you can fix it by doing the following.

Open a Terminal session (Applications > Utilities, or CMD + Space and type 'Terminal' and hit enter). Then type in:

Code: Select all

cd /Applications
then

Code: Select all

sudo codesign --force --deep --sign - ./qbittorrent.app
Now start the qbittorrent app, and it will pop up the same old annoying prompt about accepting incoming connections... Except, this time, it'll be the last and only time you ever see it again. Fixed! I don't know if this survives updates/upgrades but it's easy enough to repeat occasionally if the need arises. To the OP and others, I hope this helps solve your frustrations as it did mine.

Edited to add: I don't know if this certificate/signing issue is due to the way qbittorrent is packaged/built, or a flaw in the way macOS handles it. Either way a fix is a fix.

Re: [SOLUTION] "Accept incoming connections" every time qBittorent is opened

Posted: Sat Jan 14, 2017 12:54 pm
by gerinho
Thanks Rainmaker  :) it works fine!

Re: [SOLUTION] "Accept incoming connections" every time qBittorent is opened

Posted: Tue Jan 17, 2017 4:08 pm
by Peter
I have stickied your solution, Rainmaker.
Thank you for sharing!

Re: [SOLUTION] "Accept incoming connections" every time qBittorent is opened

Posted: Tue Jan 17, 2017 9:49 pm
by chrstphrchvz
Original thread poster here.

Thanks for finding this, it's the same as the workaround that @chriswayg identified on Github issue #3885, and @madranet says it indeed does not survive updates.

However, I am under the impression no qBittorrent-side fixes would be considered as the consensus is that the issue due to a "firewall bug".

Re: [SOLUTION] "Accept incoming connections" every time qBittorent is opened

Posted: Sun Jul 30, 2017 7:37 pm
by Rubl
I get this error when I try to sign Qbittorrent as stated in the solution:

./qbittorrent.app: resource fork, Finder information, or similar detritus not allowed

Do others have the same problem? If yes, anybody found a solution?

Re: [SOLUTION] "Accept incoming connections" every time qBittorent is opened

Posted: Mon Mar 19, 2018 4:14 pm
by TheoThistle
Just followed directions and received this message:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
./qbittorrent.app: the codesign_allocate helper tool cannot be found or used
In subcomponent: /Applications/qbittorrent.app/Contents/PlugIns/platforms/libqcocoa.dylib




[quote="Rainmaker"]
I realise this topic is old  :o but I finally found a solution to this annoying issue, which I've also been experiencing for a couple of years. It turns out the problem lies with the certificate system and keychain, and you can fix it by doing the following.

Open a Terminal session (Applications > Utilities, or CMD + Space and type 'Terminal' and hit enter). Then type in:

Code: Select all

cd /Applications
then

Code: Select all

sudo codesign --force --deep --sign - ./qbittorrent.app
Now start the qbittorrent app, and it will pop up the same old annoying prompt about accepting incoming connections... Except, this time, it'll be the last and only time you ever see it again. Fixed! I don't know if this survives updates/upgrades but it's easy enough to repeat occasionally if the need arises. To the OP and others, I hope this helps solve your frustrations as it did mine.

Edited to add: I don't know if this certificate/signing issue is due to the way qbittorrent is packaged/built, or a flaw in the way macOS handles it. Either way a fix is a fix.
[/quote]

Re: [SOLUTION] "Accept incoming connections" every time qBittorent is opened

Posted: Sun Sep 30, 2018 12:39 pm
by WastedEffort
Hello, fellows!

Could someone please clarify if the solution decribed above presents any threat to privacy of my machine? What's the catch? If it's so easy to fix - why it was never fixed in app itself?

Re: [SOLUTION] "Accept incoming connections" every time qBittorent is opened

Posted: Thu Oct 18, 2018 5:59 pm
by chrstphrchvz
[quote="WastedEffort"]
Hello, fellows!

Could someone please clarify if the solution decribed above presents any threat to privacy of my machine? What's the catch? If it's so easy to fix - why it was never fixed in app itself?
[/quote]

Please refer to the original thread this one was split from for more background. The qBittorrent team decided 3 years ago that they will not perform any fixes or workarounds themselves, as they blame the issue entirely on macOS' firewall for it not dealing with unsigned programs like qBittorrent correctly.

(However, given the trend of major operating systems moving toward mandatory code signing, I don't think Apple will ever address whether macOS' firewall works with unsigned programs or not.)

Signing qBittorrent doesn't change the program itself; think of it as a way of letting macOS know "this program hasn't been tampered with", which in this case happens to get around the "bug" in macOS' firewall. As this workaround only helps ensure normal operation of qBittorrent, it poses no increased risk to privacy than when using qBittorrent normally.

Re: [SOLUTION] "Accept incoming connections" every time qBittorent is opened

Posted: Thu Jan 03, 2019 5:06 pm
by NationalDentures
I got the same error as TheoThistle did above:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
./qbittorrent.app: the codesign_allocate helper tool cannot be found or used
In subcomponent: /Applications/qbittorrent.app/Contents/PlugIns/platforms/libqcocoa.dylib
and was able to solve it by running the following before running codesign:

Code: Select all

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
Answer found here: https://stackoverflow.com/questions/33003734/code-signing-missing-developer-dir-path

Re: [SOLUTION] "Accept incoming connections" every time qBittorent is opened

Posted: Fri Jun 07, 2019 3:18 pm
by johnny jackhammer
The issue is that qBittorent developers don't charge for this software but Apple charges for a developer license. In order to "sign" the app the developers would need to pay for an Apple developer license. Not going to happen. So the software is unsigned. This is the way it always was in the past, but now we are expecting more security. In lieu of signing the app qBittorent provides you a checksum of the files you download to make sure the code hasn't been modified. You should compare the checksum of the file you downloaded against the checksum that is listed on the website. If you trust the developers of qBittorent, then that's good enough.

Follow the advice on this thread or go to this page and follow the advice. It's the same.

https://superuser.com/questions/912656/ ... onnections

Re: [SOLUTION] "Accept incoming connections" every time qBittorent is opened

Posted: Fri May 08, 2020 5:43 pm
by abojo
just logged in to say thanks big time <3

Re: [SOLUTION] "Accept incoming connections" every time qBittorent is opened

Posted: Mon Jun 22, 2020 11:49 pm
by didymus
OH THANK YOU JESUS!!

Re: [SOLUTION] "Accept incoming connections" every time qBittorent is opened

Posted: Tue Jul 28, 2020 2:03 am
by Daskarzine
Hi - this doesn't work for me - is it because I'm on Catalina?

Re: [SOLUTION] "Accept incoming connections" every time qBittorent is opened

Posted: Wed Oct 21, 2020 10:25 am
by havajc
I just updated QBittorrent to new version 4.3.0. and this solution doesn't work for me anzmore (it worked in previous versions).
I am also on Catalina, any new proposal how to solve this ?

Re: [SOLUTION] "Accept incoming connections" every time qBittorent is opened

Posted: Tue Jan 26, 2021 6:57 pm
by Deno
This seems to have stopped working as of Big Sur. Any solutions?