tomas / tomas/needle

Z_BUF_ERROR when requesting YouTube channel about page

Open
#324 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.6k
Forks
237
PR merge metrics
No merged PRs in 30d

Description

I searched all issues for my error and got nothing.
I tried requesting "https://www.youtube.com/c/TRGOArchive/about" with headers and got the error Z_BUF_ERROR.

The code
         var options = { headers: {
		"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0",
		"Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
		"Accept-Language":"en-US,en;q=0.5",
		"Accept-Encoding":"gzip, deflate, br",
		"DNT":"1",
		"Connection":"keep-alive",
		"Upgrade-Insecure-Requests":"1",
		"TE":"Trailers"
	}}
	needle.get("https://www.youtube.com/c/TRGOArchive/about",options,function(err,resp,body) {
		console.log(body);
		console.log(resp);
		console.log(err);
	})
The error
Error: unexpected end of file
    at BrotliDecoder.zlibOnError [as onerror] (zlib.js:170:17) {
  errno: -5,
  code: 'Z_BUF_ERROR'
}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the request in the issue with Needle and the shown headers, then trace the response decompression path associated with Brotli and Z_BUF_ERROR. The issue names no source files or tests; done would mean the YouTube channel request no longer fails with the reported error and the behavior is covered by an appropriate test.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.