grishka / NearDrop

An unofficial Google Nearby Share/Quick Share app for macOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't share from Android -> Mac OS anymore

ciriousjoker opened this issue · comments

I haven't updated NearDrop (still v2.0.2) and it worked a while back. Since then, I've updated Mac OS to Sonoma 14.1.1 (from 14.1.0 I believe), perhaps even 14.0.x. I have not updated my Android phone in that time, except probably an automatic security patch.

Whenever I send a file, no matter if via Solid Explorer or Google Files, the transfer fails.

  • I get a very short lived notification saying "device is
  • I get a notification saying "Pixel 4 XL wants to send xyz.png" with the option button, but it immediately disappears
  • On my Android 13 device (Pixel 4 XL), it shows me a PIN
  • After 10 secs or so it times out and it says "failed"

Mac OS -> Android 13 works as it's supposed to.

Did Apple change the notification behavior again?..

The notification does appear and the app has permission:
CleanShot 2023-11-09 at 07 53 29@2x

Btw, NearDrop has no "Bluetooth Permission", isn't that necessary? (mac -> android works!)
CleanShot 2023-11-09 at 07 52 51@2x

Give me an hour or so, I'll clone this repo and see for myself, perhaps I find out more.

The notification does appear and the app has permission:

That's the thing, it's supposed to be the rightmost option ("alerts"). I don't know why and how it gets reset for some users. I've not updated to Sonoma myself yet because I've grown risk-averse in regard to macOS updates over the years.

Btw, NearDrop has no "Bluetooth Permission", isn't that necessary?

No, it doesn't use Bluetooth. I tried but there's no API to set the fields on the broadcast that Android devices listen for. That's the reason you have to open Google Files to become visible.

I gave the rightmost permission, but it still fails, even after quitting and restarting NearDrop.

Log output when run via XCode.

Deserialization error: requiredFieldMissing in state waitingForUserConsent
Sent keep-alive

Oh, that's odd. Did Google introduce a new packet type that messes up everything? But then it shouldn't have been triggered by a macOS update, and I can't reproduce it myself.

I should add a verbose logging mode to debug these kinds of problems.

I can't reproduce it consistently in XCode yet, only in the 2.0.2 release version. In XCode it failed at the start, but now it seems to work idk. It started to work as soon as I set a breakpoint ...

Stacktrace, maybe it helps:
CleanShot 2023-11-09 at 08 13 48@2x

hasType seems to be false (NearbyConnection.swift:261)
CleanShot 2023-11-09 at 08 35 38@2x

Not sure what to make of it though. The "SwiftProtobuf.UnknownStorage" also appears in multiple places.

I can't give NearDrop access to "Files and Folders" (no plus button, permission probably needs to be requested by the app).
I've tried giving NearDrop full disk access (now it shows up in "Files and Folders" as well), but it doesn't help.

Running NearDrop via sudo ./Applications/NearDrop.app also doesn't help.

If I build it myself using XCode, the resulting NearDrop.app file works... Maybe because I'm signing it differently? I made no changes to the code apart from some print() statements... The built app is 23.1 MB vs 13.3 MB for the official version, probably just because it's a debug build though.

That sure does look like a new type of packet. It might be a better strategy to silently ignore everything I can't parse.

Keep in mind, the print() error messages appear even when everything works properly via XCode.

Here's also the Konsole output:

Details

standard 08:55:49.565346+0100 NearDrop [C3 IPv4#8a4eb796:39022 initial channel-flow (satisfied (Path is satisfied), interface: en0, scoped, ipv4, dns)] event: flow:start_nexus @71348.534s
standard 08:55:49.565896+0100 NearDrop [C3 IPv4#8a4eb796:39022 initial channel-flow (satisfied (Path is satisfied), viable, interface: en0, scoped, ipv4, dns)] event: flow:receive_nexus @71348.535s
standard 08:55:49.566803+0100 NearDrop [C3 FE5090B6-4361-42C4-B992-1DDA16A39A58 IPv4#8a4eb796:39022 tcp, definite, server, attribution: developer, reuse local address, context: Default Network Context (private), proc: F171DACD-364E-3867-8B0B-BB05AE6100AF, local address: 192.168.1.166:57948] start
standard 08:55:49.567030+0100 NearDrop [C3 IPv4#8a4eb796:39022 initial channel-flow (satisfied (Path is satisfied), viable, interface: en0, scoped, ipv4, dns)] event: path:start @0.000s
standard 08:55:49.567117+0100 NearDrop [C3 IPv4#8a4eb796:39022 waiting channel-flow (satisfied (Path is satisfied), viable, interface: en0, scoped, ipv4, dns)] event: path:satisfied @0.000s, uuid: 6584573A-5306-40D5-95FA-24DC2A06650C
standard 08:55:49.567356+0100 NearDrop [C3 IPv4#8a4eb796:39022 in_progress channel-flow (satisfied (Path is satisfied), viable, interface: en0, scoped, ipv4, dns)] event: flow:start_connect @0.000s
standard 08:55:49.567393+0100 NearDrop nw_connection_report_state_with_handler_on_nw_queue [C3] reporting state preparing
standard 08:55:49.567554+0100 NearDrop tcp_input [C3:1] flags=[S] seq=1989611472, ack=0, win=65535 state=LISTEN rcv_nxt=0, snd_una=0
standard 08:55:49.567682+0100 NearDrop tcp_output [C3:1] flags=[S.] seq=1640408313, ack=1989611473, win=65535 state=SYN_RCVD rcv_nxt=1989611473, snd_una=1640408313
standard 08:55:49.591801+0100 NearDrop nw_flow_connected [C3 IPv4#8a4eb796:39022 in_progress channel-flow (satisfied (Path is satisfied), viable, interface: en0, scoped, ipv4, dns)] Output protocol connected (tcp)
standard 08:55:49.591970+0100 NearDrop [C3 IPv4#8a4eb796:39022 ready channel-flow (satisfied (Path is satisfied), viable, interface: en0, scoped, ipv4, dns)] event: flow:finish_connect @0.025s
standard 08:55:49.592178+0100 NearDrop nw_connection_report_state_with_handler_on_nw_queue [C3] reporting state ready
standard 08:55:49.592226+0100 NearDrop [C3 IPv4#8a4eb796:39022 ready channel-flow (satisfied (Path is satisfied), viable, interface: en0, scoped, ipv4, dns)] event: flow:changed_viability @0.025s
standard 08:55:49.851336+0100 NearDrop [me.grishka.NearDrop] Adding notification request 870C-5C85 to destinations: Default
standard 08:55:49.854769+0100 NearDrop [me.grishka.NearDrop] Added notification request: [ hasError: 0 hasCompletionHandler: 1 ]
standard 08:55:49.960995+0100 NotificationCenter [com.apple.private.nc.dnd:3735BB99-6BA2-4686-9B85-BEDD0E314179] Resolving behavior for event, details=<DNDMutableClientEventDetails: 0x60000319e990; identifier: 'transfer_0FF36DB7-B053-4DD1-BE3E-2B886C61A2CC'; bundleIdentifier:: me.grishka.NearDrop; type: Default; urgency: Default; sender: (null); threadIdentifier: (null); filterCritera: (null); notifyAnyway: 0; behavior: Default>
standard 08:55:49.963059+0100 donotdisturbd Event was resolved: resolution=<DNDSEventBehaviorResolution: 0x13113dd70; UUID: 142BE4B1-759E-45B1-9DB1-A12345C748C9; date: 2023-11-09 07:55:49 +0000; eventBehavior: <DNDClientEventBehavior: 0x1311149e0; eventDetails: <DNDClientEventDetails: 0x13111c130; identifier: 'transfer_0FF36DB7-B053-4DD1-BE3E-2B886C61A2CC'; bundleIdentifier:: me.grishka.NearDrop; type: Default; urgency: Default; sender: (null); threadIdentifier: (null); filterCritera: (null); notifyAnyway: 0; behavior: Default>; interruptionSuppression: none; resolutionReason: disabled; activeModeUUID: (null)>; clientIdentifier: 'com.apple.nc.donotdisturb.user-toggles.preload'; outcome: allowed; reason: disabled>
standard 08:55:49.963808+0100 NotificationCenter [com.apple.private.nc.dnd:3735BB99-6BA2-4686-9B85-BEDD0E314179] Resolved event, details=<DNDMutableClientEventDetails: 0x60000319e990; identifier: 'transfer_0FF36DB7-B053-4DD1-BE3E-2B886C61A2CC'; bundleIdentifier:: me.grishka.NearDrop; type: Default; urgency: Default; sender: (null); threadIdentifier: (null); filterCritera: (null); notifyAnyway: 0; behavior: Default> behavior=<DNDClientEventBehavior: 0x600001ddd830; eventDetails: <DNDClientEventDetails: 0x600003180eb0; identifier: 'transfer_0FF36DB7-B053-4DD1-BE3E-2B886C61A2CC'; bundleIdentifier:: me.grishka.NearDrop; type: Default; urgency: Default; sender: (null); threadIdentifier: (null); filterCritera: (null); notifyAnyway: 0; behavior: Default>; interruptionSuppression: none; resolutionReason: disabled; activeModeUUID: (null)>
standard 08:55:49.963916+0100 NotificationCenter Resolved interruption suppression for me.grishka.NearDrop as none
standard 08:55:49.964487+0100 NotificationCenter [me.grishka.NearDrop:5FB14EB0] displaying as alert with pinning behavior .alert
standard 08:55:49.964639+0100 NotificationCenter Playing notification sound { } for me.grishka.NearDrop
standard 08:55:49.984767+0100 NotificationCenter [me.grishka.NearDrop:5FB14EB0] updating existing notification with content from 5FB14EB0
standard 08:55:50.257684+0100 NearDrop [me.grishka.NearDrop] Adding notification request 381C-1E9D to destinations: Default
standard 08:55:50.257829+0100 NearDrop [me.grishka.NearDrop] Removing 1 delivered notifications with identifiers (
"870C-5C85"
)
standard 08:55:50.258548+0100 NearDrop [me.grishka.NearDrop] Added notification request: [ hasError: 0 hasCompletionHandler: 1 ]
standard 08:55:50.259119+0100 NotificationCenter [com.apple.private.nc.dnd:85B8C2A0-3436-4C42-ADAF-2CDB388E1534] Resolving behavior for event, details=<DNDMutableClientEventDetails: 0x600003182b20; identifier: 'transferError_0FF36DB7-B053-4DD1-BE3E-2B886C61A2CC'; bundleIdentifier:: me.grishka.NearDrop; type: Default; urgency: Default; sender: (null); threadIdentifier: (null); filterCritera: (null); notifyAnyway: 0; behavior: Default>
standard 08:55:50.260046+0100 donotdisturbd Event was resolved: resolution=<DNDSEventBehaviorResolution: 0x130654bb0; UUID: 66C2B963-FB6B-4954-ACCD-EC953E0C739F; date: 2023-11-09 07:55:50 +0000; eventBehavior: <DNDClientEventBehavior: 0x130654440; eventDetails: <DNDClientEventDetails: 0x130619d30; identifier: 'transferError_0FF36DB7-B053-4DD1-BE3E-2B886C61A2CC'; bundleIdentifier:: me.grishka.NearDrop; type: Default; urgency: Default; sender: (null); threadIdentifier: (null); filterCritera: (null); notifyAnyway: 0; behavior: Default>; interruptionSuppression: none; resolutionReason: disabled; activeModeUUID: (null)>; clientIdentifier: 'com.apple.nc.donotdisturb.user-toggles.preload'; outcome: allowed; reason: disabled>
standard 08:55:50.260658+0100 NotificationCenter [com.apple.private.nc.dnd:85B8C2A0-3436-4C42-ADAF-2CDB388E1534] Resolved event, details=<DNDMutableClientEventDetails: 0x600003182b20; identifier: 'transferError_0FF36DB7-B053-4DD1-BE3E-2B886C61A2CC'; bundleIdentifier:: me.grishka.NearDrop; type: Default; urgency: Default; sender: (null); threadIdentifier: (null); filterCritera: (null); notifyAnyway: 0; behavior: Default> behavior=<DNDClientEventBehavior: 0x600001df7330; eventDetails: <DNDClientEventDetails: 0x6000031d4f50; identifier: 'transferError_0FF36DB7-B053-4DD1-BE3E-2B886C61A2CC'; bundleIdentifier:: me.grishka.NearDrop; type: Default; urgency: Default; sender: (null); threadIdentifier: (null); filterCritera: (null); notifyAnyway: 0; behavior: Default>; interruptionSuppression: none; resolutionReason: disabled; activeModeUUID: (null)>
standard 08:55:50.260715+0100 NotificationCenter Resolved interruption suppression for me.grishka.NearDrop as none
standard 08:55:50.261238+0100 NotificationCenter [me.grishka.NearDrop:84121663] displaying as alert with pinning behavior .alert
standard 08:55:50.261311+0100 NotificationCenter Unable to find notification to delete matching 5FB14EB0-C382-428F-B7A6-1FEB5828E8EF me.grishka.NearDrop
standard 08:55:50.270638+0100 NotificationCenter Unable to find notification to delete matching 5FB14EB0-C382-428F-B7A6-1FEB5828E8EF me.grishka.NearDrop
standard 08:55:50.270694+0100 NotificationCenter [me.grishka.NearDrop:84121663] updating existing notification with content from 84121663
standard 08:56:25.036539+0100 NearDrop tcp_input [C3:1] flags=[F.] seq=1989613724, ack=1640409049, win=351 state=ESTABLISHED rcv_nxt=1989613724, snd_una=1640409049
standard 08:56:25.036673+0100 NearDrop nw_protocol_tcp_log_summary [C3:1]
[186153D8-ED17-4ECB-84A7-8E6038E6D7B6 :57948<->:39022]
Init: 1, Conn_Time: 2629084.277ms, SYNs: 0, WR_T: 0/0, RD_T: 0/0, TFO: 0/0/0, ECN: 0/0/0, Accurate ECN (client/server): Disabled/Not requested, TS: 1, TSO: 0
rtt_cache: process, rtt_upd: 6, rtt: 15.000ms, rtt_var: 13.250ms rtt_nc: 20.031ms, rtt_var_nc: 16.312ms base rtt: 2ms
ACKs-compressed: 0, ACKs delayed: 1 delayed ACKs sent: 1
standard 08:56:36.537333+0100 Console update collaboration items for activityItems:(
"standard\t08:55:49.565896+0100\tNearDrop\t[C3 IPv4#8a4eb796:39022 initial channel-flow (satisfied (Path is satisfied), viable, interface: en0, scoped, ipv4, dns)] event: flow:receive_nexus @71348.535s\n"
)
standard 08:56:36.537386+0100 Console request collaboration items for activity items:(
"standard\t08:55:49.565896+0100\tNearDrop\t[C3 IPv4#8a4eb796:39022 initial channel-flow (satisfied (Path is satisfied), viable, interface: en0, scoped, ipv4, dns)] event: flow:receive_nexus @71348.535s\n"
)

Doesn't seem like the notification was killed by Apple though ("NearDrop] Removing 1 delivered ...")

Don't think I can help much further though, I'm not a swift/mac developer. If you think I can or you want me to try something, please let me know!

I'm desperately trying to get a damned link from my Pixel 7 (Android 14) to my Mac (Ventura 13.5.1) and the Mac doesn't show up on the Android. Never tried this app before but I followed someone else's instructions (are there official instructions? The app has nothing)

I'm going to leave a work-around here in case anyone else is having similar difficulty.

Android no longer supports the bluetooth file transfer standard and has their own proprietary BS now. The work-around is to download the app "Total Commander" which has built-in support for it.

@ballo I suspect you're having a different error. I have a Pixel 4 XL with Android 13 and when trying to send files to my nearby Mac Mini M2 with Sonoma 14.1.1 via Nearby Share, I can see the device. Even sending works perfectly fine when recompiling the NearDrop app myself.

I also tested this on a Pixel 6 with Android 14. Interestingly, even the file transfer works perfectly here.

Can repro on Pixel 8 Pro on Android 14 stable and Pixel 6 Pro on Android 14 QPR2 Beta 1.

NearDrop sends a notification saying my device wants to share and almost immediately turns into a "Communication error".

macOS 13.4.1 (MBP 2021), NearDrop 2.0 2.

This Mac is work-provided so my capacity for debugging might be a bit more limited but if there's anything you need from me, let me know.

After updating to Sonoma 14.1.2, NearDrop works as expected again. Perhaps there was really just that one MacOS version that broke everything. Especially since I couldn't reproduce it when compiling it myself via XCode.

Closed for now, will reopen if it occurs again.

Hi!
I'm on Sonoma 14.5 and the issue is here again, is anyone experiencing the same behavior ?

Hey, also experiencing this, actually crashes NearDrop when opening the notification

Had the same issue again, but it was fixed after updating to Neardrop v2.0.4.