Brave-browser: WebTorrent: Video streaming is broken since upgrade to WebTorrent v0.105.0

Created on 24 Jul 2019  路  6Comments  路  Source: brave/brave-browser

Description

It appears that WebTorrent聽video playback is broken on Nightly, ever since the upgrade to WebTorrent v0.105.0.

The URL constructor is undefined on this line in webtorrent/lib/server.js:

https://github.com/webtorrent/webtorrent/blob/78d98d9fa45598b63fb0fec013036e35d167f6c3/lib/server.js#L80

The reason appears that webpack replaces this line:

https://github.com/webtorrent/webtorrent/blob/78d98d9fa45598b63fb0fec013036e35d167f6c3/lib/server.js#L6

with:

const URL = __webpack_require__(/*! url */ "./node_modules/url/url.js").URL

and the url package doesn't export URL as url.URL even though it exists in the chrome extension environment. I can fix this on the webtorrent side and publish a new version.

cc @yrliou

Steps to Reproduce

  1. Go to https://webtorrent.io/free-torrents
  2. Click on Big Buck Bunny (torrent file)
  3. Start download
  4. Right click on "Big Buck Bunny.mp4" and "Open Link in New Tab" (to workaround #3966)
  5. The video does not load.
  6. Check the WebTorrent extension background process (via brave://inspect/#extensions) to see the exception.

Actual result:

Screen Shot 2019-07-23 at 3 37 52 PM

Expected result:

Video plays

Reproduces how often:

Easily reproduced

Brave version (brave://version info)

Nightly. Version 0.69.77 Chromium: 76.0.3809.62 (Official Build) nightly (64-bit)

Version/Channel Information:

  • Can you reproduce this issue with the current release? No
  • Can you reproduce this issue with the beta channel? No
  • Can you reproduce this issue with the dev channel? No
  • Can you reproduce this issue with the nightly channel? Yes
QA Pass-Linux QA Pass-Win64 QA Pass-macOS QTest-Plan-Specified QYes bug featurwebtorrent release-noteexclude

All 6 comments

There's a new release of webtorrent with the fix. Version 0.105.1. We just need to pull it into Brave.

Re-opening until https://github.com/brave/brave-core/pull/2989 is merged.

Moving this into the 0.70.x - Nightly milestone as per https://github.com/brave/brave-core/pull/2989.

This is fixed in 0.69.x too now because we upgrade WebTorrent to 0.105.1 in 0.69.x.

@yrliou Thank you for debugging this issue!

Verification passed on

Brave | 0.69.124 Chromium: 76.0.3809.132聽(Official Build)聽(64-bit)
-- | --
Revision | fd1acc410994a7a68ac25bc77513d443f3130860-refs/branch-heads/3809@{#1035}
OS | Ubuntu 18.04 LTS

Verified test plan from the description.

Was able to stream the video
image
No exception in the console(only warnings):
image

Verified passed with

Brave | 0.69.124 Chromium: 76.0.3809.132聽(Official Build)聽(64-bit)
-- | --
Revision | fd1acc410994a7a68ac25bc77513d443f3130860-refs/branch-heads/3809@{#1035}
OS | Mac OS X

  • Verified test plan from the description
    Screen Shot 2019-09-06 at 1 44 37 PM

Verification passed on

Brave | 0.69.124 Chromium: 76.0.3809.132聽(Official Build)聽(64-bit)
-- | --
Revision | fd1acc410994a7a68ac25bc77513d443f3130860-refs/branch-heads/3809@{#1035}
OS | Windows聽10 OS Version 1803 (Build 17134.523)

  • Verified the STR from the description - there are no exceptions in the extension background page

image

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kjozwiak picture kjozwiak  路  3Comments

Sondro picture Sondro  路  3Comments

kerry-perret picture kerry-perret  路  3Comments

simonhong picture simonhong  路  3Comments

bsclifton picture bsclifton  路  3Comments