-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Is it an issue related to Adaptive Cards?
No
Is this an accessibility issue?
No
What version of Web Chat are you using?
Latest production
Which distribution are you using Web Chat from?
NPM
Which hosting environment does this issue primarily affect?
Web apps
Which browsers and platforms do the issue happened?
Browser: Chrome (latest)
Which area does this issue affect?
Others or unrelated
Which theme pack does this issue affect?
Fluent UI
What is the public URL for the website?
No response
Please describe the bug
We’re using Copilot Studio to deploy an agent and connect it via Direct Line, following this sample:
👉 https://github.com/microsoft/Agents/tree/main/samples/nodejs/copilotstudio-webchat-react
However, in Copilot Studio, the agent’s topic uses “Conversation Start” by default to send the initial message.
If this topic is disabled, the bot connection fails, and the following error appears in botframework-webchat:
index.js:120896 Uncaught TypeError: Cannot read properties of undefined (reading 'conversation')
at we9.startConversationAsync (index.js:120896:53)
at async index.js:121292:23
The agent was built using the default “Website Q&A Copilot” template in Copilot Studio.
Please confirm whether it is mandatory for the bot to send the first message when a conversation starts.
The following warning message also appears repeatedly — please check if it’s related:
Warning: Failed prop type: You provided a `value` prop to a form field without an `onChange` handler.
This will render a read-only field.
If the field should be mutable use `defaultValue`.
Otherwise, set either `onChange` or `readOnly`.
✅ Steps to Reproduce
Deploy an agent using Copilot Studio.
Connect it to a webchat using Direct Line.
Disable the “Conversation Start” topic.
Open the chat and observe the browser console.
💡 Expected Behavior
The bot should still connect properly even when the “Conversation Start” topic is disabled.
🧱 Actual Behavior
The connection fails with a TypeError: Cannot read properties of undefined (reading 'conversation') error.
🖥️ Environment
Copilot Studio Agent: Website Q&A Copilot (default)
Sample used: copilotstudio-webchat-react
Framework: botframework-webchat
"@azure/msal-browser": "^4.13.1",
"@microsoft/agents-copilotstudio-client": "^1.0.15",
"botframework-webchat": "4.18.1-main.20250912.cbaf98f",
"botframework-webchat-fluent-theme": "4.18.1-main.20250912.cbaf98f",
"react": "16.8.6",
"react-dom": "16.8.6"
Do you see any errors in console log?
index.js:120896 Uncaught TypeError: Cannot read properties of undefined (reading 'conversation')
at we9.startConversationAsync (index.js:120896:53)
at async index.js:121292:23
startConversationAsync @ index.js:120896
await in startConversationAsync
(anonymous) @ index.js:121292
(anonymous) @ index.js:117093
t9._trySubscribe @ index.js:121124
(anonymous) @ index.js:121120
Mt6 @ index.js:117051
t9.subscribe @ index.js:121118
(anonymous) @ index.js:127470
next3 @ index.js:124096
proc @ index.js:124076
runCallEffect @ index.js:123665
runEffect @ index.js:124130
digestEffect @ index.js:124175
next3 @ index.js:124099
proc @ index.js:124076
(anonymous) @ index.js:123710
immediately @ index.js:123386
runForkEffect @ index.js:123709
runEffect @ index.js:124130
digestEffect @ index.js:124175
next3 @ index.js:124099
currCb @ index.js:124163
takeCb2 @ index.js:123645
put2 @ index.js:123528
chan.put @ index.js:123553
(anonymous) @ index.js:124256
dispatch @ index.js:122898
(anonymous) @ index.js:123081
(anonymous) @ index.js:123622
exec @ index.js:123371
flush @ index.js:123401
asap @ index.js:123380
runPutEffect @ index.js:123619
runEffect @ index.js:124130
digestEffect @ index.js:124175
next3 @ index.js:124099
currCb @ index.js:124163
Promise.then
resolvePromise @ index.js:123571
runCallEffect @ index.js:123661
runEffect @ index.js:124130
digestEffect @ index.js:124175
next3 @ index.js:124099
currCb @ index.js:124163
(anonymous) @ index.js:123630
exec @ index.js:123371
flush @ index.js:123401
asap @ index.js:123380
runPutEffect @ index.js:123619
runEffect @ index.js:124130
digestEffect @ index.js:124175
next3 @ index.js:124099
currCb @ index.js:124163
Promise.then
resolvePromise @ index.js:123571
runCallEffect @ index.js:123661
runEffect @ index.js:124130
digestEffect @ index.js:124175
next3 @ index.js:124099
proc @ index.js:124076
(anonymous) @ index.js:123710
immediately @ index.js:123386
runForkEffect @ index.js:123709
runEffect @ index.js:124130
digestEffect @ index.js:124175
next3 @ index.js:124099
currCb @ index.js:124163
takeCb2 @ index.js:123645
put2 @ index.js:123528
(anonymous) @ index.js:123557
exec @ index.js:123371
flush @ index.js:123401
asap @ index.js:123380
chan.put @ index.js:123556
(anonymous) @ index.js:124256
(anonymous) @ index.js:134085
commitHookEffectList @ index.js:14814
commitPassiveHookEffects @ index.js:14836
callCallback2 @ index.js:2374
invokeGuardedCallbackDev @ index.js:2399
invokeGuardedCallback @ index.js:2430
commitPassiveEffects @ index.js:15943
wrapped @ index.js:2120
flushPassiveEffects @ index.js:15982
renderRoot @ index.js:16352
performWorkOnRoot @ index.js:17047
performWork @ index.js:16988
performSyncWork @ index.js:16968
requestWork @ index.js:16868
scheduleWork @ index.js:16759
dispatchAction @ index.js:12062
(anonymous) @ index.js:208879
await in (anonymous)
(anonymous) @ index.js:208880
commitHookEffectList @ index.js:14814
commitPassiveHookEffects @ index.js:14836
callCallback2 @ index.js:2374
invokeGuardedCallbackDev @ index.js:2399
invokeGuardedCallback @ index.js:2430
commitPassiveEffects @ index.js:15943
wrapped @ index.js:2120
flushFirstCallback @ index.js:1553
flushWork @ index.js:1639
channel4.port1.onmessage @ index.js:1928How to reproduce the issue?
- Navigate to ...
- Click on ...
- Type "..." in the send box
What do you expect?
The bot should still connect properly even when the “Conversation Start” topic is disabled.
What actually happened?
The connection fails with a TypeError: Cannot read properties of undefined (reading 'conversation') error.
Do you have any screenshots or recordings to repro the issue?
Adaptive Card JSON
Additional context
No response