schlagmichdoch / PairDrop

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

[Bug] Unable to send certain file #332

Open terrytw opened 2 weeks ago

terrytw commented 2 weeks ago

Describe the bug I cannot send this file, every time I send it, the other device just disappears.

To Reproduce 1.zip Please uncompress this zip file, and try sending the png file within.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Bug occurs on official PairDrop instance https://pairdrop.net/ Yes, and on dev.pairdrop.net

Bug occurs on self-hosted PairDrop instance Yes

Self-Hosted Setup Proxy: Caddy Deployment:

docker run -d \
  --restart unless-stopped \
  --name=pairdrop \
  --hostname pairdrop \
  --net custom --ip ****** \
  -e PUID=1026 \
  -e PGID=101 \
  -e TZ=******* \
  -e RATE_LIMIT=true \
  -e WS_FALLBACK=true \
  -e RTC_CONFIG="/home/node/app/rtc_config.json" \
  -v /*****/docker/pairdrop/rtc_config.json:/home/node/app/rtc_config.json  \
  ghcr.io/schlagmichdoch/pairdrop

Version: v1.10.10

schlagmichdoch commented 2 weeks ago

I can reproduce this with the file when sending from iOS. Does this happen for you on Android only or also when sending the file from Windows?

The preview code needs to be rewritten and errors need to be catched properly. Sorry for the inconvenience.

terrytw commented 2 weeks ago

I tried Windows to Windows and Windows to Android, both failed.

My rudimentary guess is that when sending pictures, pairdrop seems to render a preview/thumbnail, but my picture's aspect ratio is too extreme so it didn't work.

schlagmichdoch commented 2 weeks ago

That’s probably indeed what’s going on as it is going through fine when we bypass the thumbnail creation by changing the extension of the file from .png to .txt.

Anyways, I thought such errors would be catched and the file would then simply be sent without any thumbnail. I have to look into it to know more