Title: Connecting to websocket leaves app in unstable state · Issue #50291 · angular/angular · GitHub
Open Graph Title: Connecting to websocket leaves app in unstable state · Issue #50291 · angular/angular
X Title: Connecting to websocket leaves app in unstable state · Issue #50291 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? core Is this a regression? No Description When Hydration is being used and websockets (repro is using socket.io) are being connected to the client never becomes stable thus hydration...
Open Graph Description: Which @angular/* package(s) are the source of the bug? core Is this a regression? No Description When Hydration is being used and websockets (repro is using socket.io) are being connected to the cl...
X Description: Which @angular/* package(s) are the source of the bug? core Is this a regression? No Description When Hydration is being used and websockets (repro is using socket.io) are being connected to the cl...
Opengraph URL: https://github.com/angular/angular/issues/50291
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Connecting to websocket leaves app in unstable state","articleBody":"### Which @angular/* package(s) are the source of the bug?\n\ncore\n\n### Is this a regression?\n\nNo\n\n### Description\n\nWhen Hydration is being used and websockets (repro is using socket.io) are being connected to the client never becomes stable thus hydration never occurs.\r\n\r\nFor a while now we have always not initialized websockets while on the server (using `isPlatformBrowser(PLATFORM_ID)`) because they completely hang the universal server (I now understand this is because the `ApplicationRef` does not become stable) but now when using hydration, hydration never occurs for the same reason just not on the client.\r\n\r\nThere should be a way to use hydration alongside websockets (or have a mechanism in place to not include socket connections in the app becoming stable? Although that likely has ramifications).\r\n\r\nAt the very least there should be guidance/docs/errors around Hydration + Sockets so that we can build real-time applications that are also SSR'd.\r\n\r\nWhile this repro is using Socket.io to demostrate the issue we also encountered issues with GraphQL Subscriptions which are also websockets.\n\n### Please provide a link to a minimal reproduction of the bug\n\nhttps://github.com/yharaskrik/socket-io-ng-hydration-issue\n\n### Please provide the exception or error you saw\n\n_No response_\n\n### Please provide the environment you discovered this bug in (run `ng version`)\n\n_No response_\n\n### Anything else?\n\n_No response_","author":{"url":"https://github.com/yharaskrik","@type":"Person","name":"yharaskrik"},"datePublished":"2023-05-14T18:59:41Z","url":"https://github.com/angular/angular/issues/50291"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4b06707c-e511-8f71-7b38-df6753ed0d4c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B28A:25598F:1887A41:205F496:6B0140C5 |
| html-safe-nonce | b8da19ef4e6df40ddf777f1f52e2cf7fccd5b46053f01d47d5777c3c7fb31458 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMjhBOjI1NTk4RjoxODg3QTQxOjIwNUY0OTY6NkIwMTQwQzUiLCJ2aXNpdG9yX2lkIjoiMzg1MTQwMDcxNDg5NTA0ODkwMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | fe357cb7119b0d709e1338b81f0f9abd1ef562428f1dddd54f10a6910a7a97c9 |
| hovercard-subject-tag | issue:1709041164 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/50291/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8a601a1a7710d54e73d689ba6aea7f37894bad20f8b67f8b7e930e6de23fbda6/angular/angular/issues/50291 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8a601a1a7710d54e73d689ba6aea7f37894bad20f8b67f8b7e930e6de23fbda6/angular/angular/issues/50291 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? core Is this a regression? No Description When Hydration is being used and websockets (repro is using socket.io) are being connected to the cl... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | yharaskrik |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width