schlagmichdoch / PairDrop

PairDrop: Transfer Files Cross-Platform. No Setup, No Signup.
https://pairdrop.net
GNU General Public License v3.0
4.41k stars 246 forks source link

[Bug] Pairdrop user gets offline while still choosing files to send #247

Open svl168 opened 8 months ago

svl168 commented 8 months ago

Pairdrop user gets offline while still choosing files to send or still taking picture to send.

To Reproduce

  1. 2 users (ex. Adam and Eve) using each other's mobile data and running pairdrop at the same time in a chrome browser of their android phone. Both have previously been paired. and names were permanently named already
  2. Adam saw Eve in his pairdrop and clicked her icon in an attempt to send a picture in his gallery
  3. Few seconds have passed like even just 3 seconds after, Eve noticed Adam disappeared already like offline.
  4. After Adam has chosen a picture to send and clicked send or OK, Eve disappeared already. so, have to repeat again and have to be very fast this time around to avoid getting offline.
  5. This does not happen if you're in same WIFI network or at least I did not notice it happen yet.

Expected behavior online status should stay online (each other's icon) while one of them is still choosing files to send or taking pictures.

Screenshots If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

Bug occurs on official PairDrop instance https://pairdrop.net/ Yes Version: v1.10.5

Bug occurs on self-hosted PairDrop instance No | Yes

Additional context Add any other context about the problem here.

schlagmichdoch commented 8 months ago

The server checks periodically if a client is still online. The problem might be that the JavaScript code in the browser is stopped by some browsers when their file selector is opened.

online status should stay online (each other's icon) while one of them is still choosing files to send or taking pictures.

Maybe it'd be more stable if the server stopped as long as a file selector is open. Maybe it would also be sufficient to increase the timeout period.

Is the issue consistently reproducible?

svl168 commented 8 months ago

Yes, reproducible all the time. Take note, occurs too while taking a picture. Please make the timeout be at least 20 seconds. Thanks for responding.

Other than that, your program is just perfect.

schlagmichdoch commented 7 months ago

I have finally implemented this! :tada:

I'd appreciate it if you could test whether your issue is resolved on the development instance here: https://pairdrop-dev.onrender.com

schlagmichdoch commented 6 months ago

As the repository was falsely flagged and hidden for the last month this probably never reached you so this is a friendly bump.

@svl168 I would appreciate it, if you could test this feature on the instance above.

ngerberQuad commented 2 months ago

Hi, I'm not the original poster, but I noticed the same bug on my self hosted server. I tested the it on the development instance and the timeout did not happen again.

schlagmichdoch commented 2 months ago

Great! Thanks a lot for testing! I'll hurry up to get this released as part of #267 soon. I'll keep you posted