Skip to content
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

Links refer to non-existent web endpoints #56066

Closed
1 task
atiris opened this issue May 24, 2024 · 10 comments
Closed
1 task

Links refer to non-existent web endpoints #56066

atiris opened this issue May 24, 2024 · 10 comments
Assignees
Labels
area: adev Angular.dev documentation P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Milestone

Comments

@atiris
Copy link

atiris commented May 24, 2024

Command

serve

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

When the cli reports any documentation links, it refers to angular.io. For example in this demo https://angular.io/errors/NG05000

However, there will be a remeasurement to the address https://v17.angular.io/errors/NG05000 and that's the end of it. No other redirection and only shows Page is not available. Expected link is https://angular.dev/errors/NG05000

Please edit the links to angular.dev.
I suppose that a redirect to angular.dev can be done as a temporary solution, but I believe that the solution is to fix the code in the cli.

The link is from this message, but I assume it will be the same for any documentation link. NG05000: Angular detected that hydration was enabled for an application that uses a custom or a noop Zone.js implementation. This is not yet a fully supported configuration. Find more at https://angular.io/errors/NG05000

Minimal Reproduction

In this case you can create app with ng new xyz --ssr true and continue according to https://angular.dev/guide/experimental/zoneless. Then start with ng serve but I thing this is more general bug.

Exception or Error

No response

Your Environment

Angular CLI: 18.0.1
Node: 20.13.1
Package Manager: npm 10.8.0
OS: win32 x64

Angular: 18.0.0
... animations, cdk, common, compiler, compiler-cli, core, forms
... material, platform-browser, platform-browser-dynamic
... platform-server, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1800.1
@angular-devkit/build-angular   18.0.1
@angular-devkit/core            18.0.1
@angular-devkit/schematics      18.0.1
@angular/cli                    18.0.1
@angular/ssr                    18.0.1
@schematics/angular             18.0.1
rxjs                            7.8.1
typescript                      5.4.5

Anything else relevant?

No response

@JeanMeche JeanMeche transferred this issue from angular/angular-cli May 24, 2024
@JeanMeche
Copy link
Member

JeanMeche commented May 24, 2024

Hi, it looks like there is an issue with the service work. If you clean your browser cache, you'll be fine.

@alan-agius4
Copy link
Contributor

These errors are generated by the framework runtime and not by the Angular CLI.

@atiris
Copy link
Author

atiris commented May 24, 2024

Hi. Thank you both for the guidance.
If i could ask you nicely, could you tell me more precisely which cache it is? I tried this:

npm cache clean --force
rmdir /s node_modules
npm i
ng cache clean
# close and open command line window
ng serve -o
... but still ... Find more at https://angular.io/errors/NG05000

This is new project (not after ng update).

@JeanMeche
Copy link
Member

The one from your browser, you can clean your data in the application tab of the devtools.

Screenshot 2024-05-24 at 16 29 25

@atiris
Copy link
Author

atiris commented May 24, 2024

I clicked "Clear site data" on "http://localhost:4200/", "https://angular.dev/" and "https://github.com" just to be sure (which logged me out 🙄). This was not possible for angular.io, which immediately redirected me to angular.dev, so i couldn't open devtools for angular.io domain.

image

However, after launch I still see it like this.

image

Then I tried this setting in chrome on the url: chrome://settings/content/all?searchSubpage=angular and delete all content for localhost, angular.io and angular.dev and close and open browser

image

After run ng serve again, message is again: Find more at https://angular.io/errors/NG05000 with angular.io.
Then, click on it, it redirects me to https://v17.angular.io/docs not to angular.dev.
It's still not ok, but at worst I won't end up with a non-existent site.

@JeanMeche
Copy link
Member

You need clear it when on https://v17.angular.io/docs

Also, we fixed the url in the logs, they will be shipped with the next patch version.

@atiris
Copy link
Author

atiris commented May 24, 2024

Ok, now (after clear) https://angular.io/errors/NG05000 redirects to https://v17.angular.io/docs
Then (I assume) that the application for v17 (v17.angular.io) is cached again and when I enter the url (https://angular.io/errors/NG05000) second time, it is processed differently, in case of a second attempt to open this url I get no redirect but "canceled" and "CORS policy error". Tested in incognito mode.

image

Can you confirm this (that second time is link from cli unavailable)?
But this issue is about links from cli that still points to angular.io like Find more at https://angular.io/errors/NG05000
So if you already fixed this in cli next patch version, we can wait and ignore this strange behavior on the second visit to the url redirected from angular.io to v17.angular.io. Since it doesn't look like a bug in the cli, but in the processing of the redirect in the application v17.angular.io.

And you can close this bug report also when it is already fixed internally and it will be published in the next patch.

Thank you all.

@sasidharansd
Copy link
Contributor

Hi @JeanMeche , Does this related to the same issue? Accessed the link 'https://v17.angular.io/api/common/NgTemplateOutlet' posted on one of the recent issue. Getting site can't be reached message. This also occurs to few of my aio bookmarked links as well.

image

@JeanMeche
Copy link
Member

Yeah the service worker is at fault here.

@pkozlowski-opensource pkozlowski-opensource added the area: adev Angular.dev documentation label May 28, 2024
@ngbot ngbot bot added this to the needsTriage milestone May 28, 2024
@bencodezen bencodezen added the P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent label Jun 3, 2024
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Jun 3, 2024
@alxhub
Copy link
Member

alxhub commented Jun 10, 2024

Closing as the service worker issues were resolved, and the runtime does correctly generate angular.dev links now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: adev Angular.dev documentation P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

No branches or pull requests

7 participants