Skip to content

msglist: Long-press on invalid link crashes the app #5854

@chrisbobbe

Description

@chrisbobbe

https://chat.zulip.org/#narrow/stream/48-mobile/topic/long-press.20on.20invalid.20link.20crashes.20RN.20app/near/1776020

We got a report from rust-lang that any invalid link (e.g. [something](not a valid link)) crashes the React Native app upon longpress. Both the reporter and I are on Android, so I can't verify if it also affects iOS.

I've reproduced the issue on Android—and indeed also on iOS.

We should catch the error from the URL parser.

I wouldn't have expected errors in the long-press handler to actually crash the app; that is puzzling. And in a debug build, the symptom is different—the app doesn't crash; it just shows a dismissable red error screen. Anyway, we want to catch and handle the error, since servers' expected behavior includes producing an href that doesn't parse.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions