Author Topic: [SOLUTION] "Accept incoming connections" every time qBittorent is opened  (Read 7365 times)

Rainmaker

  • Member
  • **
  • Posts: 35
  • Karma: +1/-0
    • View Profile
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]
cd /Applications
then

Code: [Select]
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 Edit: November 05, 2016, 01:40:44 am by Rainmaker »

gerinho

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: [SOLUTION] "Accept incoming connections" every time qBittorent is opened
« Reply #1 on: January 14, 2017, 01:54:08 pm »
Thanks Rainmaker  :) it works fine!

Peter

  • Administrator
  • Forum addict
  • *****
  • Posts: 1582
  • Karma: +37/-2
    • View Profile
Re: [SOLUTION] "Accept incoming connections" every time qBittorent is opened
« Reply #2 on: January 17, 2017, 05:08:57 pm »
I have stickied your solution, Rainmaker.
Thank you for sharing!
- qBittorrent team - server and forum administrator.
- Hungarian translation reviewer/moderator (+ translator).

Join the official qBittorrent Discord!
https://discord.gg/ma66Vv4

chrstphrchvz

  • Newbie
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: [SOLUTION] "Accept incoming connections" every time qBittorent is opened
« Reply #3 on: January 17, 2017, 10:49:29 pm »
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

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
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

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
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




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]
cd /Applications
then

Code: [Select]
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.

WastedEffort

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: [SOLUTION] "Accept incoming connections" every time qBittorent is opened
« Reply #6 on: September 30, 2018, 02:39:26 pm »
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

  • Newbie
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: [SOLUTION] "Accept incoming connections" every time qBittorent is opened
« Reply #7 on: October 18, 2018, 07:59:07 pm »
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?

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

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: [SOLUTION] "Accept incoming connections" every time qBittorent is opened
« Reply #8 on: January 03, 2019, 06:06:11 pm »
I got the same error as TheoThistle did above:

Quote
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]
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
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
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/how-do-i-stop-my-mac-from-asking-to-accept-incoming-network-connections