algolia/angular-instantsearch

SSR example doesn't work

ohryk-intellias opened this issue ยท 3 comments

Describe the bug ๐Ÿ›

The SSR example for the latest release (tag 4.4.0) doesn't work.

To Reproduce ๐Ÿ”

Steps to reproduce the behavior:

  1. Run git clone https://github.com/algolia/angular-instantsearch.git
  2. Run git checkout 4.4.0
  3. Run yarn examples:ssr
  4. Disable JavaScript for the http://localhost:4000/
  5. Open http://localhost:4000/?instant_search%5Bquery%5D=amazon

Expected behavior ๐Ÿ’ญ

The rendered HTML page should display the search results. No errors in the server console output.

Environment:

  • OS: macOS 13.2.1
  • Browser: Chrome
  • Version 112.0.5615.49
  • Node: v14.21.3

Additional context

Seems that ais-search-box is not SSR-friendly and uses some browser-specific API. I tried to remove the ais-search-box widget and if so - then I can see the rendered page but when trying to change the query param in the URL - the same result appears.
Screenshot 2023-04-06 at 15 28 59

Screenshot 2023-04-06 at 15 29 13

Hi @ohryk-intellias !

This is was actually fixed in #986, I will plan a 4.4.1 release and update this issue

Hey @ohryk-intellias, 4.4.1 has been released and it fixes this issue :
image

Thanks again for your feedback ๐Ÿ™‡