Author Topic: [SOLUTION] "Accept incoming connections" every time qBittorent is opened  (Read 5219 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: 5
  • 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: 1552
  • 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: 10
  • 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: 10
  • 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.