Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emulator 4.2.1 doesn't show transcript file generated with chatdown #1256

Closed
KrisvanderMast opened this issue Jan 24, 2019 · 3 comments · Fixed by #1425
Closed

Emulator 4.2.1 doesn't show transcript file generated with chatdown #1256

KrisvanderMast opened this issue Jan 24, 2019 · 3 comments · Fixed by #1425
Assignees

Comments

@KrisvanderMast
Copy link

Tool

Name: [Chatdown]
Version: 1.0.10
OS: Windows 10

Describe the bug

A couple of months ago transcripts didn't load when I used chatdown latest. Reverting to version 1.0.10 did the trick as described in microsoft/botbuilder-tools#702. However today I tried (with both versions of chatdown) to generate a transcript file but it doesn't open in the bot emulator (version 4.2.1).

The bot emulator gives a notification stating the following "Error creating a new conversation in transcript mode: Error: Error while feeding transcript on disk to conversation: Unexpected token ? in JSON at position 0

To Reproduce

Steps to reproduce the behavior:

  1. use chatdown greeting.chat > greeting.transcript
  2. Open the bot emulator
  3. File > open transcript....
  4. Select the transcript file
  5. There's no chat conversation being shown

Expected behavior

I would expect to see the chat messages between bot and user. It used to work.

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

[bug]

@KrisvanderMast
Copy link
Author

I tried again but now from a common cmd.exe box instead of the PowerShell one in the terminal window of Visual Studio Code. I noticed that both give different file sizes (cmd: 1472 bytes, PS: 3082 bytes). The one generated with the cmd.exe (or changing to cmd in the VS Code terminal window) generated the working transcript file.

I renamed the .transcript files to .txt as to be able to upload them here per your convenience to check them out.

greeting2.txt
greeting.txt

@sgellock sgellock transferred this issue from microsoft/botbuilder-tools Jan 25, 2019
@tonyanziano
Copy link
Contributor

@KrisvanderMast we encountered a similar issue a while back, and it was due to the fact that VSCode's integrated terminal uses a different encoding -- UTF-16le I believe -- when generating the .transcript file. It was the initial Byte Order Mark at the beginning of the file that was causing the issue. We did end up using a library to handle the BOM, and so it seems like this might be a regression.

I'll investigate.

@tonyanziano
Copy link
Contributor

I was able to repro the same results by generating two transcripts from the same chat file:

  • 1 using chatdown from a cmd window
  • 1 using chatdown from the integrated VSCode terminal (Powershell)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants