Base solution for your next web application
Open Closed

ChatHub signalr connection fails to negotiate when user has too many roles #10201


User avatar
0
wmaiuri created

Prerequisites

Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • What is your product version? v10.2.0
  • What is your product type (Angular or MVC)? Angular
  • What is product framework type (.net framework or .net core)? .net core

If issue related with ABP Framework

  • What is ABP Framework version? ABP 6.1

If issue is about UI

  • Which theme are you using?
  • What are the theme settings?

We have migrated users from a legacy system into our asp.net zero product. When a user has 15 roles or more an error is given when establishing the chathub signalr connection. I think the enc_auth_token is overflowing??

Starting connection using WebSockets transport dashboard:1 Access to fetch at 'http://localhost:44302/signalr/negotiate?enc_auth_token=wNYmO41%2F48SHNstaLVXxHCCre29BZQl1NhC6NM3R3rzpXtPQxVzH6jEzA%2FQhXFN5tu6Fk7pO53uppm1mVXMZgxbyRVz26dnepi%2FFyB6axBY%2B6gq1GL%2BuRQgoiFUCjRN2p8w6LevViwKlHyWZZJZO1DGVSjAi1m2U%2Bog9pkHw9%2FRcqHiVHx%2FbAMhpiPg12zdC8rONo4L834FOlWmwDNVh3WBmXTzyQIKnYHm%2BsbxIJFvhK2MS9md2vXaosC4YLG3%2BUkQstwV6mTyIonFRY0hzpZyPVkS9fDz9fIDykoyryY4L3oZnxT97x6jLP3%2B%2FiNYpTrh4y0a%2BTsvX%2FTcgl%2Bsn%2FYM%2BL9cRevSc4MzF9SyAvlwEhFfyDkvDclfh%2BrxOh31Si%2BCY57VODKOntSVqxCS5lI731wuhA4EKhCLsha2juj0Pq6F5a%2BgUPUo9I5lq7L7coqPidnfEQb3gZM9JRkz8RsfK68pz7eKHap0XpoXZznTxWY56imWx7OAgV8AnnLWiTFy%2Be5WvmF8epq%2BIbnfCnNX%2Bsj5PgNGWNgCgYBi%2F%2Fx7Ess%2FkMrQ1736SGlLVZ%2BTgB1RGq4%2BDa5eVW0mv29FmKY8sVJavu%2FMRfwtjaBlpt8WT30GibiC6Hf3Sn4aJvYlqPgDsizuP21V%2F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Gy8P6ygnu26Nl7uXeZIxMKWuvk89jMjIKxFXFV3c7B41HNY0Ue83eTxFNKVxFfUKUidVj8%2BFBmU3q39g8e5KtfSU9wZqaO0Znh4S1Esv579ZfmzffIZDKTnF51Cx%2F7QzGtzPpfRh7%2B9hIEnCAcxTre9IaHO50Ayxq6X8Q54ueIYF3kTKBBd1zk714ravatJ6iVYihRRKyoA%2BbbRjoi8GHcgJAQc5%2FP6jb2b1%2FTfe%2BXNxDrFuXzl0UhX%2FakQ%3D%3D&negotiateVersion=1' from origin 'http://localhost:44404' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. :44302/signalr/negotiate?enc_auth_token=wNYmO41%2F48SHNstaLVXxHCCre29BZQl1NhC6NM3R3rzpXtPQxVzH6jEzA%2FQhXFN5tu6Fk7pO53uppm1mVXMZgxbyRVz26dnepi%2FFyB6axBY%2B6gq1GL%2BuRQgoiFUCjRN2p8w6LevViwKlHyWZZJZO1DGVSjAi1m2U%2Bog9pkHw9%2FRcqHiVHx%2FbAMhpiPg12zdC8rONo4L834FOlWmwDNVh3WBmXTzyQIKnYHm%2BsbxIJFvhK2MS9md2vXaosC4YLG3%2BUkQstwV6mTyIonFRY0hzpZyPVkS9fDz9fIDykoyryY4L3oZnxT97x6jLP3%2B%2FiNYpTrh4y0a%2BTsvX%2FTcgl%2Bsn%2FYM%2BL9cRevSc4MzF9SyAvlwEhFfyDkvDclfh%2BrxOh31Si%2BCY57VODKOntSVqxCS5lI731wuhA4EKhCLsha2juj0Pq6F5a%2BgUPUo9I5lq7L7coqPidnfEQb3gZM9JRkz8RsfK68pz7eKHap0XpoXZznTxWY56imWx7OAgV8AnnLWiTFy%2Be5WvmF8epq%2BIbnfCnNX%2Bsj5PgNGWNgCgYBi%2F%2Fx7Ess%2FkMrQ1736SGlLVZ%2BTgB1RGq4%2BDa5eVW0mv29FmKY8s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H%2FNWfCU6xQXJEtQd5f7r1B%2BKOqlLJlgrLnwNVXS0cZVJRUKWEGy8P6ygnu26Nl7uXeZIxMKWuvk89jMjIKxFXFV3c7B41HNY0Ue83eTxFNKVxFfUKUidVj8%2BFBmU3q39g8e5KtfSU9wZqaO0Znh4S1Esv579ZfmzffIZDKTnF51Cx%2F7QzGtzPpfRh7%2B9hIEnCAcxTre9IaHO50Ayxq6X8Q54ueIYF3kTKBBd1zk714ravatJ6iVYihRRKyoA%2BbbRjoi8GHcgJAQc5%2FP6jb2b1%2FTfe%2BXNxDrFuXzl0UhX%2FakQ%3D%3D&negotiateVersion=1:1 Failed to load resource: net::ERR_FAILED

Reducing down to 14 roles and connection is made with no errors.

DEBUG: abp.js:355 Starting connection using WebSockets transport signalr.min.js:16 [2021-03-24T15:09:04.658+00:00] Information: WebSocket connected to ws://localhost:44302/signalr?enc_auth_token=wNYmO41%2F48SHNstaLVXxHCCre29BZQl1NhC6NM3R3rzpXtPQxVzH6jEzA%2FQhXFN5tu6Fk7pO53uppm1mVXMZgxbyRVz26dnepi%2FFyB6axBY%2B6gq1GL%2BuRQgoiFUCjRN2p8w6LevViwKlHyWZZJZO1DGVSjAi1m2U%2Bog9pkHw9%2FRcqHiVHx%2FbAMhpiPg12zdC8rONo4L834FOlWmwDNVh3WBmXTzyQIKnYHm%2BsbxIJFvhK2MS9md2vXaosC4YLG3%2BUkQstwV6mTyIonFRY0hzpZyPVkS9fDz9fIDykoyryY4L3oZnxT97x6jLP3%2B%2FiNYpTrh4y0a%2BTsvX%2FTcgl%2Bsn%2FYM%2BL9cRevSc4MzF9SyAvlwEhFfyDkvDclfh%2BrxOh31Si%2BCY57VODKOntSVqxCS5lI731wuhA4EKhCLsha2juj0Pq6F5a%2BgUPUo9I5lq7L7coqPidnfEQb3gZM9JRkz8RsfK68pz7eKHap0XpoXZznTxWY56imWx7OAgV8AnnLWiTFy%2Be5WvmF8epq%2BIbnfCnNX%2Bsj5PgNGWNgCgYBi%2F%2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2hROb%2BrUsjAqo5IEnIBjbsdYsSQaizSUKaw4annoTM4mHsMyTVPUdvEsNFH3oMWs4cTRFcNu4FardGp59xqxlu9XM2sCT%2F9bSJaomjJ8YgZnFGHcnvoPx5KEI7ujFyZxtCZFkQ128qlYO9KTFHeAkj0%2BVnypRedCIyYM2JKElQfWtvjlHWlWCjdqid9rBvsV%2FDNrt2kJs6ouqlQ7OCctVrmzLTla4V7n7BMyhhVM4sVgkoQixt0joK411AFbgSz5LPu6Su5g5BWUJo1mmEehtjqng%3D&id=bq7_K9WuNbAhA-zLKBF1CA. abp.js:355 DEBUG: abp.js:355 Connected to SignalR server! abp.js:355 DEBUG: abp.js:355 Registered to the SignalR server! signalr.min.js:16 [2021-03-24T15:09:04.697+00:00] Information: WebSocket connected to ws://localhost:44302/signalr-chat?enc_auth_token=wNYmO41%2F48SHNstaLVXxHCCre29BZQl1NhC6NM3R3rzpXtPQxVzH6jEzA%2FQhXFN5tu6Fk7pO53uppm1mVXMZgxbyRVz26dnepi%2FFyB6axBY%2B6gq1GL%2BuRQgoiFUCjRN2p8w6LevViwKlHyWZZJZO1DGVSjAi1m2U%2Bog9pkHw9%2FRcqHiVHx%2FbAMhpiPg12zdC8rONo4L834FOlWmwDNVh3WBmXTzyQIKnYHm%2BsbxIJFvhK2MS9md2vXaosC4YLG3%2BUkQstwV6mTyIonFRY0hzpZyPVkS9fDz9fIDykoyryY4L3oZnxT97x6jLP3%2B%2FiNYpTrh4y0a%2BTsvX%2FTcgl%2Bsn%2FYM%2BL9cRevSc4MzF9SyAvlwEhFfyDkvDclfh%2BrxOh31Si%2BCY57VODKOntSVqxCS5lI731wuhA4EKhCLsha2juj0Pq6F5a%2BgUPUo9I5lq7L7coqPidnfEQb3gZM9JRkz8RsfK68pz7eKHap0XpoXZznTxWY56imWx7OAgV8AnnLWiTFy%2Be5WvmF8epq%2BIbnfCnNX%2Bsj5PgNGWNgCgYBi%2F%2Fx7Ess%2FkMrQ1736SGlLVZ%2BTgB1RG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Kaw4annoTM4mHsMyTVPUdvEsNFH3oMWs4cTRFcNu4FardGp59xqxlu9XM2sCT%2F9bSJaomjJ8YgZnFGHcnvoPx5KEI7ujFyZxtCZFkQ128qlYO9KTFHeAkj0%2BVnypRedCIyYM2JKElQfWtvjlHWlWCjdqid9rBvsV%2FDNrt2kJs6ouqlQ7OCctVrmzLTla4V7n7BMyhhVM4sVgkoQixt0joK411AFbgSz5LPu6Su5g5BWUJo1mmEehtjqng%3D&id=C8GeKbW8J80XHhzTShmvjQ.

Is there anyway to increase the size of enc_auth_token?


1 Answer(s)
  • User Avatar
    0
    gterdem created
    Support Team

    It is not related with enc_auth_token. It is related with the length of the query string. Even if your second sample is working in localhost, it won't be working on production since domain name will probably be longer then localhost.

    General rule of thumb is not to exceed 2048 chars. You may want to read more here https://stackoverflow.com/a/417184