Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seeding fails on files >32KiB on Safari Desktop and Mobile #1344

Closed
now-raymond opened this issue Apr 1, 2018 · 1 comment
Closed

Seeding fails on files >32KiB on Safari Desktop and Mobile #1344

now-raymond opened this issue Apr 1, 2018 · 1 comment

Comments

@now-raymond
Copy link
Contributor

@now-raymond now-raymond commented Apr 1, 2018

What version of WebTorrent?
WebTorrent 0.98.24

What operating system and Node.js version?
macOS High Sierra 10.13.3
iOS 11.2.6

What browser and version? (if using WebTorrent in the browser)
Safari (desktop) 11.0.3 on macOS
Safari Mobile on iOS 11.2.6
Chrome Mobile on iOS 11.2.6

What did you expect to happen?
Expected a WebTorrent client in Safari on MacOS and Safari Mobile/Chrome Mobile on iOS to correctly download and upload files since they now have WebRTC support. WebTorrent docs does list Safari as a compatible web browser now.

What actually happened?
WebTorrent browser client on abovementioned platforms can download files of arbitrary size, but is unable to upload files >32KiB to peers.

When directly testing with two peers using simple-peer and torrent.addPeer, the seeder seems to stop uploading after two chunks. The peer connection is automatically closed shortly after this.

Files that are <= 32 KiB are uploaded fine.

I used the following commands to create two randomly-filled files of sizes 32768 and 32769 each:
dd if=/dev/random of=upload_rand_32768 bs=32768 count=1
dd if=/dev/random of=upload_rand_32769 bs=32769 count=1

The former uploads fine, while the latter stalls while uploading.

Interestingly, a zero-filled file uploads fine even though it is >32KiB:
dd if=/dev/zero of=upload_zeroes bs=84000 count=1

Steps to reproduce:

  1. Using Safari on macOS or iOS, try to share upload_rand_32768.zip and upload_rand_32769.zip via https://instant.io/ with any other compatible web client.
  2. The former can be shared as expected but the latter fails to be fully uploaded.
@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Apr 13, 2018

I'm using Safari 11.1 on macOS and I just tested with a 100 MB file and it works. But I have to select "Enable the Legacy WebRTC API" under the "Develop" menu.

screen shot 2018-04-13 at 12 16 56 am

@feross feross closed this Apr 13, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jul 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.