bug: goRoom navigates to broken RoomView after failed DM creation from search
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- react-native, typescript
- 領域
- mobile
調査の方向性
app/lib/methods/helpers/goRoom.ts から始め、特に 111–113 行目の catch ブロックと 121–129 行目のナビゲーションを確認し、その後 search.ts:157 を調べて結果の rid を理解してください。失敗した、または成功しなかった DM 作成が RoomView ナビゲーションに到達しないことを確認し、両方のエラーパスでユーザーが検索画面に留まることを検証してください。
索引モデルが issue の本文から書いたものです。
説明
In app/lib/methods/helpers/goRoom.ts, when a user taps a spotlight search result to open a DM and createDirectMessage fails (network error, invalid user, etc.), the catch block at lines 111–113 emits an error toast but does not return. Execution falls through to lines 121–129, which navigates to RoomView with the search item's rid — which is the username string (set by search.ts:157 as rid: user.username), not a real Rocket.Chat room ID.
The result: the user sees an error toast AND gets navigated to a broken/empty RoomView that can't load any room data.
There's a second trigger: if createDirectMessage succeeds but returns { success: false } (or result.room._id is falsy), the try block exits without returning, and the same fallthrough occurs.
Steps to Reproduce
- Open the app, go to the rooms list
- Tap the search icon and search for a username
- Simulate a failure condition (e.g., airplane mode, or search for a user that doesn't exist on the server but appears in spotlight)
- Tap the user result to open a DM
createDirectMessagefails → error toast appears- Observe: app navigates to a broken/empty RoomView instead of staying on the search screen
Expected Behavior
After a failed DM creation, the user should stay on the current screen. The error toast from emitErrorCreateDirectMessage is sufficient feedback. No navigation should occur.
Actual Behavior
The error toast is shown, but execution falls through past the catch block. The app navigates to RoomView with rid set to the username string (e.g., "john"). RoomView tries to load a room with this invalid rid from WatermelonDB, finds nothing, and shows a blank/broken screen.
Rocket.Chat Server Version
Not applicable — client-side bug
Rocket.Chat App Version
Latest develop branch
Device Name
Any
OS Version
Any (iOS and Android)
- 主要言語
- TypeScript
- スター
- 2.4k
- フォーク
- 1.5k
- 平均マージ
- 1日 15時間
- マージ済み PR(30日)
- 29
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
RocketChat/Rocket.Chat.ReactNative のほかの issue
-
[IMPROVEMENT] Remove redundant `await` on synchronous `userPreferences.getBool` in `getUsersPresence`対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンtype: feature
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
RocketChat/Rocket.Chat.ReactNative#7737 ·
メンテナーはふだん 1 日以内に返信
-
UIKit modal: a viewSubmit response with no `type` field fails to close the modal on mobile (regression from #7057)対応中かも @erikurt9 が 106 日前に担当しました。 オープンtype: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
RocketChat/Rocket.Chat.ReactNative#7503 · コメント 3 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
type: bug
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
RocketChat/Rocket.Chat.ReactNative#7437 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
✅ tests 👷 ci type: feature
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
RocketChat/Rocket.Chat.ReactNative#7247 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug: useSubscriptions re-queries WatermelonDB on every server connection state change, causing unnecessary rooms list flicker対応中かも @deepak0x が 226 日前に担当しました。 オープンtype: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
RocketChat/Rocket.Chat.ReactNative#7093 ·
メンテナーはふだん 1 日以内に返信
RocketChat/Rocket.Chat.ReactNative の issue をすべて見る
似ている issue
-
Bug: Broken RTL / BiDi text rendering when mixing Persian (Farsi) with English or numbers対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンbug
難易度 2/5 半日 初心者へのやさしさ 68/100
amosblomqvist/learnharness#758 ·
メンテナーはふだん 2 日以内に返信
-
Change Workspacesオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
bitfocus/companion-module-renewedvision-propresenter-api#134 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
rcpch/digital-growth-charts-react-component-library#304 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
dsh-market/dsh-market#1210 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
trustjonathan/STUDY-HUB#13 ·