ALTERYX INSPIRE | Join us this May for for a multi-day virtual analytics + data science experience like no other! Register Now

Dev Space

Customize & extend the power of Alteryx. SDKs, APIs, custom tools, and more!
SOLVED

Download Tool & Microsoft SharePoint - Chunked Request Error

nataliamiteva
8 - Asteroid

Hi all!

 

I have a workflow which downloads files from an API and uploads them as blob objects to a Microsoft SharePoint site with the Download tool. It runs successfully intermittently and it occasionally errors with:

{"error":{"code":"invalidRequest","message":"The size of the provided stream is not known. Make sure the request is not chunked, and the Content-Length header is specified"}}

 

Here's my set-up:

 

download tool set-up.PNG

nataliamiteva_0-1616079289070.png

 

And the full error message in the Download Headers column:

 

HTTP/1.1 100 Continue

HTTP/1.1 400 Bad Request
Cache-Control: no-cache
Pragma: no-cache
Transfer-Encoding: chunked
Content-Type: application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
Expires: -1
P3P: CP="ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI"
X-SharePointHealthScore: 0
X-SP-SERVERSTATE: ReadOnly=0
ODATA-VERSION: 4.0
SPClientServiceRequestDuration: 47
X-AspNet-Version: 4.0.30319
SPRequestGuid: 52c3b09f-f01e-2000-9b15-eaa2dbd07009
request-id: 52c3b09f-f01e-2000-9b15-eaa2dbd07009
MS-CV: n7DDUh7wACCbFeqi29BwCQ.0
Strict-Transport-Security: max-age=31536000
X-FRAME-OPTIONS: SAMEORIGIN
Content-Security-Policy: frame-ancestors 'self' teams.microsoft.com *.teams.microsoft.com *.skype.com *.teams.microsoft.us local.teams.office.com *.powerapps.com *.yammer.com *.officeapps.live.com *.stream.azure-test.net *.microsoftstream.com;
X-Powered-By: ASP.NET
MicrosoftSharePointTeamServices: 16.0.0.21017
X-Content-Type-Options: nosniff
X-MS-InvokeApp: 1; RequireReadOnly
X-MSEdge-Ref: Ref A: A18C3A6A1F7B43088007C18AF4A704B8 Ref B: LON21EDGE1017 Ref C: 2021-03-03T21:39:43Z
Date: Wed, 03 Mar 2021 21:39:43 GMT

 

It appears that Alteryx isn't passing on the correct Content-Length headers to SharePoint (but only sometimes as the error is intermitent). 

 

One thing I tried is passing the value of 'identity' in a Transfer-Encoding header but that resulted in another error 'HTTP/1.1 501 Not Implemented' in the Download Headers column. 

 

I raised a post on the Community -> Discussions -> Designer space for this same issue over 2 weeks ago but didn't get any support there, so I am posting here in case anyone knows any workaround. 

 

Many thanks in advance!!!

Mmisiji60
6 - Meteoroid

Hi,

I think you should declare your columns in Headers.

Try to declare Content-Length as 'Name' in headers,

or check if you are passing the value in the expected format

Mmisiji60_0-1617298908768.png

 

 

Let me know if this helps or if you foun another resoluton, please.

good luck 🙂 

nataliamiteva
8 - Asteroid

The issue with the Download tool persisted and I ended up building a workaround which involved syncing the Sharepoint files through OneDrive on the remote Alteryx server machine. The process is explained here: https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/How-To-Connect-to-Sharepoint-with-A...