Open Closed

Uncaught TypeError: Cannot read properties of undefined (reading 'users') #2453


User avatar
0
AlderCove created
  • ABP Framework version: v5.1.1 & 5.1.2
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:

jquery.js?_v=637774598147390000:4059 Uncaught TypeError: Cannot read properties of undefined (reading 'users') at HTMLDocument. (chatMessageReceiving…2743500000000:12:31) at mightThrow (jquery.js?_v=637774598147390000:3766:29) at process (jquery.js?_v=637774598147390000:3834:12)

  • Steps to reproduce the issue:"
  1. Create a new application
  2. Add the Chat module
  3. run the application
  4. enable Chat feature
  5. open developer tools
  6. refresh the page
  7. view the developer tools console

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

3 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Try to add ChatProxyScriptContributor("/client-proxies/chat-proxy.js")

    public class ChatProxyScriptContributor : BundleContributor
    {
        public async override Task ConfigureBundleAsync(BundleConfigurationContext context)
        {
            var featureChecker = context.ServiceProvider.GetService<IFeatureChecker>();
    
            if (await featureChecker.IsEnabledAsync(ChatFeatures.Enable))
            {
                context.Files.AddIfNotContains("/client-proxies/chat-proxy.js");
            }
        }
    }
    
    
    Configure<AbpBundlingOptions>(options =>
    {
        options.ScriptBundles
                .Get(StandardBundles.Scripts.Global)
                .AddContributors(typeof(ChatGlobalScriptContributor), typeof(ChatProxyScriptContributor ));
    });
    
    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    AlderCove created

    Thanks.

    That fixed the problem, but is this a bug and should the script contributor be automatically configured by way of my Web module having a dependency on the ChatWebModule?

    Or, is this the typical approach for making the module scripts available in the Web projects?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    We fixed it in the next version.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 16, 2026, 14:50
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.