OneDrive file (binary data) upload broken?


after upgrading n8n to 0.142.0 OneDrive node can’t upload files, when binary data is set to true. (ERROR: Unexpected token o in JSON at position 1 is displayed, more details in image below).
The upgrade was done from 0.138.0 so it’s possible that upload was broken in a version after 138.

P.S.: Everything works fine if file content is used instead of binary data.

Hey @Rugia,

As a quick test could try setting the environment variable below? There was a change in the HTTP library used in the backend and that could be the cause of your issue.


Hi @Jon,

Thanks! Indeed it solves the issue (sorry I missed that :thinking:)

Anyway as I understand this should be used only as a workaround till the main issue is not solved?
So which choice would be better:

  • use this variable?
  • edit workflow and use file content instead of binary data?

For now I would say it depends on what is easier for you, Using the option isn’t the end of the world and it will get you working until one of the n8n chaps can take a proper look.

@harshil1712 @MutedJam ^ one for dev.


Thanks @Jon and my sincere apologies for the trouble @Rugia. Looks like there already is a pull request open for this particular error: Crash in OneDrive binary upload by robertodamiani · Pull Request #2306 · n8n-io/n8n · GitHub


@MutedJam thanks for the info!

1 Like

Thanks for reporting this, @Rugia. We’ll ask @krynble to look into this (he’s out right now so will be closer to the end of the month).


Hello everyone!

I believe it has been fixed and released in version 0.144.0.

Can you please check if it’s working fine now? Let us know if there is still any issue!


Hey, sorry for the late reply.
I can confirm that everything is working as expected (without using N8N_USE_DEPRECATED_REQUEST_LIB)

P.S.: n8n @ 0.147.1


Amazing news. Thanks @Rugia for the update!