OneDrive file (binary data) upload broken?

Hello,

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.

N8N_USE_DEPRECATED_REQUEST_LIB=true

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.

2 Likes

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

2 Likes

@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).

2 Likes