bug: goRoom navigates to broken RoomView after failed DM creation from search
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- react-native, typescript
- Ambito
- mobile
Direzione di ricerca
Inizia in app/lib/methods/helpers/goRoom.ts, in particolare nel blocco catch alle righe 111–113 e nella navigazione alle righe 121–129, quindi esamina search.ts:157 per comprendere il rid del risultato. Assicurati che la creazione di DM fallita o non riuscita non raggiunga la navigazione di RoomView e verifica che entrambi i percorsi di errore mantengano l’utente nella schermata di ricerca.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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)
- Lingua principale
- TypeScript
- Stelle
- 2.4k
- Fork
- 1.5k
- Merge medio
- 1g 15h
- PR unite (30g)
- 29
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di RocketChat/Rocket.Chat.ReactNative
-
[IMPROVEMENT] Remove redundant `await` on synchronous `userPreferences.getBool` in `getUsersPresence`Forse già presa Una pull request collegata a questa issue è aperta o già unita. Apertatype: feature
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
RocketChat/Rocket.Chat.ReactNative#7737 ·
I maintainer di solito rispondono entro 1 giorno
-
UIKit modal: a viewSubmit response with no `type` field fails to close the modal on mobile (regression from #7057)Forse già presa @erikurt9 l’ha presa 106 giorni fa. Apertatype: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
RocketChat/Rocket.Chat.ReactNative#7503 · 3 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
type: bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
RocketChat/Rocket.Chat.ReactNative#7437 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
✅ tests 👷 ci type: feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
RocketChat/Rocket.Chat.ReactNative#7247 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug: useSubscriptions re-queries WatermelonDB on every server connection state change, causing unnecessary rooms list flickerForse già presa @deepak0x l’ha presa 226 giorni fa. Apertatype: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
RocketChat/Rocket.Chat.ReactNative#7093 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di RocketChat/Rocket.Chat.ReactNative
Issue simili
-
Bug: Broken RTL / BiDi text rendering when mixing Persian (Farsi) with English or numbersForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertabug
Difficoltà 2/5 Mezza giornata Idoneità per principianti 68/100
amosblomqvist/learnharness#758 ·
I maintainer di solito rispondono entro 2 giorni
-
Change WorkspacesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
bitfocus/companion-module-renewedvision-propresenter-api#134 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
rcpch/digital-growth-charts-react-component-library#304 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
dsh-market/dsh-market#1210 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
trustjonathan/STUDY-HUB#13 ·