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

MAC OS X specific questions, problems.
Rainmaker

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

Post 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.
Last edited by Rainmaker on Sat Nov 05, 2016 12:40 am, edited 1 time in total.
gerinho

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

Post by gerinho »

Thanks Rainmaker  :) it works fine!
User avatar
Peter
Administrator
Administrator
Posts: 2693
Joined: Wed Jul 07, 2010 6:14 pm

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

Post by Peter »

I have stickied your solution, Rainmaker.
Thank you for sharing!
chrstphrchvz

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

Post 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".
Rubl

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

Post 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?
TheoThistle

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

Post 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]
WastedEffort

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

Post 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?
chrstphrchvz

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

Post 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.
NationalDentures

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

Post 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
johnny jackhammer
Newbie
Newbie
Posts: 16
Joined: Thu May 17, 2018 2:46 pm

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

Post 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
abojo

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

Post by abojo »

just logged in to say thanks big time <3
didymus

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

Post by didymus »

OH THANK YOU JESUS!!
Daskarzine

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

Post by Daskarzine »

Hi - this doesn't work for me - is it because I'm on Catalina?
havajc

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

Post 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 ?
Deno

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

Post by Deno »

This seems to have stopped working as of Big Sur. Any solutions?
Post Reply