Azure-pipelines-tasks: Agentless Invoke Azure Function - Error 411 on POST

Created on 16 Mar 2018  路  14Comments  路  Source: microsoft/azure-pipelines-tasks

Environment

VSTS account: cycba.visualstudio.com
Team Project name: Kaggle Competitions
Release Definition: New Release Definition

Issue Description

This is an issue with https://github.com/Microsoft/vsts-tasks/tree/master/Tasks/AzureFunction
Using the Agentless invoke Azure Function i'm getting a 411 error when trying to run an azure function via POST. Using GET works, tough.

Have tried both 1.* and 0.* versions of the task, both have the same issue.

screencapture2

I have tried multiple azure functions and multiple post request, and they work if are made with postman or xhr2 from node.js, but not with VSTS agentless tasks.

This issue is probably related to #6687 and share roots.

Error logs

2018-03-16T12:42:43.0293439Z POST https://<>.azurewebsites.net?code=<>==&
                Response Code: 0
                Response: An error was encountered while processing request. Exception: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Length Required</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Length Required</h2>
<hr><p>HTTP Error 411. The request must be chunked or have a content length.</p>
</BODY></HTML>

Exception Message: The remote server returned an error: (411) Length Required. (type WebException)

The log doesn't help much since it doesn't display the complete request sent.

Release

Most helpful comment

This issue is because of empty post body, can you meanwhile try sending an empty object in body for POST calls.
Mean while we will fix this issue.

All 14 comments

This issue is because of empty post body, can you meanwhile try sending an empty object in body for POST calls.
Mean while we will fix this issue.

We will take this up as an improvement later. Thanks for reporting.

Sending an object {} in body, I am still getting 411.

@hiyadav, further to @AmudhaPalani 's comment (problem still exists with a body) what do you mean when you say you will "fix the issue" ? Are you saying you will fix the error message, or fix the behaviour so that you don't get an error with a null body ?

In the interest of visibility to the open source community, why not just keep the issue open ?
Closing it before it's been fixed makes it look like there is no issue and the "community" has no visibility of what's going on.

For example:

  • Can you give us a time estimate for a fix ?
  • Where are you tracking this ?

We have fixed this issue in the latest code and the fix is deployed on all the scale units in VSTS. Can you please try it now and reopen if it does not work?

This issue still exists. This needs to be reopened.

Please re-open this. I don't have permission to re-open this issue.

Hi @AmudhaPalani
If you're hitting the same issue even with workaround, I wonder if it's a different issue altogether.
I tried repro steps provided by Ameb, and the '{}' workaround resolved the issue for me.

Request you to share repro steps, will help me understand your issue better.

JFYI - We're going to fix empty body issue very soon.

Thanks!

Correction to my previous comment: Yes, workaround of sending {} body did fix this 411 error.

Thanks for confirming @AmudhaPalani!

@AmudhaPalani fix has been deployed. Please let us know if you still see it.

Thanks,
Suresh.

@sureshtadisetty I ran into this issue on my account: portalsystems-de.visualstudio.com. It only works using the {}-body-workaround. Shouldn't it work with an empty Body, too as the fix is deployed by now?

Hi, I'm still running into this issue, using the empty Body workaround.

Same here - the issue still exists

Was this page helpful?
0 / 5 - 0 ratings