Comments (5)
From @Stevenic on August 28, 2018 16:11
which version of botbuilder are you using? Version 4 or version 3? And can you tell me whats the code you're seeing for the second response (or even better where in the code is it being generated.) This shouldn't be happening.
from botbuilder-v3.
From @rwmb on August 28, 2018 16:20
I'm using version 3.15.0
This is what happens when I try to make the requests the way botframework docs suggest.
After the 202 the function halts and the response to the user is never sent back.
By overriding the response object to prevent the 202 I was able to make the response work as expected, but this also makes the client that sent the message see a "Not sent" error for their message (incorrect behavior).
from botbuilder-v3.
From @rwmb on August 28, 2018 16:30
@Stevenic regarding your other question, I don't see the second response, where the user gets his handled response, I assumed the 202 shouldn't be there since this is not necessary for the http request but apparently this is what microsoft chat clients (direct line, skype, etc) use to identify if the message was sent. Am I correct in this assumption?
If this is the case, then are all responses from the bot proactive? This doesn't make sense for me.
from botbuilder-v3.
From @rwmb on August 31, 2018 12:12
I was able to make this work with Cloud Functions by intercepting the 202, creating a PubSub message to proactively send a response to the user and then manually sending back the 202, but there's a considerable delay between the user request and the response. I'll keep working on this but it all behaves as expected now, apart from the delay of course. From what I could understand, the current behavior of the package, without modifications, is to respond the user with a 202 and then send a proactively message to the user from the server after the http request has been resolved. Knowing this would have saved me a lot of time and headache.
Even though this behavior is unexpected for me, the only problem is that because Cloud Functions halt after a request has been resolved, this response never get's back to the user unless it's in the same(ish) execution cycle as the response, obviously not a possibility for me since I use multiple database/api/async calls to respond my user.
The real problem here then is the integration with Cloud Functions. Do you guys plan to target this or I should keep looking into solving this myself?
Thanks in advance.
from botbuilder-v3.
This response behavior of the sdk is by design: https://github.com/Microsoft/BotBuilder-V3/blob/master/Node/core/lib/Session.js#L654
Some recent discussion about HTTP response characteristics can be found here: microsoft/botbuilder-dotnet#1009
from botbuilder-v3.
Related Issues (20)
- Link to BotBuilder example is not available anymore HOT 1
- POST to 'https://facebook.botframework.com/v3/conversations/9838851111469094-906008411166152/activities/lOdKu9yrLed5iyVk3vbBaQJ5mCJPyp12345678fd2Ta0xQ3R_I12345678pmlNxrQ' failed: [400] Bad Request HOT 9
- Hostname/IP does not match certificate's altnames HOT 34
- Question: Will bot services (written with NodeJS SDK v3.14, using DirectLine v3 APIs) stop working after Dec 31, 2019? HOT 2
- Error: Refresh access token failed with status code: 400 HOT 3
- problem when try to call an another Rest-api at Botframework-V3+C#.net HOT 2
- MessageReceivedAsync will not get called sometimes HOT 7
- Extend v3 SDK to support Skills (DotNet) HOT 3
- Extend v3 SDK to support Skills (JS) HOT 1
- Enable SignIn from a Skill HOT 1
- IDialog method execution finished with multiple resume handlers specified through IDialogStack. invalid need: expected Call, have Wait (Microsoft.Bot.Builder.Internals.Fibers.InvalidNeedExceptio) HOT 18
- Microsoft.Bot.Builder - "Object reference not set to an instance of an object" HOT 5
- [Question, bug] Bot framework fails to save state to Doc DB in Teams 1:1 conversation (and errors dialogue) HOT 8
- Message card rendering issue in bot framework v3 HOT 14
- Port: "Enable multiple scopes for single serviceUrl host" to javascript v3 sdk HOT 1
- Can we send adaptive card to particular group instead of channel HOT 1
- How can get Activity after user submit action in adaptive card using java HOT 1
- System.ArgumentNullException: Value cannot be null. (Parameter 'clientId') in bot V 3.30.0 HOT 1
- Data breach observed when two concurrent send message requests are made to different tenants HOT 8
- This repo is missing important files
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from botbuilder-v3.