Open Closed

Unable to add Chat module in a fresh Blazor Server application #5796


User avatar
0
20bc created
  • ABP Framework version: v7.3.2
  • UI Type: Blazor Server
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace:

blazor.server.js?_v=638285706500000000:1 [2023-09-17T13:57:40.571Z] Error: System.Net.Http.HttpRequestException: Response status code does not indicate success: 400 (Bad Request). at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode() at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.NegotiateAsync(Uri url, HttpClient httpClient, ILogger logger, CancellationToken cancellationToken) at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.GetNegotiationResponseAsync(Uri uri, CancellationToken cancellationToken) at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.SelectAndStartTransport(TransferFormat transferFormat, CancellationToken cancellationToken) at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.StartAsyncCore(TransferFormat transferFormat, CancellationToken cancellationToken) at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.StartAsync(TransferFormat transferFormat, CancellationToken cancellationToken) at Microsoft.AspNetCore.Http.Connections.Client.HttpConnectionFactory.ConnectAsync(EndPoint endPoint, CancellationToken cancellationToken) at Microsoft.AspNetCore.Http.Connections.Client.HttpConnectionFactory.ConnectAsync(EndPoint endPoint, CancellationToken cancellationToken) at Microsoft.AspNetCore.SignalR.Client.HubConnection.StartAsyncCore(CancellationToken cancellationToken) at Microsoft.AspNetCore.SignalR.Client.HubConnection.StartAsyncInner(CancellationToken cancellationToken) at Microsoft.AspNetCore.SignalR.Client.HubConnection.StartAsync(CancellationToken cancellationToken) at Volo.Chat.Blazor.Components.MessagesToolbarItem.OnInitializedAsync() at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync() at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

<br>

  • Steps to reproduce the issue:

  • Create a brand new application using ABP Suite

  • Parameters: Blazor Server, Not tiered, Entity Framework

  • Add Chat module using ABP Suite

  • Enable Chat under Administration | Settings | Feature Management

  • Enable Chat under SaaS | Editions

  • When you load the application, the above exception is thrown

It is a fresh app out of ABP Suite. No modifications were made. I think it has something to do with SignalR not being configured properly.


4 Answer(s)
  • User Avatar
    0
    20bc created
    • Additional information:
    • There were a few ERR on ABP Suite console when Chat was installed. Here is part of the output from ABP Suite with ERR:

    log : Restored D:\Repo\ProjectName\src\ProjectName.Blazor\ProjectName.Blazor.csproj (in 16.78 sec). [09:26:49 ERR] Unsupported project type. Project type must be Microsoft.NET.Sdk.BlazorWebAssembly. Determining projects to restore... Writing C:\Users\user\AppData\Local\Temp\tmp4545.tmp

    log : Restored D:\Repo\ProjectName\src\ProjectName.Blazor\ProjectName.Blazor.csproj (in 15.78 sec). [09:27:09 ERR] Unsupported project type. Project type must be Microsoft.NET.Sdk.BlazorWebAssembly. yarn add v1.22.19

    In the end it is:

    [09:27:48 INF] Started database migrations... [09:27:48 INF] Migrating schema for host database... [09:27:51 INF] Executing host database seed... [09:27:52 INF] Successfully completed host database migrations. [09:27:52 INF] Successfully completed all database migrations. [09:27:52 INF] You can safely end this process...

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Please share this fresh app. Thanks

    liming.ma@volosoft.com

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I can't build your app.

    The project file "Liberate/modules/Volo.Account.Pro/test/Volo.Abp.Account.Pro.Application.Tests/Volo.Abp.Account.Pro.Application.Tests.csproj" was not found. [/Liberate/Liberate.sln]

    but you can try to add typeof(ChatSignalRModule) to your LiberateBlazorModule

    You can download the chat module source code, there are some test apps in it.

  • User Avatar
    0
    20bc created

    Adding typeof(ChatSignalRModule) to LiberateBlazorModule resolved the issue! Thank you so much for your help. You star!

    Many thanks, B

Made with ❤️ on ABP v9.1.0-preview. Updated on December 12, 2024, 07:15