-
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
angular 11 throws net::ERR_SSL_PROTOCOL_ERROR #19403
Comments
@alan-agius4 - Is this a CLI issue? I saw in the discord channel a mention about something similar, " |
@atscott, yeah I’ll take a look at it. |
@snebjorn, can you try to set the |
Let me get back to you in this tomorrow. |
I stumpled upon this dotnet/aspnetcore#27790 seems relevant :) |
I experience the same issue, but the workaround My setup
In Angular 10 when navigating to In Angular 11 when navigating to In Angular 11 vendor.js I notice:
As mentioned with |
The ERR_SSL issue described here gets resolved now with Angular 11.1 / Angular CLI 11.2. However for me it did not resolve the other issue I've been experiencing which is that Live Reload is still getting killed because the error: sockjs.js:2999 WebSocket connection to 'wss://localhost:44300/sockjs-node/.../websocket' failed: WebSocket is closed before the connection is established occurs for me nearly every time the browser reloads. |
I created #19406 as a separate issue since there could be a different issue with dotnet AspNetCore template and I don't want to hijack this thread |
Hi all, Thanks all for the input and all the users who provided the reproductions. I diid look at both reproductions this morning (https://github.com/prabh-62/angular-reverse-proxy and https://github.com/snebjorn/dotnet-angular11) I will be creating a PR with a fix for this shortly. As a workaround you can use Thanks. |
… HTTPS reverse proxy With this change we set the publicHost to `0.0.0.0:0`, when it's not provided. This solved issues where previously the publicHost needed to be specified directly to get around `ERR_SSL_PROTOCOL_ERROR` error when proxing https -> http. NB: this was also the behaviour in version 10 https://github.com/angular/angular-cli/blob/c252968225c0ecac6c4d8ee08e14ae64de8791a8/packages/angular_devkit/build_angular/src/dev-server/index.ts#L170 Closes #19403
… HTTPS reverse proxy With this change we set the publicHost to `0.0.0.0:0`, when it's not provided. This solved issues where previously the publicHost needed to be specified directly to get around `ERR_SSL_PROTOCOL_ERROR` error when proxing https -> http. NB: this was also the behaviour in version 10 https://github.com/angular/angular-cli/blob/c252968225c0ecac6c4d8ee08e14ae64de8791a8/packages/angular_devkit/build_angular/src/dev-server/index.ts#L170 Closes #19403 (cherry picked from commit f67c612)
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. |
🐞 bug report
Affected Package
The issue is caused by package @angular/cli or @angular/core
Is this a regression?
Yes, the previous version in which this bug was not present was: 10.2.3
Console output in Angular 11:
Description
It was working in Angular 10.
Console output:
🔬 Minimal Reproduction
Clone https://github.com/snebjorn/dotnet-angular11
ng serve
in ClientApp folderdotnet run
in the root folder🌍 Your Environment
Angular Version:
Anything else relevant?
The frontend is accessed via https://localhost:5001 because it's "hosted" with ASP.NET Core using
spa.UseProxyToSpaDevelopmentServer("http://localhost:4200");
. See https://docs.microsoft.com/en-us/aspnet/core/client-side/spa/angular?view=aspnetcore-5.0&tabs=visual-studioThe self-signed localhost certificate is trusted.
dotnet dev-certs https -t
. See https://docs.microsoft.com/en-us/aspnet/core/security/enforcing-ssl?view=aspnetcore-5.0&tabs=visual-studio#trust-the-aspnet-core-https-development-certificate-on-windows-and-macosThe text was updated successfully, but these errors were encountered: