nearby-sharing / android

Share files between android and PC via the Windows 10 / 11 built-in sharing functionality (Project Rome)
https://nearshare.shortdev.de
GNU General Public License v3.0
647 stars 33 forks source link

`Missing permission` prompt #109

Closed ShortDevelopment closed 6 months ago

ShortDevelopment commented 9 months ago

Suddenly there was a problem when transferring data from the phone to the PC - "There is no permission!". The PC is not displayed in the window, while I can receive data from the PC to the phone. I have not noticed such problems before. The application worked stably and without failures. All rights are granted: access to the location (when using the application), as well as to the drive. The MAC address is also registered. It's just that at some point the application stopped working. I don't know what the reason might be. The application version is official (previously), the device is Redmi Note 8T (Android 11).


https://discord.com/channels/1059414830295035904/1152195242091618346

moriel5 commented 8 months ago

Can confirm that this bug is still present on 1.5.2-beta, at least on my Razer Phone 2 running stock Android 9.

Initially, after inputting my Bluetooth MAC address, it complained about missing permissions (despite me having already granted them from the get-go), but after revoking them and giving them when the app invoked the prompts, I was able to recieve files.

When I attempted to send files, it again complained about missing permissions, however revoking and granting permissions did not help (it did not even ask for the storage permission this time, which makes sense), and henceforth, this issue rendered both sending and receiving broken, even if I paired my laptop to my phone.

Great work, though (now, if there only was something standardized between different Linux ecosystems (i.e. DEs) and distros)!

ShortDevelopment commented 8 months ago

@moriel5 Thank you for your research! I'll look into this next week.

For a possible linux implementation have a look at https://github.com/nearby-sharing/cli/issues/1#issuecomment-1613581507

moriel5 commented 8 months ago

Thanks, that is awesome. I'll also look into packaging the CLI version for Solus when I can be on my desktop (Windows on my laptop is a temporary thing, until I get some 2nd hand enterprise SATA SSDs, one of which will go in it).

moriel5 commented 8 months ago

An update: I just ran some more tests, and I can recieve files again, despite the app complaining about missing permissions.

However, I cannot send anything, as my laptop does not appear in the list inside the app.

ShortDevelopment commented 8 months ago

@moriel5 I have requested permissions that were needed for android 12+ but did not exist below 😅 Should be fixed now...

Your computer not being listed should be sth different though (Feel free to have a look at the FAQ or ask on the discord)

moriel5 commented 8 months ago

Thanks, I'll test things in the next version. And I'll take another look at the FAQ (I try avoiding Discord wherever possible, due to their privacy practices and real-world system resource requirements).

Update: The FAQ is not helpful in my case, as it only says to to file the setup ensure that all of the settings are correct, which they are in my case.

Additionally, further testing is showing that in general, visibility of my Razer Phone 2 is pretty inconsistent, regardless of the router used, however that is a subject for another issue, and it may be related to the fact that my laptop isn't recognized by my phone (as the only thing that is consistent, is that my phone always stops being recognized after attempting to scan for devices to sent to).

ShortDevelopment commented 8 months ago

Still a bug, I'll add more logging to diagnose further...

ShortDevelopment commented 8 months ago

@moriel5 Just open separate issues for each the problems you detected. Then we can discuss them separately 🙂

moriel5 commented 8 months ago

I shall do that once I get around to retesting (just so that what I post will be accurate).

ShortDevelopment commented 6 months ago

I've removed this prompt entirely as it has too many false positives. The user gets prompted to grant permissions every time they open the app,