Giter VIP home page Giter VIP logo

Comments (8)

sbuffkin avatar sbuffkin commented on July 28, 2024

You mentioned data.address a few times in the event handler, but it doesn't look like that's defined in the activity sent, which should be the source of the immediate issue from the looks of things.

That said, I'll take a look into why the callback is not returning the error out of loadSession

from botbuilder-v3.

filipjakov avatar filipjakov commented on July 28, 2024

@nyxsys as the activity enters the bot it has some additional data/properties, one of which is the address property (implementing the botbuilder IAddress interface). Here is an example of a data object:

{
"type":"event",
"timestamp":"2018-11-03T08:47:30.4687371Z",
"name":"connect",
"text":"",
"attachments":[],
"entities":[],
"address":{"id":"6uhHKBSxVUC13WBYlzrJGR|0000000","channelId":"webchat","user":{"id":"Agent01","name":"Agent01"},"conversation":{"id":"6uhHKBSxVUC13WBYlzrJGR"},"bot":{"id":<botId>,"name":<botNAme>},"serviceUrl":"https://directline.botframework.com/"},
"source":"webchat",
"agent":"botbuilder",
"user":{"id":"Agent01","name":"Agent01"}
}

from botbuilder-v3.

sbuffkin avatar sbuffkin commented on July 28, 2024

For the moment I'm setting up a PR to at least add a try catch for error handling to the location that should throw the exception. I am going to dig deeper and try and find out why this is occurring at all after that.

from botbuilder-v3.

sbuffkin avatar sbuffkin commented on July 28, 2024

So the error "Cannot read property 'loadSessionWithOptionalDispatch' of undefined" suggests that something is wrong with the initialization of the universal bot. Could you post your code where you initialize the bot itself so I can see if anything there could do it? Additionally do the other methods from universal bot like send work at this point in your bot?

from botbuilder-v3.

filipjakov avatar filipjakov commented on July 28, 2024

This is the code:

const bot = new builder.UniversalBot(connector)
  .set('localizerSettings', {
    botLocalePath: path.join(process.cwd(), 'locale'),
    defaultLocale: 'en'
  })
  .set('persistConversationData', true)
  .set('autoBatchDelay', 0)
  .set('storage', new builder.MemoryBotStorage());

I've used other methods (like send, on, beginDialog ...) and everything works. loadSession is the only exception.

PS. If there was something wrong with the bot it would never even trigger the event and enter the handler.

from botbuilder-v3.

sbuffkin avatar sbuffkin commented on July 28, 2024

I tried bot.loadSession on a bot on the same version of botbuilder you've listed in three locations. bot.on() as well as bot.dialog() and bot.use() but I have not been able to recreate the error you are seeing, both with and without including the same bot.set() config calls you've posted. Could you try and see if you get a different result out of putting the bot.loadSession() call into middleware using bot.use()?

If that doesn't work, it might be good to see if you could put together a minimum version of your bot that can reproduce this issue.

from botbuilder-v3.

CoHealer avatar CoHealer commented on July 28, 2024

@filipjakov, have you tried the suggestion from @nyxsys or is the issue resolved? Thx.

from botbuilder-v3.

CoHealer avatar CoHealer commented on July 28, 2024

Closing as resolved not repro

from botbuilder-v3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.