BotFramework-WebChat: Error: DirectLineJS: It is connected, we cannot set user id.

Screenshots

image

Version

<meta name="botframework-directlinespeech:version" content="4.12.1">
<meta name="botframework-webchat:bundle:variant" content="full">
<meta name="botframework-webchat:bundle:version" content="4.12.1">
<meta name="botframework-webchat:core:version" content="4.12.1">
<meta name="botframework-webchat:ui:version" content="4.12.1">

Describe the bug

Just updated from 4.10.1 to 4.12.1 Before the update we could pass userID into the ReactWebChat and in 4.12 we can call setUserID on the DirectLine object aswell. Doing both, either or neither of those, results in the error.

Steps to reproduce

  1. Make a class that extends React.Component
  2. In the render method return a ReactWebChat with relevant props: image

Expected behavior

No error.

Additional context

This error may be due to idiosyncrasy but I’d like to get to the bottom of that if it’s the case.

[Bug]

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (2 by maintainers)

Most upvoted comments

@felixvanleeuwen, I spoke with a member of the Web Chat team and it was recommended that you try assigning the userId via the method shown here.

They were also wondering if you are passing in the userId with the secret with generating a token from the Direct Line API call. As I don’t remember from our online call, can you tell me if this is happening or not?