Error: Your request is invalid or could not be processed by the service content is not valid Base64

This workflow worked perfectly until a few days ago, I don’t know if it was a version update but I tested two versions and the error persists. I generated a new API key on Github but that didn’t help either.

Erro:

Your request is invalid or could not be processed by the service

content is not valid Base64

Error details

From GitHub

Error code

422

Other info

Node type

n8n-nodes-base.github

Node version

1 (Latest)

n8n version

1.34.2 (Self Hosted)

Time

10/04/2024, 11:20:39

Stack trace

NodeApiError: Your request is invalid or could not be processed by the service at Object.githubApiRequest (/usr/lib/node_modules/n8n/node_modules/n8n-nodes-base/nodes/Github/GenericFunctions.ts:63:9) at processTicksAndRejections (node:internal/process/task_queues:95:5) at Object.execute (/usr/lib/node_modules/n8n/node_modules/n8n-nodes-base/nodes/Github/Github.node.ts:2191:21) at Workflow.runNode (/usr/lib/node_modules/n8n/node_modules/n8n-workflow/src/Workflow.ts:1371:8) at /usr/lib/node_modules/n8n/node_modules/n8n-core/src/WorkflowExecute.ts:1048:29 at /usr/lib/node_modules/n8n/node_modules/n8n-core/src/WorkflowExecute.ts:1724:11

Update file [GITHUB]

Test step

Parameters


Docs

Credential to connect with

Resource

Operation

Repository Owner

Fixed

Expression

Repository Name

Fixed

Expression

File Path

Fixed

Expression

Workflows/Mimo Style/Integradora/Mercado Livre/{{ $binary.data.fileName }}

Workflows/Mimo Style/Integradora/Mercado Livre/3-Gravar Notas - Entradas [PROD].json

Binary File

Fixed

Expression

Input Binary Field

Fixed

Expression

The name of the input binary field containing the file to be written

Commit Message

Fixed

Expression

backup-{{ $node[‘Set commit date’].json.commitDate }}:tada:

backup-10/04/2024 11:20:38🎉

Additional Parameters

Currently no items exist

I wish this node would…

Workflow:

Information on your n8n setup

  • n8n version: 1.34.2 (Self Hosted)
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): npm
  • Operating system: Linux

Hey @leomangueira,

What do you currently have N8N_DEFAULT_BINARY_DATA_MODE set to?

Environment=“N8N_DEFAULT_BINARY_DATA_MODE=filesystem”

I removed this variable and restarted n8n, updated some files on github but others still give the same error

After removing the variable N8N_DEFAULT_BINARY_DATA_MODE the flow works until the second commit, but in the third it gives an error

Hey @leomangueira,

That is interesting, I wonder if there are some characters in the name of the workflow it doesn’t like.

Does that file already exist in the Git repo?

The interesting thing is that this file already exists on github and before it was saved normally, the names of the other files contain the same characters. only has - and but no other special characters

Is the - actually a - and are the spaces actually spaces and not another similar character? I have been caught out by sneaky - characters before.

Can you share the workflow name exactly as it is from n8n so I can test if it is the name?

got an error on this one: 5-Gerar Livro Fiscal - [PROD].json

These 2 here didn’t give an error:
3-Gravar Notas - Entradas [PROD].json
4-Gravar Impostos e Estoque - NF Outras Saidas [PROD].json

I believe it is a failure in the github node, as I committed via vscode and saved normally, I tested several versions of n8n too


I discovered the root of the problem. The problem was the file names, it was necessary to add the ID to the name of each file so that it was a unique name.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.