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

getTranscriptActivities failing to retrieve transcripts from storage when passing in a start time #3864

Closed
tomSauret847 opened this issue Jul 13, 2021 · 6 comments · Fixed by #3877
Assignees
Labels
Bot Services Required for internal Azure reporting. Do not delete. Do not change color. bug Indicates an unexpected problem or an unintended behavior. customer-replied-to Indicates that the team has replied to the issue reported by the customer. Do not delete. customer-reported Issue is created by anyone that is not a collaborator in the repository.

Comments

@tomSauret847
Copy link

Github issues should be used for bugs and feature requests. Use Stack Overflow for general "how-to" questions.

Versions

What package version of the SDK are you using. 4.14.0
What nodejs version are you using 10.24.1
What browser version are you using N/A
What os are you using Windows

Describe the bug

Give a clear and concise description of what the bug is.
When listing the transcripts we are receiving a empty array
const transcripts = await transcriptStore.getTranscriptActivities(channelId, convoId, undefined, startTime);

We are passing in a start time 15 minutes before the call to retrieve the transcripts
using listTranscripts we can see there is 20 entrees in the store but unable to retrieve the content
we are using the TranscriptLoggerMiddleware to record the transcripts
when we retrieve the transcripts without passing in a start time we can get back all the activities for the conversation Id

To Reproduce

Steps to reproduce the behavior:

  1. Setup bot to use the trancriptLoggerMiddleware
  2. have a conversation with the bot
  3. At the end of the conversation use getTransriptActivities passing in a start time to list the conversation
  4. The call will return an empty array
  5. If you do not pass in a start time the call will return all the transcripts for the conversation Id

Expected behavior

Give a clear and concise description of what you expected to happen.
Be able to retrieve the transcripts for the conversation that has taken place from the start time passed into the call

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.
Using the Teams channel the conversation Id never changes. This requires passing in a start time to retrieve the transcripts for the interaction that has just taken place and not the entire history that could be months old

@tomSauret847 tomSauret847 added bug Indicates an unexpected problem or an unintended behavior. needs-triage The issue has just been created and it has not been reviewed by the team. labels Jul 13, 2021
@stevkan stevkan added Bot Services Required for internal Azure reporting. Do not delete. Do not change color. customer-reported Issue is created by anyone that is not a collaborator in the repository. labels Jul 13, 2021
@stevkan
Copy link
Collaborator

stevkan commented Jul 16, 2021

@tomSauret847, thank you for your patience. I will take a look at this and hope to have an update for you shortly.

@stevkan
Copy link
Collaborator

stevkan commented Jul 21, 2021

@tomSauret847, unfortunately, I am not able to repro the issue. Can you share code as well as what store you are using (Azure Blob Storage, CosmosDB, memory)?

As described here, this is what my code looks like, where the channel is directline, no continuationToken is being provided, and the date is a string ('7/20/2021 10:00:00'), using Azure Blob Storage:

const transcripts = await this.transcriptStore.getTranscriptActivities('directline', .activity.conversation.id, null, date);

@stevkan stevkan added the customer-replied-to Indicates that the team has replied to the issue reported by the customer. Do not delete. label Jul 21, 2021
@tomSauret847
Copy link
Author

Thank you @stevkan to answer your questions
We are using Azure Blob Storage
We are using the Teams and Direct line channels and debugging using the emulator
here is the code we are using
const startTime = new Date();
startTime.setMinutes(now.getMinutes() - 15); // get the last 15 minutes of transcripts
const convoId = turnContext.activity.conversation.id;
const channelId = turnContext.activity.channelId;
const history = await transcriptStore.getTranscriptActivities(channelId, convoId, undefined, startTime);

this sends in a time stamp formatted like
Wed Jul 21 2021 06:34:51 GMT-0500 (Central Daylight Time)

This is working with the botbuilder-azure package, but when we moved over to the botbuilder-azure-blobs package we were no longer pulling back the transcripts

@stevkan
Copy link
Collaborator

stevkan commented Jul 21, 2021

@tomSauret847, this appears to be a legitimate bug. Once I switched libraries, I was able to repro the issue. If it is not a problem doing so, I would recommend switching back to the 'botbuilder-azure' library for the short-term until this bug is fixed.

@joshgummersall, repro steps:

  1. npm install botbuilder-azure-blobs (should be v4.14.1-preview)
  2. Implement transcript store using `new BlobsTranscriptSotre(CONNECTION_STRING, STORAGE_CONTAINER)
  3. Call getTranscriptActivities() at end of conversation, like so:
    • const startTime = new Date();
    • startTime.setMinutes(now.getMinutes() - 15); // get the last 15 minutes of transcripts
    • const convoId = turnContext.activity.conversation.id;
    • const channelId = turnContext.activity.channelId;
    • const history = await transcriptStore.getTranscriptActivities(channelId, convoId, undefined, startTime);
    • console log (or other) 'history'
  4. Start and end conversation with bot
  5. Observe returned empty array

@stevkan stevkan assigned joshgummersall and unassigned stevkan Jul 21, 2021
@stevkan stevkan removed the needs-triage The issue has just been created and it has not been reviewed by the team. label Jul 21, 2021
@tomSauret847
Copy link
Author

Thank you @stevkan unfortunately we cannot switch back due to the security vulnerability that is in the botbuilder-azure package. We will wait for this bug to be fixed and move forward from here.

joshgummersall pushed a commit that referenced this issue Jul 21, 2021
@joshgummersall
Copy link
Contributor

Looks like a piece of data I expected the blob storage API to return did not exist. I just tested locally and am submitted a PR with a fix. Thanks for your patience and for filing the issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bot Services Required for internal Azure reporting. Do not delete. Do not change color. bug Indicates an unexpected problem or an unintended behavior. customer-replied-to Indicates that the team has replied to the issue reported by the customer. Do not delete. customer-reported Issue is created by anyone that is not a collaborator in the repository.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants