spieglt / FlyingCarpet

Cross-platform AirDrop. File transfer between Android, iOS, Linux, macOS, and Windows over ad hoc WiFi. No network infrastructure required, just two devices with WiFi chips in close range.
GNU General Public License v3.0
3.59k stars 145 forks source link

Error starting TCP connection: Connection refused (os error 61) #86

Open adamlogan opened 2 weeks ago

adamlogan commented 2 weeks ago

I was testing sending a PNG file from my 2021 MacBook Pro 14-inch, M1 Pro to my Android phone, a Pixel 7A. I kept getting OS Error (61).

On Android Phone: I tried disabling Adguard on the Android phone (as it has a firewall feature), and turned off private DNS as well. I changed hotspot from 5 ghz to 2.4 ghz based on another thread I saw on here saying flying carpet does not support 5 ghz. I checked for built-in firewall, afaik, there isn't one I have access to?

On MacOS M1 Mabook Pro: • I disabled adguard. • I disabled Little Snitch. • I added a rule in MacOS built-in App firewall to allow inbound connections to Flying Carpet (I selected the app). • I added Flying Carpet to permission for Full Disk Access. The file I am trying to share is on the Desktop. Flying Carpet for MacOS should add functions to check and request permissions to access specific Files and Folders MacOS protected directories which include: Desktop, Documents, Downloads, Pictures, Movies, Music, Mail, Calendars, Contacts, Reminders. Diligence advised on what makes sense to request permissions for. Should definitely make it optional for users which permissions to give.

Even after manually adding Full Disk Access for Flying Carpet which I really would not have to do, but since MacOS does not provide a way to manually add apps to Files & Folders afaik this is something the dev has to build into the app somehow, I have no other choice, I am still getting that error.

Consider this a feature request for permissions functions, and also an issue because I still can't send from MacOS to Android despite what I've tried.

spieglt commented 1 week ago

Which side said OS Error (61), the Mac? Please paste the full output of both sides. You should not have to modify disk permissions to address a TCP error. The Android device should be hosting the hotspot, so if the Mac is complaining that the connection is being refused, it sounds like the Android isn’t listening for a connection when it should be. But I’ll need full outputs to diagnose.

Once I finish the Bluetooth functionality, the macOS version will be written natively in Swift which should mean less friction with permissions and such. But no changes will be made to the current macOS version before then.