Googlebot fails to render app (used to work without server rendering). SEO.
Bug Report or Feature Request (mark with an x)
- [x] bug report
- [ ] feature request
This is to report a regression:
An app produced by angular-cli used to be properly rendered by googlebot (without any server rendering involved, I have snapshots in the google search console properly rendering my landing page, from a month ago).
It now fails on my app, and on a fresh starter app from angular-cli 1.0. It only shows "Loading...", i.e. the content of app works! gets properly displayed on the real website but not by googlebot.
I am building the app with the following flags: ng build --prod --aot --no-sourcemap
Versions.
@angular/cli: 1.0.0
node: 6.9.5
os: linux x64
@angular/common: 4.0.1
@angular/compiler: 4.0.1
@angular/core: 4.0.1
@angular/forms: 4.0.1
@angular/http: 4.0.1
@angular/platform-browser: 4.0.1
@angular/platform-browser-dynamic: 4.0.1
@angular/router: 4.0.1
@angular/cli: 1.0.0
@angular/compiler-cli: 4.0.1
OS: Linux, Ubuntu 16.04
Repro steps.
Pull latest angular-cli, build, and deploy to app-engine
Test page via Google's speed test / mobile friendly tools:
- https://developers.google.com/speed/pagespeed/ or
- https://search.google.com/search-console/mobile-friendly
this is interesting .. I used to have the opposite problem. All my apps since beta.31 always rendered only loading... However, after upgrading to 1.0.0 and enabling gzip compression I started to see snapshots of my app. I didn't think was related to the app itself but rather the gzip might have boosted load speed.
The basic "App works" App is so small and fast to load with --aot that I doubt it is related to the load speed.
In the Google search console, I have snapshots from January where it properly bootstrapped the app. It regressed sometimes during February.
What flags do you use with 'ng build'?
I use --prod which should already include the --aot .. Thats why in my case I didn't see the "loading.." as a bug when I first started since that is technically what view source is.. I was mostly amused / surprised to see a full snapshot after I enabled gzip .. so I thought it was gzip in my case what enhanced my application. It'd be good to know if there is an official support / expected behavior for Angular 2 snapshots.
same here, used to work before uploading to angular 4 It's quite critical now that google is not rendering my site...
Any news @Judp0m ?
@Perezmarc Did you find a solution? I have the same problem.
Not sure what's happening myself. Will mark for investigation.
I am also experiencing the same error, not using angular-cli.
Same here
Closing in favor of https://github.com/angular/angular/issues/16718, there seems to be a solution there as well. Thanks to @Flood for looking into this.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.