Skip to content

[Direct Line Speech] Throw 'map' of null and 'actions' of null error #3155

@compulim

Description

@compulim

Screenshots

image

Version

4.8.1

Describe the bug

Direct Line Speech is sending various fields as null instead of undefined. The coalesces logic in Web Chat use JavaScript default function parameters and it didn't catch null.

Steps to reproduce

  1. Go to https://microsoft.github.io/BotFramework-WebChat/03.speech/a.direct-line-speech/
  2. Type "Hi" to the bot

Expected behavior

The bot should response correctly.

Instead, it showed a white screen.

Additional context

This fix will be rolled out as 4.9.0 as soon as possible.

Web Socket message on the wire

X-RequestId: 033f2a62ae93478eafbef5de63c53a69
Path:response
Content-Type:application/json; charset=utf-8

{
  "conversationId": "602f43a0-f8f6-4546-8c1b-9bb52c0e9bea",
  "messagePayload": {
    "type": "message",
    "id": "773ab1b2-7dc0-484e-8638-786cb9789e0f",
    "timestamp": "2020-05-11T22:50:13.7549Z",
    "localTimestamp": null,
    "localTimezone": null,
    "callerId": null,
    "serviceUrl": "urn:botframework:websocket:directlinespeech",
    "channelId": "directlinespeech",
    "from": {
      "id": "webchat-mockbot-streaming",
      "name": "webchat-mockbot-streaming",
      "aadObjectId": null,
      "role": null
    },
    "conversation": {
      "isGroup": false,
      "conversationType": null,
      "tenantId": null,
      "id": "602f43a0-f8f6-4546-8c1b-9bb52c0e9bea",
      "name": null,
      "aadObjectId": null,
      "role": null
    },
    "recipient": {
      "id": "602f43a0-f8f6-4546-8c1b-9bb52c0e9bea|0000",
      "name": null,
      "aadObjectId": null,
      "role": null
    },
    "textFormat": null,
    "attachmentLayout": null,
    "membersAdded": null,
    "membersRemoved": null,
    "reactionsAdded": null,
    "reactionsRemoved": null,
    "topicName": null,
    "historyDisclosed": null,
    "locale": null,
    "text": "Unknown command: `Hi!`.\r\n\r\nType `help` to learn more.",
    "speak": "Unknown command: I don't know Hi!. You can say \"help\" to learn more.",
    "inputHint": null,
    "summary": null,
    "suggestedActions": null,
    "attachments": null,
    "entities": null,
    "channelData": null,
    "action": null,
    "replyToId": "d4ffd33b-4fb3-4b1a-aa21-5f3f9092329b",
    "label": null,
    "valueType": null,
    "value": null,
    "name": null,
    "relatesTo": null,
    "code": null,
    "expiration": null,
    "importance": null,
    "deliveryMode": null,
    "listenFor": null,
    "textHighlights": null,
    "semanticAction": null,
    "transcript": null
  },
  "messageDataStreamType": 1,
  "version": 0.3
}

[Bug]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions