question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Adaptive Dialog context causing error on Facebook channel

See original GitHub issue

Version

4.10.2

Describe the bug

I’m setting dialog state in a CodeAction. When I call Dialog.EndDialogAsync, I see an HTTP 4xx error with this message, “{“message”: “(#100) Title is required for this quick reply content type”}” This happens when trying to send a message from an adaptive dialog via the Facebook channel. When I examine the ErrorResponseException body, it contains 5 elements: message: (#100) Title is required for this quick reply content type"} type: OAuthException code: 100 error_subcode: 2018098 fbtrace_id: AmM4t1JGaeXerqqxoNr-pmH

To Reproduce

Steps to reproduce the behavior:

private async Task<DialogTurnResult> FindAirQualityIndex(DialogContext dc, object arg2)
{
    try
    {
        var aqi = new AirQualityIndexer();
        var results = await aqi.Find();

        foreach (var item in results)
        {
            dc.State.SetValue("dialog.AirQualityAt" + item.Location, item.Measure == "N/A" ? " not available right now " : item.Measure.ToString());
            dc.State.SetValue("dialog.AirQualityAt" + item.Location + "_MoreDetails", item.Url);
            dc.State.SetValue("dialog.AirQualityAt" + item.Location + "ImgUrl", "www.test.com");
        }
    }
    catch (Exception ex)
    {
        var errorActivity = new SendActivity("Hey, something went wrong. Try again later");
        await errorActivity.BeginDialogAsync(dc);
    }

    return await dc.EndDialogAsync();
}

Expected behavior

No exception

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
v-kydelacommented, Sep 18, 2020

I am closing this issue due to inactivity. We are still happy to provide help if you need any, though it may be a good idea to make a new post if that’s the case. Please have a look at this to find out the best places to ask for help, and consider asking questions on Stack Overflow.

0reactions
irwinwilliamscommented, Sep 18, 2020

Apologies for the delay, @v-kydela. Was working on some other bots, but you did help me and I’m glad I got it working on FB’s channel.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does Calling Fb UI Dialog functions give error "There is ...
Problem: After closing a Facebook popup, the API still registers that a popup is open, causing errors in subsequent functions.
Read more >
How to fix issue related to 500 error code in web chat ...
I get an error in the Web chat Channel BOT. Please find the HTML file for accessing bot, the waterfall dialog class and...
Read more >
Context | Android Developers
Quickly bring your app to life with less code, using a modern declarative approach to UI, and the simplicity of Kotlin. ... Start...
Read more >
Troubleshoot Microsoft Teams integration with Dynamics ...
This article provides information about the error messages you might face with possible resolutions and some known issues.
Read more >
Using dialog context to improve language understanding
The prior dialog context is previous intents and/or entities already determined from the utterances in prior turns of the dialog. When input is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found