-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SignalR does not work for .net core - react template #4899
SignalR does not work for .net core - react template #4899
Comments
@cokceken thank you for reporting this problem, we will check and fix it. |
@cokceken Hi, The issue is cause from the SignalRAspNetCoreHelper.ts line 18.
The code tries to load a file from localhost:3000/dist/abp.signalr-client.js and fails to do so. In order to fix the issue for the development environment you should modify the craco.config.js in line 44 and include the following piece of code Please find my full craco.config.js file below for reference. Haven't tested my change in the production environment but I am pretty sure that you should follow the same approach. After making that change, the error should now be gone. Enjoy. |
@kwstasarva It worked! Thank you :) |
@cokceken Glad I've helped :) |
@kwstasarva 💯 I will update the template. |
@maliming Thank you for the awesome work! Glad I've helped! |
I am using Abp.AspNetCode 4.9.0 with react template. Under
App.tsx
there is a signalR initialization code pieceSo I provided "SignalR" and "SignalR.AspNetCore" features to the related login. And when the code gets executed I am seeing following error from the file
signalRAspNetCoreHelper.ts
Util.loadScript(AppConsts.appBaseUrl + '/dist/abp.signalr-client.js');
That's because script loading from
/dist/abp.signalr-client.js
returns a regular 404 page.Also when I load
abp.signalr-client.js
as a class manually, thesignalR
variable is undefined so the code does not work.Could you help me with bringing SignalR up for the react template?
The text was updated successfully, but these errors were encountered: