Base solution for your next web application
Open Closed

ChatHub connectionState is undefined #11976


User avatar
0
kworkme created

Hi team, I''m doing upgrading from 10.x.x to 13.x.x and get problem with ChatHub.connection.connectionState is undefined now. What I should check to fix this issue? On old version (10.x.x), connectionState is still there

It is also error "Chat is not connected!" when I tested with version 13.1.0 downloaded from website


7 Answer(s)
  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi,

    In the "chat.signalr.js" file located under the Chat folder, as seen below Change the "connectionState" variable in the previous version to "_connectionState". This change will fix the "Chat is not connected" issue.

  • User Avatar
    0
    kworkme created

    Thank you, it is okay now

    Btw, there is another issue relate to UniOfWork, after upgrading, I need to add [UnitOfWork] to some AppService and ViewComponent to made it work, but I don't see it on original project. What should I do to avoid issue of UoW is null

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    For some of the ViewComponents, you need to start a UnitOfWork manually but it shouldn't be necessary for app services. This is related to https://github.com/aspnetboilerplate/aspnetboilerplate/pull/6165

  • User Avatar
    0
    kworkme created

    Yes, I already add UoW to ViewComponent manually, but my custom App Services are still show error "ArgumentNullException: Value cannot be null. (Parameter 'unitOfWork')". What should I do here to check if I missed something?

    My App Service is inherit from AppServiceBase and it's interface

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Could you share your AppService and its interface ?

  • User Avatar
    0
    kworkme created

    Hi,

    Could you share your AppService and its interface ?

    May I have your email address?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    You can send it to [email protected]