-
Notifications
You must be signed in to change notification settings - Fork 12k
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
ASP.Net Core 8 / Angular 18 won't start after upgrading Angular from 17 to 18 #28331
Comments
I suspect this is being served from a Node server that is driven by |
Interesting, I will look into that. |
The stacktrace contains fragments of |
Found these comments on github that give steps for migrating to SpaProxy, but they don't seem to be completely accurate. |
I have reached the point where my Angular app starts, but I'm running into CORS errors with requests from Angular to my .Net Core backend.
https://localhost:4200 should be the angular app, but the .Net backend should be listening on another port. |
After trying to configure the SpaProxy, I have the following issue: The first back-end query triggers authentication against our corporate OAuth server, Have been playing with configuration in proxy.conf.js, but currently getting invalid redirect errors
|
Proxying on the client side with the SpaProxy/proxy.conf.js/json is an issue when the back-end ASP.Net Core is using OIDC Authentication. I have gone back to trying to determine where this error is introduced with the legacy Microsoft.AspNetCore.SpaServices code, which worked in Angular 17 and breaks with Angular 18. I did find this: webpack/webpack#18606 which does appear to be the cause. |
It appears upgrading webpack-dev-middleware to 7.4.2 also fixes the issue. Hopefully a dependency update can be made to fix this for Angular 18? |
…o `7.4.2` This update contains a fix for `Error: Cannot set headers after they are sent to the client`. See: https://github.com/webpack/webpack-dev-middleware/blob/master/CHANGELOG.md#742-2024-08-21 Closes angular#28331
…o `7.4.2` This update contains a fix for `Error: Cannot set headers after they are sent to the client`. See: https://github.com/webpack/webpack-dev-middleware/blob/master/CHANGELOG.md#742-2024-08-21 Closes #28331
Closed via #28340 |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Which @angular/* package(s) are the source of the bug?
Don't known / other
Is this a regression?
Yes
Description
Upgraded Angular/material from 17 to 18 with the standard ng update commands provided via https://angular.dev/update-guide?v=17.0-18.0&l=1
Attempting to start in Visual Studio get exceptions shown below
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
Please provide the environment you discovered this bug in (run
ng version
)Anything else?
Angular 17 worked, ran the following commands:
The text was updated successfully, but these errors were encountered: