Angular 17 SSR -> _FirebaseError: Performance: Window is not available. (performance/no window)
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- angular, firebase, node.js, typescript
- 領域
- frontend, performance
調査の方向性
docs/performance.md の Performance セットアップから始め、ng build で Angular 17 SSR フローを再現します。angular-fire.mjs の stack trace に示されている AngularFire のエントリーポイントを調査します。prerendering が performance/no window エラーなしで完了し、ブラウザーの Performance を引き続き利用できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Version info
Angular:
17.0.8
Firebase:
10.7.1
AngularFire:
17.0.0
Other (e.g. Ionic/Cordova, Node, browser, operating system):
Node 18, Ionic 7, MacOS
How to reproduce these conditions
Steps to set up and reproduce
- New Angular 17 project
ng add @angular/fire@17ng add @angular/ssr- Set up Performance as per https://github.com/angular/angularfire/blob/master/docs/performance.md
ng build
Debug output
⠇ Building...
_FirebaseError: Performance: Window is not available. (performance/no window).
at _Api (/app/.angular/prerender-root/node_modules/@firebase/performance/dist/esm/index.esm2017.js:127:33)
at Function.getInstance (/app/.angular/prerender-root/node_modules/@firebase/performance/dist/esm/index.esm2017.js:202:27)
at _Trace (/app/.angular/prerender-root/node_modules/@firebase/performance/dist/esm/index.esm2017.js:1032:24)
at trace (/app/.angular/prerender-root/node_modules/@firebase/performance/dist/esm/index.esm2017.js:1492:12)
at <anonymous> (/app/.angular/prerender-root/39307160-ad59-4f3c-a738-b9eb3f06e2ec/node_modules/@angular/fire/fesm2022/angular-fire.mjs:216:44)
at <anonymous> (/app/.angular/prerender-root/39307160-ad59-4f3c-a738-b9eb3f06e2ec/node_modules/@angular/fire/fesm2022/angular-fire.mjs:148:57)
at _ZoneDelegate.invoke (/app/.angular/prerender-root/node_modules/zone.js/fesm2015/zone.js:368:26)
at _Zone.run (/app/.angular/prerender-root/node_modules/zone.js/fesm2015/zone.js:129:43)
at _NgZone.runOutsideAngular (/app/.angular/prerender-root/node_modules/@angular/core/fesm2022/core.mjs:14619:28)
at runOutsideAngular (/app/.angular/prerender-root/39307160-ad59-4f3c-a738-b9eb3f06e2ec/node_modules/@angular/fire/fesm2022/angular-fire.mjs:148:33) {
code: 'performance/no window',
customData: {}
An unhandled exception occurred: Performance: Window is not available. (performance/no window).
See "/private/var/folders/_1/812j7dg974961xvzh0b7h5lh0000gn/T/ng-zxfYjy/angular-errors.log" for further details.
/node_modules/rxjs/dist/cjs/internal/util/reportUnhandledError.js:13
throw err;
^
Expected behavior
AngularFire should check if rendering on a browser before calling Performance code (which relies on window being available)
Actual behavior
No check is done, so when calling the Performance library, this above error occurs as soon as pre-rendering on the server happens and window is accessed but isn't available due to not running in a browser
- 主要言語
- TypeScript
- スター
- 7.8k
- フォーク
- 2.2k
- 平均マージ
- 3日 6時間
- マージ済み PR(30日)
- 5
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
angular/angularfire のほかの issue
-
comp: build/pipeline type: bug version: current (v17+)
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
angular/angularfire#3766 ·
-
comp: schematics type: bug version: current (v17+)
難易度 3/5 1〜2日 初心者へのやさしさ 76/100
angular/angularfire#3768 ·
-
comp: docs type: chore version: current (v17+)
難易度 4/5 3〜5日 初心者へのやさしさ 58/100
angular/angularfire#3764 ·
-
comp: firestore comp: ssr priority: P0 (critical) type: feature version: current (v17+)
angular/angularfire#3757 · 担当者 1 名 ·
-
Six `firebase` entry points have no `@angular/fire` equivalent, so their exports are unreachable オープンcomp: core type: feature
angular/angularfire#3755 · 担当者 1 名 ·
angular/angularfire の issue をすべて見る
似ている issue
-
blocklist removal
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
MetaMask/eth-phishing-detect#296544 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
pastelsky/bundlephobia#1122 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100