Blank page on www.nicovideo.jp (TextEncoderStream not defined)

For support with specific websites

Moderator: trava90

Forum rules
Please always mention the name/domain of the website in question in your topic title.
Please one website per topic thread (to help keep things organized). While behavior on different sites might at first glance seem similar, they are not necessarily caused by the same.

Please try to include any relevant output from the Toolkit Error Console or the Developer Tools Web Console using the following procedure:
  1. Clear any current output
  2. Navigate or refresh the page in question
  3. Copy and paste Errors or seemingly relevant Warnings into a single [ code ] block.
User avatar
Deadgye
Hobby Astronomer
Hobby Astronomer
Posts: 26
Joined: 2020-11-06, 23:59

Blank page on www.nicovideo.jp (TextEncoderStream not defined)

Post by Deadgye » 2025-06-06, 14:39

The main page of the website seems to load okay, but any of the video URLs only load a blank page for me. Random video URL for example: https://www.nicovideo.jp/watch/sm24382728

Code: Select all

ReferenceError: TextEncoderStream is not defined[Learn More]        sm24382728:1:325
Error: No stream found for single fetch decoding        entry.client-slzaLiOH.js:16:57495
Stack trace:
te@https://resource.video.nimg.jp/web/scripts/nvpc_next/assets/typeof-3fvrxp9b.js:18:582
Jy@https://resource.video.nimg.jp/web/scripts/nvpc_next/assets/entry.client-slzaLiOH.js:26:904
wy@https://resource.video.nimg.jp/web/scripts/nvpc_next/assets/entry.client-slzaLiOH.js:26:2518
Bf@https://resource.video.nimg.jp/web/scripts/nvpc_next/assets/entry.client-slzaLiOH.js:16:34104
Ff@https://resource.video.nimg.jp/web/scripts/nvpc_next/assets/entry.client-slzaLiOH.js:16:61903
E1@https://resource.video.nimg.jp/web/scripts/nvpc_next/assets/entry.client-slzaLiOH.js:16:72397
k1@https://resource.video.nimg.jp/web/scripts/nvpc_next/assets/entry.client-slzaLiOH.js:16:106226
Us@https://resource.video.nimg.jp/web/scripts/nvpc_next/assets/entry.client-slzaLiOH.js:16:105327
Ac@https://resource.video.nimg.jp/web/scripts/nvpc_next/assets/entry.client-slzaLiOH.js:16:105165
L1@https://resource.video.nimg.jp/web/scripts/nvpc_next/assets/entry.client-slzaLiOH.js:16:102312
vv@https://resource.video.nimg.jp/web/scripts/nvpc_next/assets/entry.client-slzaLiOH.js:16:113593
Ea@https://resource.video.nimg.jp/web/scripts/nvpc_next/assets/entry.client-slzaLiOH.js:9:1657
From the web console log, it seems like it's relying on TextEncoderStream without a fallback, and PM doesn't have that implemented?
As far as I can tell, this seems to be an interface that's part of the Encoding API. From the browser version compatibility tables listed there, I'm guessing PM probably has the non-stream interfaces implemented, and that these newer TextEncoderStream and TextDecoderStream interfaces are reliant upon the Streams API. I know PM is behind the current flavor of the Streams API spec because of UXP#2667, but I'm not competent enough to figure out if these encoding interfaces would work with PM's current Streams API implementation. Perhaps they might be relatively trivial to implement if their functionality is supposed to be analogous to the non-stream Encoding API interfaces?

User avatar
adoxa
Lunatic
Lunatic
Posts: 437
Joined: 2019-03-16, 13:26
Location: Qld, Aus.

Re: Blank page on www.nicovideo.jp (TextEncoderStream not defined)

Post by adoxa » 2025-06-07, 03:07

Here's a Modify HTTP Response filter to work around the streams issue, which does seem to work fine, but there are other issues still at play (this uses PMPlayer).

Code: Select all

[["www.nicovideo.jp",["/watch\\/sm/",[".pipeThrough(new TextEncoderStream())",""]]],["resource.video.nimg.jp",["/typeof-/",["/\\.pipeThrough\\(..\\(\\)\\)/",""]]]]