Cannot read property 'role' of undefined
See original GitHub issueI used chatdown v1.0.9-20 to convert a very simple .chat file into a .transcript file.
I got the following error when I open the .transcript file in Bot Framework Emulator (4.0.0-preview.40025) Error creating a new conversation in transcript mode: Error: Error while feeding transcript on disk to conversation: Cannot read property ‘role’ of undefined
I don’t know if it’s related to chatdown or Bot Framework Emulator.
Here the .chat file:
user=vishwac
bot=cafebot
user: hi
bot: Hello, I'm the contoso cafe bot. How can I help you?
Here the .transcript file generated by chatdown:
[
{
"conversation": {
"id": "zH4ddZX/tW5AO1SKWmRinDick9M="
},
"id": "1",
"timestamp": "2018-09-27T02:20:18.100Z",
"type": "conversationUpdate",
"channelId": "chatdown",
"membersAdded": [
{
"id": "jopVZjYqyE3A5EnA8dYrlA+Mubw=",
"name": "cafebot",
"role": "bot"
}
],
"membersRemoved": []
},
{
"conversation": {
"id": "zH4ddZX/tW5AO1SKWmRinDick9M="
},
"id": "2",
"recipient": {
"id": "jopVZjYqyE3A5EnA8dYrlA+Mubw=",
"name": "cafebot",
"role": "bot"
},
"from": {
"id": "aqMkJoc/DqiL+cgiJhoUJCxSZ+U=",
"name": "vishwac",
"role": "user"
},
"text": "hi",
"timestamp": "2018-09-27T02:20:20.100Z",
"type": "message",
"channelId": "chatdown"
},
{
"conversation": {
"id": "zH4ddZX/tW5AO1SKWmRinDick9M="
},
"id": "3",
"recipient": {
"id": "aqMkJoc/DqiL+cgiJhoUJCxSZ+U=",
"name": "vishwac",
"role": "user"
},
"from": {
"id": "jopVZjYqyE3A5EnA8dYrlA+Mubw=",
"name": "cafebot",
"role": "bot"
},
"text": "Hello, I'm the contoso cafe bot. How can I help you?",
"timestamp": "2018-09-27T02:20:22.100Z",
"type": "message",
"channelId": "chatdown"
}
]
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Cannot Read Property of Undefined in JavaScript - Rollbar
TypeError : Cannot read property of undefined occurs when a property is read or a function is called on an undefined variable.
Read more >Uncaught TypeError: Cannot read property of undefined In
Uncaught TypeError : Cannot read property of undefined error occurs in Chrome when you read a property or call a method on an...
Read more >[Solved] Cannot read Properties of Undefined in JavaScript
The 'Cannot read properties of undefined' error occurs when you try to access a property or a method on a variable that stores...
Read more >Cannot read property 'roles' of undefined | discord.js | javascript
It seems as if your usera variable is storing a User object, which doesn't have the property members . It looks like you're...
Read more >Uncaught TypeError : Cannot read properties of undefined
Causes for TypeError: Cannot Read Property of Undefined. The error clearly says that it is Undefined, which means the variable might be declared ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is a known issue with chatdown. Updating to 1.0.10 fixes this problem. As a workaround, the emulator uses this version under the hood and can convert .chat files into transcripts and feed them into the chat window automatically. To do this:
@paulfitz72 I was unable to reproduce this with
botframework-cli@4.5.4
and both version 4.5.2 of the Emulator, and the newest nightly build.test.chat
generated test.transcript