azure-functions-host: Beta runtime version javascript functions are broken on Azure

From @nelak on November 3, 2017 17:34

Trying to run something as simple as:

module.exports = function (context, req) {
    const htmlContent = `<html><body>Hello world</body></html>`
    context.res.setHeader('content-type', 'application/xml; charset=utf-8')
    context.res.setHeader('content-length', `${Buffer.from(htmlContent).length}`)
    context.res.raw(htmlContent);

Results in the following error:

2017-11-03T17:32:15.606 Exception while executing function: Functions.HttpTriggerJS. System.Private.CoreLib: One or more errors occurred. (Worker process with pid 8516 exited with code 1) (Worker process with pid 9788 exited with code 1) (Worker process with pid 8300 exited with code 1). Worker process with pid 8516 exited with code 1.

This is likely related to the same issue reported on the azure-functions-cli repository: https://github.com/Azure/azure-functions-cli/issues/280

Let me know if you need more information

Copied from original issue: Azure/Azure-Functions#575

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 17 (7 by maintainers)

Most upvoted comments

That’s what #2048 will hopefully help improve. Better error messages when there is a host issue.

@christopheranderson I do say above however, that error isn't logged, but the function returns 500 😃

@christopheranderson This happened using WEBSITE_NODE_DEFAULT_VERSION=8.5.0 in case it helps