checkIfAllFieldsPresent can re-run after resolving, crashing on a destroyed webview
まだ誰も着手していません。
評価
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 初心者へのやさしさ
- 90/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- electron, typescript
- 領域
- desktop
調査の方向性
まず、checkIfAllFieldsPresent 関数と、それを呼び出す独立した cookie、request、localStorage の watcher を見つけます。すべての webview 操作の前に resolved state が確認されていることを検証し、その後 watcher の呼び出しを繰り返して再現またはテストし、2 回目の呼び出しで破棄された BrowserWindow に対して close が呼び出されないことを確認します。
索引モデルが issue の本文から書いたものです。
説明
checkIfAllFieldsPresent has no guard against being invoked again after it already found all fields and called webview.close():
const checkIfAllFieldsPresent = () => {
for (const field of requiredFields) { ... }
resolved = true
webview.close()
resolve({ cookies: output })
}
It's wired up to multiple independent watchers (cookie, request, localStorage), any of which can fire again in the async window between webview.close() being called and the window actually finishing destruction. A second call re-enters the function and calls webview.close() again on an already-closing/destroyed BrowserWindow, throwing TypeError: Object has been destroyed as an uncaught main-process exception (crashes/kills the app, not just the login flow). This becomes much easier to hit if a polling-based fix for the SPA cookie-watcher issue is added, but the race exists today with just the two navigation events.
Fix direction: add an early if (resolved) return guard at the top of checkIfAllFieldsPresent.
- 主要言語
- TypeScript
- スター
- 63
- フォーク
- 8
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
mautrix/manager のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
mautrix/manager の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
enhancement tech debt
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
privatenumber/tsx#866 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
danielmiessler/LifeOS#2533 ·
メンテナーはふだん 9 日以内に返信
-
auto:producer auto:uiux
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
fritzprix/libr-agent#2447 ·
メンテナーはふだん 1 日以内に返信