question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

malformed message invocationResponse.outputData.data.http.body.object expected

See original GitHub issue

Currently using the v2 Function App version locally to debug on my Mac and it keeps succeed with the following information message and not responding with correct response.

info: Worker.Node.f52ff43c-b7d2-4b78-a3b2-02db6e1302e2[0]
      Worker f52ff43c-b7d2-4b78-a3b2-02db6e1302e2 malformed message invocationResponse.outputData.data.http.body.object expected
info: Worker.Node.f52ff43c-b7d2-4b78-a3b2-02db6e1302e2[0]
      (node:91399) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id:2): invocationResponse.outputData.data.http.body.object expected

I reinstalled azure-functions-core-tools and this info message disappeared, but the function still succeed with a no response.

Upon inspecting the context object, the correct context.res.body data, but when context.done is called context.res changes to null

The function is a GraphQL server, based on the Apollo Azure Functions project (it’s a fork of that as the original project has some problems). This worked for me three weeks ago, but coming back to the project on a fresh install it’s no longer working.

When I upload this to Azure and run it on the v1 runtime (which is where I want it to run in production until v2 is stable) it works perfectly.

Language: NodeJS Version: 8.9.4 Functions tools: azure-functions-core-tools@2.0.1-beta.22

Please let me know if you need anything else. My project repo is private, so I’ll have to create a sanitised version to share if you need it.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
christopherandersoncommented, Mar 16, 2018

@mhoeger is gonna take over on this one. We think we have a solution that is non-breaking that doesn’t force folks to set the raw flag. She’ll describe it in another issue, I think, and link to this.

2reactions
christopherandersoncommented, Mar 16, 2018

Notes from repro:

  • Modules are in each function folder, can put them at the base of your project and they’ll share dependencies
  • When I start it locally on v2 (windows), it returns a 406 status code.
  • When I start it locally on v1 (windows), it works!
  • When I remove the header, it works on v2 (this is another sign its an issue in the Functions host)
  • Given that this is probably our host trying to do too much smarts, I set the “isRaw” flag to true. This worked
    GraphiQL.resolveGraphiQLString(query, options).then(function (graphiqlString) {
        let result = {
            status: 200,
            isRaw: true,
            headers: {
                'content-type': 'text/html',
            },
            body: graphiqlString,
        };
        callback(null,result);

Workaround:

  • Set the isRaw flag to true on responses to have our content negotiation stuff turned off.
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to return base64 image from Azure Function as binary ...
The error is 406 (Unacceptable) and the body is empty. The question is this: how would one would return a base64 as binary...
Read more >
Introduction to DocumentDB, a JSON database | Microsoft Docs
As a schema-free NoSQL database,. DocumentDB provides rich and familiar SQL query capabilities with consistent low latencies on JSON data -.
Read more >
Getting Started – Rossum API Reference
Just getting started with Rossum? Go through this documentation to find out anything you'll need to know, from import/export all the way to...
Read more >
man page wireshark-filter section 4
The following are all valid display filter expressions: tcp.port == 80 and ip.src == 192.168.2.1 not llc http and frame[100-199] contains "wireshark" (ipx.src....
Read more >
Index (Adobe LiveCycle ES3 API Reference)
addAttributeNameValue(Object, Object) - Method in class ... Represents an output data mapping value that is associated with an endpoint. CreateEndpointInfo.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found