Bug report: Github nodes returns 0 B file if size "too big", no errors

Describe the problem/error/question

I have a Github node in my workflow, that downloads a file with approx 1.4MB size. It ends succesfully, but the binary data contains a 0 B file. The rest of the metadata is correct.

I made the file smaller and then it worked as expected.

What is the error message (if any)?

None. The following node is unhappy because the file is empty.

Share the output returned by the last node

see above

Information on your n8n setup

  • 1.97.1
  • SQLite
  • n8n EXECUTIONS_PROCESS setting: default
  • Running n8n via Docker
2 Likes

Hey @Marco_S_D, hope all is well, welcome to the community.

I think this is relevant:
GitHub Node - is there an file size limit? Output content is empty, but shouldn't. Not a solution, but at least this is not something you do wrong.

If its a Docker container, try running the container with a bigger memory.
Ex. docker run -it -d --rm --name n8n -p 5678:5678 -v ~/.n8n:/home/node/.n8n --memory=2g n8nio/n8n:latest

Thanks, it’s the same issue. I haven’t found it by search, maybe because it is closed. I see there was no solution either.

Hi found the reason:

The GitHub API specifies that you have to modify the request for file size between 1MB and 100MB:

Perplexity’s explanation

GitHub’s REST API for retrieving file contents (the "Get repository content" endpoint) has specific file size limits and requirements for how you can access files:

Files 1 MB or smaller: All features of the endpoint are supported, and you can use the standard API response to get the file content directly.

Files between 1 MB and 100 MB: Only the raw or object custom media types are supported. When using the object media type, the content field will be empty and the encoding field will be "none". To get the actual content of such files, you must use the raw media type by including the header:

Accept: application/vnd.github.v3.raw
This is required for files over 1 MB.

Files larger than 100 MB: The endpoint is not supported. You cannot retrieve the contents of files larger than 100 MB using t

I filed an issue on N8N GitHub: https://github.com/n8n-io/n8n/issues/16417

And a workaround:

set “As Binary Property” to false
use a following HTTP node to get the url specified in the “download_url” response

thanks for sharing